Groups
Groups
Sign in
Groups
Groups
宴ユーザーグループ
Conversations
About
Send feedback
Help
動画のボタンでの停止(スキップ機能)について
23 views
Skip to first unread message
IKURA DON
unread,
Mar 22, 2026, 9:16:34 AM (13 days ago)
Mar 22
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to 宴ユーザーグループ
Unity バージョン: Unity5
宴 バージョン: 4.25
Unityの習熟度:初心者
お世話になります。
宴の中で動画を再生しているのですが (クリックによる中断は無効にして)
自分で設置したスキップボタンを押すことで動画をスキップ(停止)させたいです。
VideoPlayerへの参照が得られればStop()を呼び出すことで停止できると思うのですが、
あまり知識がないため動的に生成されるVideoPayer?の参照を得る方法が分かりません。
AdvVideoManagerを操作したらVideoPlayerへの参照が得れるのでは?とソースを
見たのですが分かりませんでした。
動画をボタンを押すことで停止する方法、もしくはVideoPlayerの参照を得る方法など
ありましたら教えていただければ幸いです。
マッドネスラボ
unread,
Mar 22, 2026, 9:39:23 AM (13 days ago)
Mar 22
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to 宴ユーザーグループ
一般的にUnityでは、GetComponentInChildrenを使えば、
指定のGameObjectやコンポーネント以下の子オブジェクト以下のどこかにあるComponentを取得できるので
それを使ってみてください
void Smaple(AdvVideoManager videoManager)
{
var video = VideoManager.GetComponentInChildren<VideoPlayer>();
if (video != null)
{
video.Stop();
}
}
2026年3月22日日曜日 22:16:34 UTC+9
edo...@gmail.com
:
IKURA DON
unread,
Mar 22, 2026, 9:54:34 AM (13 days ago)
Mar 22
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to 宴ユーザーグループ
ありがとうございます!
早速、やってみます。
色々と知識不足ですいません。
2026年3月22日日曜日 22:39:23 UTC+9 マッドネスラボ:
Reply all
Reply to author
Forward
0 new messages