streamingAssets pour la gestion des vidéos
This commit is contained in:
parent
e7eadad962
commit
03d8b7ac87
@ -596,6 +596,7 @@ MonoBehaviour:
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
raceFinishTime: 30
|
||||
videoID: 1
|
||||
--- !u!114 &1036252281
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -630,7 +631,7 @@ GameObject:
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
m_IsActive: 0
|
||||
--- !u!81 &1180963259
|
||||
AudioListener:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -841,6 +842,7 @@ MonoBehaviour:
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
raceFinishTime: 30
|
||||
videoID: 0
|
||||
--- !u!212 &1718131636
|
||||
SpriteRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -8,6 +8,7 @@ public class VideoManager : MonoBehaviour {
|
||||
private VideoPlayer videoPlayer;
|
||||
public float speed {get; set; }
|
||||
public float raceFinishTime = 30.0f;
|
||||
public int videoID = 0;
|
||||
|
||||
void Start () {
|
||||
speed = 0.0f;
|
||||
@ -15,7 +16,7 @@ public class VideoManager : MonoBehaviour {
|
||||
// TODO: Aspect Ratio is not working?
|
||||
videoPlayer.aspectRatio = VideoAspectRatio.FitOutside;
|
||||
Debug.Log(videoPlayer.aspectRatio);
|
||||
videoPlayer.url = "../video.webm";
|
||||
videoPlayer.url = Application.streamingAssetsPath + "/" + videoID + ".webm";
|
||||
videoPlayer.isLooping = true;
|
||||
videoPlayer.playOnAwake = false;
|
||||
videoPlayer.Prepare();
|
||||
|
Loading…
Reference in New Issue
Block a user