Exemple #1
0
    public override void OnInspectorGUI()
    {
        Character character = (Character)target;

        DrawDefaultInspector();
        StoryManager storyManager = GameObject.FindObjectOfType <StoryManager>();

        storyManager.GetStoryThreadNames();
        character.GetUsedStoryNames();
        character.index = EditorGUILayout.Popup("StoryThread to Add: ", character.index, storyManager.storyThreadNames);
        if (GUILayout.Button("Add StoryThread"))
        {
            character.UsedStoryThreads.Add(storyManager.storyThreads[character.index]);
        }
        character.index2 = EditorGUILayout.Popup("StoryThread to Remove: ", character.index2, character.usedStoryThreadNames);
        if (GUILayout.Button("Remove StoryThread"))
        {
            character.UsedStoryThreads.Remove(character.UsedStoryThreads[character.index2]);
        }
    }