private void OnPreprocessAtlas(string path) { if (!ArtAssetPath.CheckValidAssetPath(path)) { return; } var atlas = context.mainObject as SpriteAtlas; if (atlas != null) { EditorToolSet.AtlasRenamePrefix(assetPath); if (atlas.name.Contains(Rank1TextureSubName)) { spriteAtlasSetting.maxTextureSize = Rank1TextureMaxSize; } else if (atlas.name.Contains(Rank2TextureSubName)) { spriteAtlasSetting.maxTextureSize = Rank2TextureMaxSize; } else if (atlas.name.Contains(Rank3TextureSubName)) { spriteAtlasSetting.maxTextureSize = Rank3TextureMaxSize; } else { spriteAtlasSetting.maxTextureSize = Rank1TextureMaxSize; } atlas.SetPlatformSettings(spriteAtlasSetting); } }
private static void ProcessPrefab(string path) { var extension = Path.GetExtension(path); if (extension.Equals(".prefab")) { EditorToolSet.RemoveInvalidPrefix(path, invalidPrefix); } }
private void OnPostprocessTexture(Texture2D texture) { if (assetPath.Contains("Art/UISprites")) { EditorToolSet.SpriteRenamePrefix(assetPath); } else { EditorToolSet.TextureRenamePrefix(assetPath); } }
/// <summary> /// 导入模型后,修改已导入的Gameobject、mesh、animationclip /// </summary> /// <param name="g"></param> private void OnPostprocessModel(GameObject g) { //TODO:看之后补充的需求 EditorToolSet.MeshRenamePrefix(assetPath); var modelImporter = assetImporter as ModelImporter; if (modelImporter == null) { return; } //SwitchModelPreProcess();//这一步已经在OnPreprocessModel判断了具体处理的流程 DoModelPostProcess(modelImporter, g); }
private static void HandleAllDataTables() { EditorToolSet.LoadPackages(); var packages = UIPackage.GetPackages(); foreach (var package in packages) { var items = package.GetItems(); foreach (var item in items) { if (item.type == PackageItemType.Component && item.name.Contains("Panel") && !item.name.Contains("Frame")) { GenerateCode(package.name, item.name); } } } Debug.Log("GenerateUICode Finish"); }
private void OnPostprocessPrefab(GameObject obj) { EditorToolSet.ChangeLayerToEnemy(obj); }
private static void OnProcessAnimation(string path) { EditorToolSet.AnimationRenamePrefix(path); }
private void OnPreprocessAudio() { EditorToolSet.AudioRenamePrefix(assetPath); }
private static void OnProcessMaterial(string path) { EditorToolSet.MaterialRenamePrefix(path); }