Beispiel #1
0
 /**
  *  初始化录屏单例
  *
  */
 public static void Initialize()
 {
     if (Recnow.isSupported())
     {
         if (RecnowInstance == null)
         {
             GameObject RecnowGameObject = new GameObject("Recnow");
             if (RecnowGameObject != null)
             {
                 RecnowInstance = RecnowGameObject.AddComponent <Recnow> ();
                 DontDestroyOnLoad(RecnowGameObject);
             }
         }
     }
 }
Beispiel #2
0
    void OnGUI()
    {
        if (Recnow.isSupported())
        {
            if (GUI.Button(new Rect(50, 50, 100, 100), "Start"))
            {
                Recnow.startRecording(true);
                Debug.Log("startrecord");
            }

            if (GUI.Button(new Rect(250, 50, 100, 100), "Stop"))
            {
                Recnow.stopRecording();
                Debug.Log("stoprecord");
            }

            if (GUI.Button(new Rect(430, 50, 100, 100), "Videos"))
            {
                Recnow.showWorksView();
                Debug.Log("mywork");
            }
        }
    }