コード例 #1
0
    private void onJoinButtonClicked()
    {
        // get parameters (channel name, channel profile, etc.)
        GameObject go    = GameObject.Find("ChannelName");
        InputField field = go.GetComponent <InputField>();

        // create app if nonexistent
        if (ReferenceEquals(app, null))
        {
            app = new TestHelloUnityVideo(); // create app
            //app = new GameObject().AddComponent<TestHelloUnityVideo>();
            app.loadEngine();                // load engine

            if (isHost)
            {
                app.useCamVideo = true;
            }
            else
            {
                app.useCamVideo = false;
            }
        }

        // join channel and jump to next scene
        app.join(field.text);
        SceneManager.sceneLoaded += OnLevelFinishedLoading;         // configure GameObject after scene is loaded
        SceneManager.LoadScene("TestSceneHelloVideo", LoadSceneMode.Single);
    }
コード例 #2
0
 private void onJoinButtonClicked()
 {
     Debug.Log("agora_: onJoinButtonClicked");
     if (ReferenceEquals(app, null))
     {
         app = new TestHelloUnityVideo();
         app.loadEngine("58de5f787c6848feb866522f1998391e");
         Debug.Log("agora_: ApkLoaded");
     }
     app.join("test");
 }
コード例 #3
0
ファイル: TestHome.cs プロジェクト: madpingui/Agora-Video
    public void onJoinButtonClicked()
    {
        // get parameters (channel name, channel profile, etc.)
        GameObject go    = GameObject.Find("ChannelName");
        InputField field = go.GetComponent <InputField>();

        // create app if nonexistent
        if (ReferenceEquals(app, null))
        {
            app = new TestHelloUnityVideo(); // create app
            app.loadEngine(AppID);           // load engine
        }

        // join channel and jump to next scene
        app.join(field.text);
        SceneManager.sceneLoaded += OnLevelFinishedLoading; // configure GameObject after scene is loaded
        SceneManager.LoadScene(PlaySceneName, LoadSceneMode.Single);
    }