You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
728 B
28 lines
728 B
#if UNITY_STANDALONE_OSX
|
|
using UnityEngine;
|
|
using UnityEditor;
|
|
using UnityEditor.Callbacks;
|
|
using System.IO;
|
|
|
|
public class WinPostBuild
|
|
{
|
|
[PostProcessBuild(1000)]
|
|
public static void OnPostprocessBuild(BuildTarget target, string pathToBuiltProject)
|
|
{
|
|
PostProcessBuild(pathToBuiltProject);
|
|
}
|
|
|
|
static void PostProcessBuild(string path)
|
|
{
|
|
string binarySource =
|
|
Path.Combine(
|
|
Application.dataPath,
|
|
FFmpeg.StandaloneProxy.EDITOR_BINARY_PATH);
|
|
|
|
string buildFolder = Path.GetDirectoryName(path);
|
|
string binaryDestination = Path.Combine(buildFolder, "ffmpeg");
|
|
|
|
File.Copy(binarySource, binaryDestination, true);
|
|
}
|
|
}
|
|
#endif |