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.
29 lines
773 B
29 lines
773 B
#if UNITY_STANDALONE_WIN |
|
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); |
|
} |
|
|
|
private static void PostProcessBuild(string path) |
|
{ |
|
string binarySource = |
|
Path.Combine( |
|
Application.dataPath, |
|
FFmpeg.StandaloneProxy.EDITOR_BINARY_PATH); |
|
|
|
string extension = Path.GetExtension(path); |
|
string dataFolder = path.Replace(extension, "_Data"); |
|
string binaryDestination = Path.Combine(dataFolder, "ffmpeg"); |
|
|
|
File.Copy(binarySource, binaryDestination, true); |
|
} |
|
} |
|
#endif |