private void CreateCharacterSavedGraphFile(NewCharacterCreationData _data, EditorConfig _config) { CharacterSavedGraph savedGraph = ScriptableObject.CreateInstance <CharacterSavedGraph>(); string path = _config.CharacterSavedGraphsPath + "/" + _data.CharacterName.ToString() + ".asset"; AssetDatabase.CreateAsset(savedGraph, path); }
private void GetCharacterSavedGraph() { string path = OTGEditorUtility.GetCharacterSavedGraphPath(SelectedCharacter.name, m_editorConfig.CharacterSavedGraphsPath); CharacterSavedGraph graph = AssetDatabase.LoadAssetAtPath <CharacterSavedGraph>(path); if (graph == null) { graph = ScriptableObject.CreateInstance <CharacterSavedGraph>(); AssetDatabase.CreateAsset(graph, path); } CharacterStateGraph = graph; }