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()); } } } }
void Start() { Debug.Log("start GUI"); InitGUI(); RegisterCallbacks(); support = LuYou.IsSupported(); LuYou.SetDeletageCallback(true); }
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(); }
public virtual void Start(LuYou luYouInstance, int screenWidth, int screenHeight) { }
//init public virtual void Awake(LuYou luYouInstance) { }
void OnPostRender() { LuYou.EndDraw(); }
void OnPreRender() { LuYou.BeginDraw(); }
public override void Awake(LuYou luYouInstance) { }
public override void Start(LuYou luYouInstance, int screenWidth, int screenHeight) { luyou_init(screenWidth, screenHeight); }
void OnRenderImage(RenderTexture src, RenderTexture dest) { Graphics.Blit(src, dest); LuYou.CaptureFrame(src.GetNativeTextureID()); }