예제 #1
0
        private static string GetRootPrefabPath(GameObject go)
        {
            var prefab    = SkinnedMeshUtility.IsPrefab(go) ? go : SkinnedMeshUtility.GetPrefab(go);
            var assetPath = "";

            if (prefab != null)
            {
                var prefabPath = AssetDatabase.GetAssetPath(prefab);
                assetPath = string.Format("{0}/", Path.GetDirectoryName(prefabPath));
            }
            else
            {
                assetPath = string.Format("Assets/");
            }
            assetPath = assetPath.Replace(@"\", @"/");
            return(assetPath);
        }