I want a set of files to be copied to the build directory, not compiled into the final build. Is there any way to do this, besides manual copy-paste each time?
These are the games external data files that I want to be fully moddable.
I want a set of files to be copied to the build directory, not compiled into the final build. Is there any way to do this, besides manual copy-paste each time?
These are the games external data files that I want to be fully moddable.
Check out the [PostProcessBuild] attribute.
You add it to an editor method (in an editor folder) and it will be triggered once the build completes.
The method should have the following signature (also shown in the example in the link above):
[PostProcessBuild]
public static void OnPostprocessBuild(BuildTarget target, string pathToBuiltProject)
{
Debug.Log( pathToBuiltProject );
}
One of the arguments is the actual path to the built project. You can use that and copy whatever you want into that path.