diff --git a/Assets/FFMpegUtils/FFMpegYUV4Texture.cs b/Assets/FFMpegUtils/FFMpegYUV4Texture.cs index 129df6b..4c2fc6b 100644 --- a/Assets/FFMpegUtils/FFMpegYUV4Texture.cs +++ b/Assets/FFMpegUtils/FFMpegYUV4Texture.cs @@ -78,22 +78,29 @@ void OnEnable() // Creates a YUVReader and FFMpegLauncher to start playback. // If Source is specified in the Inspector, OnEnable will call Initialize and playback will // start immediately. Otherwise it can be called manually to start playback on command. - public void Initialize(string Source) + public bool Initialize(string Source) { m_yuvReader = new YUVReader(); // launch + if (Environment.GetEnvironmentVariable(KEY) == null) + { + Debug.LogWarning("FFMPEG_DIR environment variable not set"); + return false; + } var exec = Path.Combine(Environment.GetEnvironmentVariable(KEY), EXE); m_ffmpeg = FFMpegLauncher.Launch(exec, Source); if (m_ffmpeg == null) { Debug.LogWarning("fail to launch ffmpeg"); - return; + return false; } m_stdOutDisposable = m_ffmpeg.StdOut.BeginRead(new Byte[8192], (b, c) => m_yuvReader.Push(new ArraySegment(b, 0, c))); m_stdErrDisposable = m_ffmpeg.StdErr.BeginRead(new Byte[1024], (b, c) => OnRead(m_error, b, c)); + + return true; } // Allow the Material to be accessed so it can be assigned to geometry at runtime diff --git a/ProjectSettings/DynamicsManager.asset b/ProjectSettings/DynamicsManager.asset index 1931946..0be3d78 100644 --- a/ProjectSettings/DynamicsManager.asset +++ b/ProjectSettings/DynamicsManager.asset @@ -17,3 +17,4 @@ PhysicsManager: m_EnablePCM: 1 m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff m_AutoSimulation: 1 + m_AutoSyncTransforms: 1 diff --git a/ProjectSettings/Physics2DSettings.asset b/ProjectSettings/Physics2DSettings.asset index e3b2d0b..132ee6b 100644 --- a/ProjectSettings/Physics2DSettings.asset +++ b/ProjectSettings/Physics2DSettings.asset @@ -24,6 +24,7 @@ Physics2DSettings: m_QueriesStartInColliders: 1 m_ChangeStopsCallbacks: 0 m_CallbacksOnDisable: 1 + m_AutoSyncTransforms: 1 m_AlwaysShowColliders: 0 m_ShowColliderSleep: 1 m_ShowColliderContacts: 0 diff --git a/ProjectSettings/ProjectVersion.txt b/ProjectSettings/ProjectVersion.txt index a211ccd..7a6fffb 100644 --- a/ProjectSettings/ProjectVersion.txt +++ b/ProjectSettings/ProjectVersion.txt @@ -1 +1 @@ -m_EditorVersion: 2017.1.1f1 +m_EditorVersion: 2017.2.0f3