Ejemplo n.º 1
0
 void OnGUI()
 {
     if (support < 0)
     {
         support = LuYou.IsSupported();
     }
     else
     {
         if (!LuYou.IsRecording() && !LuYou.IsPaused())
         {
             if (GUI.Button(RecordButtonRect1, "Record"))
             {
                 LuYou.SetMaxRecordingTime(30);
                 LuYou.SetMinRecordingTime(5);
                 LuYou.StartRecording();
                 Debug.Log("Record LuYou.IsRecording() = " + LuYou.IsRecording() + " , LuYou.IsPaused() = " + LuYou.IsPaused());
             }
             if (GUI.Button(SharerButtonRect, "share"))
             {
                 string path1 = LuYou.GetLastRecordingFile();
                 LuYouLog.d("LastRecordingFile" + path1);
                 LuYouLog.d("loadThumbnailFromFilePath" + LuYou.LoadThumbnailFromFilePath(path1));
                 string videoId = path1;
                 LuYou.PublishVideo(videoId, path1, "testTitle", "testDescription");
             }
         }
         else if (LuYou.IsRecording())
         {
             if (GUI.Button(RecordButtonRect1, "Stop"))
             {
                 Dictionary <string, string> OthelloDict =
                     new Dictionary <string, string>();
                 OthelloDict.Add("test key", "test value");
                 OthelloDict.Add("test key1", "test value1");
                 OthelloDict.Add("test key2", "test value2");
                 LuYou.SetMetadatas(OthelloDict);
                 LuYou.StopRecording();
                 Debug.Log("Stop LuYou.IsRecording() = " + LuYou.IsRecording() + " , LuYou.IsPaused() = " + LuYou.IsPaused());
             }
             if (GUI.Button(RecordButtonRect2, "Pause"))
             {
                 LuYou.PauseRecording();
                 Debug.Log("Pause LuYou.IsRecording() = " + LuYou.IsRecording() + " , LuYou.IsPaused() = " + LuYou.IsPaused());
             }
         }
         else if (LuYou.IsPaused())
         {
             if (GUI.Button(RecordButtonRect1, "Stop"))
             {
                 LuYou.StopRecording();
                 Debug.Log("Stop LuYou.IsRecording() = " + LuYou.IsRecording() + " , LuYou.IsPaused() = " + LuYou.IsPaused());
             }
             if (GUI.Button(RecordButtonRect2, "Resume"))
             {
                 LuYou.ResumeRecording();
                 Debug.Log("Resume LuYou.IsRecording() = " + LuYou.IsRecording() + " , LuYou.IsPaused() = " + LuYou.IsPaused());
             }
         }
     }
 }
Ejemplo n.º 2
0
 void Start()
 {
     Debug.Log("start GUI");
     InitGUI();
     RegisterCallbacks();
     support = LuYou.IsSupported();
     LuYou.SetDeletageCallback(true);
 }
Ejemplo n.º 3
0
    void Awake()
    {
        if (instance != null)
        {
            Destroy(gameObject);
            return;
        }
        this.gameObject.name = "LuYouPrefab";
        DontDestroyOnLoad(this);
        instance        = this;
        iOSEnabled_     = enableIOS;
        androidEnabled_ = enableAndroid;

        LuYouImpl().Awake(this);
        //support = LuYou.IsSupported();
    }
Ejemplo n.º 4
0
 public virtual void Start(LuYou luYouInstance, int screenWidth, int screenHeight)
 {
 }
Ejemplo n.º 5
0
 //init
 public virtual void Awake(LuYou luYouInstance)
 {
 }
 void OnPostRender()
 {
     LuYou.EndDraw();
 }
Ejemplo n.º 7
0
 void OnPreRender()
 {
     LuYou.BeginDraw();
 }
 public override void Awake(LuYou luYouInstance)
 {
 }
 public override void Start(LuYou luYouInstance, int screenWidth, int screenHeight)
 {
     luyou_init(screenWidth, screenHeight);
 }
Ejemplo n.º 10
0
 void OnRenderImage(RenderTexture src, RenderTexture dest)
 {
     Graphics.Blit(src, dest);
     LuYou.CaptureFrame(src.GetNativeTextureID());
 }