Hi guys,
I have googling and messeing around for a while and here is a code I end up with
[PostProcessBuild]
public static void MyPostProcess(BuildTarget buildTarget, string pathToBuiltProject) {
if (buildTarget == BuildTarget.iOS) {
string projPath = PBXProject.GetPBXProjectPath(pathToBuiltProject);
PBXProject proj = new PBXProject();
proj.ReadFromString(File.ReadAllText(projPath));
string target = proj.TargetGuidByName("Unity-iPhone");
proj.AddFileToBuild(target,proj.AddFolderReference(Application.dataPath+"/Plugins/test/chocobo.png", "test/chocobo.png"));
File.WriteAllText(projPath, proj.WriteToString());
}
}
What I got after postprocess is this. (Group)
But this is what I expected. (Folder References)
Through the process when draging the folder into the project like this.
Can anyone tell me how to do this? Thanks!
![]()
![]()
