Exemple #1
0
    // 인터페이스 : 프리팹에 종속이 걸린 원본리소스 리스트 얻기
    public List <string> GetDependency(string strPrefabPath)
    {
        string strExtension = Path.GetExtension(strPrefabPath);

        if (".prefab" != strExtension.ToLower())
        {
            return(null);
        }

        if (0 == m_dicGUID.Count)
        {
            ReadyGUID();
        }

        var pResult   = new List <string>();
        var strPrefab = SHUtils.ReadFile(strPrefabPath);

        SHUtils.ForToDic(m_dicGUID, (pKey, pValue) =>
        {
            int iIndex = strPrefab.IndexOf(pValue);
            if (-1 == iIndex)
            {
                return;
            }

            pResult.Add(pKey);
        });

        return((0 == pResult.Count) ? null : pResult);
    }