예제 #1
0
        private void CreateCharacterSavedGraphFile(NewCharacterCreationData _data, EditorConfig _config)
        {
            CharacterSavedGraph savedGraph = ScriptableObject.CreateInstance <CharacterSavedGraph>();
            string path = _config.CharacterSavedGraphsPath + "/" + _data.CharacterName.ToString() + ".asset";

            AssetDatabase.CreateAsset(savedGraph, path);
        }
예제 #2
0
        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;
        }