protected static void buildAllPrefab(string path, bool isPlayer) { string npcPath = path; DirectoryInfo NpcInfo = new DirectoryInfo(npcPath); if (NpcInfo == null) { return; } FileInfo[] npcFiles = NpcInfo.GetFiles(); if (npcFiles == null) { return; } foreach (FileInfo f in npcFiles) { string lowercaseName = f.Name.ToLower(); if (lowercaseName.Contains(".prefab") && (!lowercaseName.Contains(".meta"))) { string assetPath = npcPath + f.Name; Object asset = AssetDatabase.LoadAssetAtPath(assetPath, typeof(GameObject)); AssertBundleCreator._createObject(asset, isPlayer); } } }
protected static void buildAllPlayerEquip(string path) { string equipPath = path; DirectoryInfo equipInfo = new DirectoryInfo(equipPath); if (equipInfo == null) { return; } FileInfo[] equipFiles = equipInfo.GetFiles(); if (equipFiles == null) { return; } foreach (FileInfo f in equipFiles) { string lowercaseName = f.Name.ToLower(); if (lowercaseName.Contains(".fbx") && (!lowercaseName.Contains(".meta"))) { string assetPath = equipPath + f.Name; Object asset = AssetDatabase.LoadAssetAtPath(assetPath, typeof(GameObject)); AssertBundleCreator._createEquip(asset, true); } } }
static void Execute() { AssertBundleCreator.createObject(true); }
static void Execute() { AssertBundleCreator.createEquip(); }