protected override Object GetAsset(string path)
        {
            GameObject temp = TemporaryAssetHelper.CreateTempAsset(path) as GameObject;
            GameObject go   = PrefabUtility.InstantiatePrefab(temp) as GameObject;

            return(go);
        }
        /// <summary>
        /// 需要将处理后的Prefab保存起来
        /// </summary>
        /// <param name="asset"></param>
        /// <param name="entryPath"></param>
        protected override void SaveAssets(Object asset, string path)
        {
            string tempPath = TemporaryAssetHelper.GetTempAssetPath(path);

            PrefabUtility.CreatePrefab(tempPath, asset as GameObject, ReplacePrefabOptions.ConnectToPrefab);
            Object.DestroyImmediate(asset, true);
        }
Beispiel #3
0
 private void ReplaceWithTempAssetPath(List <string> pathList)
 {
     for (int i = 0; i < pathList.Count; i++)
     {
         if (TemporaryAssetHelper.HasCreateTempAsset(pathList[i]))
         {
             pathList[i] = TemporaryAssetHelper.GetTempAssetPath(pathList[i]);
         }
     }
 }
Beispiel #4
0
 private static void Initialize()
 {
     TemporaryAssetHelper.Initialize();
     MaterialJsonData.Initialize();
     AssetBuildStrategyManager.Initialize();
     AssetBundleBuilder.Initialize();
     AssetRecordHelper.ReadAssetRecord();
     Logger.GetLogger(LOGGER_NAME).Level = Logger.LEVEL_LOG;
     _processedAssetPathSet = new HashSet <string>();
 }