I am trying to copy some files into the build directory after completing a build, but the path provided as an argument to OnPostProcessBuild
does not exist.
[PostProcessBuildAttribute(1)]
public static void OnPostprocessBuild(BuildTarget target, string pathToBuildProject)
{
if (target.ToString() == "iOS")
{
Debug.Log("Build Finished for target : " + target.ToString());
Debug.Log("Build Finished at Path : " + pathToBuildProject);
Debug.Log("File pick location : " + objectiveCCodeFilePath);
//Pasted in the xcode exported build
xCodeBuildPath = pathToBuildProject + "/Classes";
Debug.Log("File paste location : " + xCodeBuildPath);
Debug.Log("System.IO.File.Exists(objectiveCCodeFilePath) : " + System.IO.File.Exists(objectiveCCodeFilePath));
Debug.Log("Build path without classes : " + System.IO.File.Exists(pathToBuildProject));//return false
Debug.Log("Build path with classes : " + System.IO.File.Exists(xCodeBuildPath));//return false, but the same path is opening in explorer
//MonoBehaviour.Invoke("CopyFile",2);
//StartCoroutine
}
}
This is showing false. What I am doing wrong?
Debug.Log("Build path without classes : " + System.IO.File.Exists(pathToBuildProject));//return false
Debug.Log("Build path with classes : " + System.IO.File.Exists(xCodeBuildPath));//return false,
but the same path is opening in explorer