UnityEditor.iOS.Xcode.PBXProject.AddFolderReference C# (CSharp) Method

AddFolderReference() public method

public AddFolderReference ( string path, string projectPath ) : string
path string
projectPath string
return string
        public string AddFolderReference(string path, string projectPath)
        {
            return this.AddFileImpl(path, projectPath, PBXSourceTree.Source, true);
        }

Same methods

PBXProject::AddFolderReference ( string path, string projectPath, PBXSourceTree sourceTree ) : string

Usage Example

Esempio n. 1
0
    private static void DoAddLocalizationFolder(string projectPath)
    {
        string pbxProjectPath = UnityEditor.iOS.Xcode.PBXProject.GetPBXProjectPath(projectPath);

        UnityEditor.iOS.Xcode.PBXProject originalProj = new UnityEditor.iOS.Xcode.PBXProject();

        originalProj.ReadFromFile(pbxProjectPath);
        string localizationFolderPath = $"{projectPath}/Localization";

        if (false == Directory.Exists(localizationFolderPath))
        {
            Directory.CreateDirectory(localizationFolderPath);
        }
        originalProj.AddFolderReference(localizationFolderPath, "Localization");
        originalProj.WriteToFile(pbxProjectPath);
    }
PBXProject