Esempio n. 1
0
    public static void CreateVideoHint(VideoClip clip, string videoTitle, Vector3 position)
    {
        if (clip == null)
        {
            return;
        }


        if (CurrentVideo != null)
        {
            if (!CurrentVideo.videoTitle.Equals(videoTitle))
            {
                CurrentVideo.DestroyHint();
            }
            else
            {
                return;
            }
        }

        Init();

        GameObject newHint = Instantiate(videoHintPrefab);

        newHint.transform.position = position;

        CurrentVideo = newHint.GetComponent <VideoHint>();

        CurrentVideo.clip       = clip;
        CurrentVideo.videoTitle = videoTitle;
    }
 private void CreateVideoHint(Video video)
 {
     VideoHint.CreateVideoHint(video.Clip, video.Title, videoHintSpawn.position);
 }