public IEnumerator LoadPng() { doing++; string path = NRTools.GetSdcardPath() + "Assets/Demo/1.png"; Debug.Log(path); WWW w = new WWW(path); while (!w.isDone) { Debug.Log(w.bytesDownloaded); yield return(w); } if (string.IsNullOrEmpty(w.error)) { tex2d = w.texture; Image.texture = tex2d; //Image.SetNativeSize(); } else { Debug.LogError(w.error); } doing--; }
private void Update() { if (m_CameraInput != null) { testFrame.timeStamp = NRTools.GetTimeStamp(); m_CameraInput.OnFrame(testFrame); } }
public IEnumerator UpdateFrame() { while (true) { if (isPlay) { m_DefaultFrame.timeStamp = NRTools.GetTimeStamp(); OnUpdate?.Invoke(m_DefaultFrame); } yield return(new WaitForEndOfFrame()); } }
public void Start() { if (m_IsStarted) { return; } if (EncodeConfig.codecType == (int)CodecType.Local) { EncodeConfig.outPutPath = Path.Combine(EncodeConfig.outPutPath, NRTools.GetTimeStamp() + ".mp4"); } NativeEncoder.SetConfigration(EncodeConfig); NativeEncoder.Start(); m_IsStarted = true; }