示例#1
0
        //所有的资源的导入,删除,移动,都会调用此方法,注意,这个方法是static的
        public static void OnPostprocessAllAssets(string[] importedAsset, string[] deletedAssets, string[] movedAssets, string[] movedFromAssetPaths)
        {
            for (int i = 0; i < importedAsset.Length; i++)
            {
                Debug.Log($"{importedAsset[i]}");
            }

            fileAssets.Clear();
            floderAssets.Clear();

            CheckAssetPathArray(importedAsset, "importedAsset", true);
            CheckAssetPathArray(deletedAssets, "deletedAssets", false);
            CheckAssetPathArray(movedAssets, "movedAssets", true);
            CheckAssetPathArray(movedFromAssetPaths, "movedFromAssetPaths", false);

            //通知资源检查工具。
            //1 检查资源格式
            //2 检查资源目录结构
            //3 自定更新文件打包策略
            ResourceChecker.OnPostprocessAllAssets(fileAssets, floderAssets);
        }
示例#2
0
 //音频导入之前
 public void OnPreprocessAudio()
 {
     ResourceChecker.OnPreprocessAudio(assetPath, assetImporter);
 }
示例#3
0
 //音频导入之后
 public void OnPostprocessAudio(AudioClip clip)
 {
     ResourceChecker.OnPostprocessAudio(assetPath, assetImporter, clip);
 }
示例#4
0
 //文理导入之后
 public void OnPostprocessTexture(Texture2D tex)
 {
     ResourceChecker.OnPostprocessTexture(assetPath, assetImporter, tex);
 }
示例#5
0
 //纹理导入之前调用,针对入到的纹理进行设置
 public void OnPreprocessTexture()
 {
     ResourceChecker.OnPreprocessTexture(assetPath, assetImporter);
 }
示例#6
0
 //模型导入之前调用
 public void OnPostprocessModel(GameObject go)
 {
     ResourceChecker.OnPostprocessModel(assetPath, assetImporter, go);
 }
示例#7
0
 //模型导入之前调用
 public void OnPreprocessModel()
 {
     ResourceChecker.OnPreprocessModel(assetPath, assetImporter);
 }
示例#8
0
 protected virtual Material OnAssignMaterialModel(Material previousMaterial, Renderer renderer)
 {
     return(ResourceChecker.OnAssignMaterialModel(previousMaterial, renderer));
 }