/// <summary> /// Add basic player components; network, catalogue, session, client and analytics /// </summary> void InitComponents() { gameObject.AddComponent <VPlayerController>(); if (m_network == null) { m_network = gameObject.AddComponent <VNetwork>(); } if (m_catalogue == null) { m_catalogue = gameObject.AddComponent <VCatalogue>(); } if (m_session == null) { m_session = gameObject.AddComponent <VSession>(); } if (m_client == null) { m_client = gameObject.AddComponent <VClient>(); } if (m_analytics == null) { m_analytics = gameObject.AddComponent <VAnalytics>(); } VSettings.ValintaApplicationID = string.IsNullOrEmpty(ValintaApplicationID) ? "DeveloperPreviewApplication000" : ValintaApplicationID; VSettings.UseWWWForAudioClip = UseWWWForAudioDownload; VClient.OnClientInfoReady += OnClientInfoReady; VSession.OnSessionReady += OnSessionReady; }
void Awake() { if (Instance != null) { return; } if (m_network == null) { m_network = ValintaPlayer.Instance.GetNetworkInstance(); } Instance = this; }