/// <summary> /// Will setup webrtc and create the network object /// </summary> private void Start() { Append("Setting up WebRtcNetworkFactory"); WebRtcNetworkFactory factory = WebRtcNetworkFactory.Instance; if (factory != null) { Append("WebRtcNetworkFactory created"); } }
private void Start() { if (!isLocalPlayer) { return; } // Crea una instancia del tipo WebRtcNetworkFactory lista para ser usada en caso de que el jugador cree o se una a partida. Esta clase la incluye el asset WebRTC Network. WebRtcNetworkFactory factory = WebRtcNetworkFactory.Instance; if (factory != null) { Debug.Log("WebRTCNetwork creada"); } else { Debug.Log("WebRTCNetwork no se ha creado correctamente"); } }
/// <summary> /// Will setup webrtc and create the network object /// </summary> private void Start() { //shows the console on all platforms. for debugging only if (uDebugConsole) { DebugHelper.ActivateConsole(); } if (uLog) { SLog.SetLogger(OnLog); } SLog.LV("Verbose log is active!"); SLog.LD("Debug mode is active"); Append("Setting up WebRtcNetworkFactory"); WebRtcNetworkFactory factory = WebRtcNetworkFactory.Instance; if (factory != null) { Append("WebRtcNetworkFactory created"); } }
public static void TryStaticInitialize() { //make sure it is called only once. no need for multiple static inits... if (sStaticInitTried) { return; } //this library builds on top of the network version -> make sure this one is initialized WebRtcNetworkFactory.TryStaticInitialize(); if (WebRtcNetworkFactory.StaticInitSuccessful == false) { Debug.LogError("WebRtcNetwork failed to initialize. UnityCallFactory can't be used without WebRtcNetwork!"); sStaticInitSuccessful = false; return; } #if UNITY_WEBGL && !UNITY_EDITOR //uncomment to be able to run in the editor using the native version //check if the java script part is available if (Byn.Media.Browser.BrowserMediaNetwork.IsAvailable() == false) { //js part is missing -> inject the code into the browser Byn.Media.Browser.BrowserMediaNetwork.InjectJsCode(); } //if still not available something failed. setting sStaticInitSuccessful to false //will block the use of the factories sStaticInitSuccessful = Byn.Media.Browser.BrowserMediaNetwork.IsAvailable(); if (sStaticInitSuccessful == false) { Debug.LogError("Failed to access the java script library. This might be because of browser incompatibility or a missing java script plugin!"); } #else sStaticInitSuccessful = true; #endif }