public static MonsterDataList Create(string assetPath, string assetName) { MonsterDataList assetClass = ScriptableObject.CreateInstance <MonsterDataList>(); assetClass.dataList = new List <MonsterData>(); AssetDatabase.CreateAsset(assetClass, assetPath + assetName); AssetDatabase.SaveAssets(); return(assetClass); }
public static MonsterDataList Create() { MonsterDataList assetClass = ScriptableObject.CreateInstance <MonsterDataList>(); assetClass.dataList = new List <MonsterData>(); AssetDatabase.CreateAsset(assetClass, "Assets/scriptableDataList.asset"); AssetDatabase.SaveAssets(); return(assetClass); }
void OnEnable() { m_elementIndex = -1; m_questionIdx = -1; m_answerIdx = -1; m_questionEnumIdx = -1; m_questionListIdx = -1; m_monsterDataList = null; m_scrollVector = Vector2.right; }
public override void LoadDataFromScriptableObject() { MonsterDataList datas = Resources.Load <MonsterDataList>("MonsterData/Monsters"); foreach (var data in datas.dataList) { if (data.m_monsterType == MonsterTools.MONSTER_TYPE.SPHINX) { LoadData(data); } else { continue; } } }
void LoadEntityConfigButton() { string path = EditorUtility.OpenFilePanel("Load config", "", "asset"); m_monsterDataList = AssetDatabase.LoadAssetAtPath <MonsterDataList>(Tools.GetAssetsPathFromRoot(path)); }
public void CreateDataList(string assetPath, string assetName) { m_monsterDataList = EditorManager.Create(assetPath, assetName); }