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

FindFileGuidByProjectPath() public method

public FindFileGuidByProjectPath ( string path ) : string
path string
return string
        public string FindFileGuidByProjectPath(string path)
        {
            path = PBXPath.FixSlashes(path);
            PBXFileReferenceData data = this.FileRefsGetByProjectPath(path);
            if (data != null)
            {
                return data.guid;
            }
            return null;
        }

Usage Example

コード例 #1
0
ファイル: XcodeSetting.cs プロジェクト: li5414/Usdk
    private static void SetFilesCompileFlag(PBXProject proj, Hashtable arg)
    {
        if (arg == null)
        {
            return;
        }
        string target = proj.TargetGuidByName(PBXProject.GetUnityTargetName());

        foreach (DictionaryEntry i in arg)
        {
            string fileProjPath = i.Key.ToString();
            string fguid        = proj.FindFileGuidByProjectPath(fileProjPath);
            if (fguid == null)
            {
                continue;
            }
            ArrayList     des  = i.Value as ArrayList;
            List <string> list = new List <string>();
            foreach (var flag in des)
            {
                list.Add(flag.ToString());
            }
            proj.SetCompileFlagsForFile(target, fguid, list);
        }
    }
All Usage Examples Of UnityEditor.iOS.Xcode.PBXProject::FindFileGuidByProjectPath
PBXProject