void CreateDatabase() { m_protoSetting = ScriptableObject.CreateInstance <ProtoSettingDatabase>(); AssetDatabase.CreateAsset(m_protoSetting, DATABASE_PATH); AssetDatabase.SaveAssets(); AssetDatabase.Refresh(); }
void LoadDatabase() { m_protoSetting = (ProtoSettingDatabase)AssetDatabase.LoadAssetAtPath(DATABASE_PATH, typeof(ProtoSettingDatabase)); m_settingData = m_protoSetting.GetDatabase(); if (m_protoSetting == null) { CreateDatabase(); } }