void GetTrailerURL() { YoutubeAPIManager ytm = GameObject.FindObjectOfType <YoutubeAPIManager>(); YoutubeAPIManager.YoutubeSearchOrderFilter mainFilter = YoutubeAPIManager.YoutubeSearchOrderFilter.none; ytm.Search(title + " trailer", 10, mainFilter, YoutubeAPIManager.YoutubeSafeSearchFilter.none, "", OnSearchDone); }
void Awake() { Debug.Assert(_player != null, "Player is missing"); _youtubeManager = gameObject.GetComponent <YoutubeAPIManager> (); _autoplay = gameObject.GetComponent <RealmAutoplayController> (); }
void Start() { //Get the api component youtubeapi = GameObject.FindObjectOfType <YoutubeAPIManager>(); if (youtubeapi == null) { youtubeapi = gameObject.AddComponent <YoutubeAPIManager>(); } }
void Awake() { _interaction = gameObject.GetComponent <RealmsInteractiveItem> (); _playback = gameObject.GetComponentInChildren <RealmYouTubePlayback> (); _youtubeManager = gameObject.GetComponent <YoutubeAPIManager> (); _playButtonUI = gameObject.GetComponentInChildren <RealmPlayPauseButtonUI> (); _playerAudio = _playback.GetComponentInChildren <AudioSource> (); _playerAudio.playOnAwake = false; }
// Start is called before the first frame update void Start() { apiManager = GetComponent <YoutubeAPIManager>(); apiManager.GetPlaylistItems(PLAYLIST_URL, 50, OnGetPlaylistPart); }
// Start is called before the first frame update void Start() { youtubeapi = GameObject.FindObjectOfType <YoutubeAPIManager>(); player = GetComponent <YoutubePlayer>(); GetTrailerURL(); }
void Awake() { instance = this; }