|
|
|
@ -1,4 +1,4 @@
|
|
|
|
|
#if UNITY_STANDALONE_OSX || UNITY_STANDALONE_WIN || UNITY_EDITOR |
|
|
|
|
#if UNITY_STANDALONE_OSX || UNITY_STANDALONE_WIN || UNITY_EDITOR |
|
|
|
|
using System; |
|
|
|
|
using System.IO; |
|
|
|
|
using System.Text; |
|
|
|
@ -36,14 +36,18 @@ namespace FFmpeg
|
|
|
|
|
{ |
|
|
|
|
#if UNITY_EDITOR |
|
|
|
|
binaryPath = Path.Combine(Application.dataPath, EDITOR_BINARY_PATH); |
|
|
|
|
#elif UNITY_STANDALONE_OSX |
|
|
|
|
string buildDir = Directory.GetCurrentDirectory(); |
|
|
|
|
binaryPath = Path.Combine(buildDir, "ffmpeg"); |
|
|
|
|
//#elif UNITY_STANDALONE_OSX |
|
|
|
|
// string buildDir = Directory.GetCurrentDirectory(); |
|
|
|
|
// binaryPath = Path.Combine(buildDir, "ffmpeg"); |
|
|
|
|
//#elif UNITY_STANDALONE_WIN |
|
|
|
|
// string buildDir = Directory.GetCurrentDirectory(); |
|
|
|
|
// string dataDir = Directory.GetDirectories(buildDir, "*_Data")[0]; |
|
|
|
|
// binaryPath = Path.Combine(dataDir, "ffmpeg"); |
|
|
|
|
#elif UNITY_STANDALONE_WIN |
|
|
|
|
string buildDir = Directory.GetCurrentDirectory(); |
|
|
|
|
string dataDir = Directory.GetDirectories(buildDir, "*_Data")[0]; |
|
|
|
|
binaryPath = Path.Combine(dataDir, "ffmpeg"); |
|
|
|
|
string buildDir = Application.dataPath; //Directory.GetCurrentDirectory(); |
|
|
|
|
binaryPath = Path.Combine(buildDir, "ffmpeg"); |
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
if (!File.Exists(binaryPath)) |
|
|
|
|
{ |
|
|
|
|
string err = "Binary is not found at " + binaryPath; |
|
|
|
|