Beispiel #1
0
    public object GetTriggerValue(string path)
    {
        string strTrigger = GetUntilOrEmpty(path, "/");
        string strPart    = path.Replace(strTrigger, "");

        strPart = strPart.Trim('/');
        StoryTrigger st = StringToStoryTrigger(strTrigger);

        return(st.GetTriggerValue(strPart));
    }
Beispiel #2
0
    void DrawListItems(Rect rect, int index, bool isActive, bool isFocused)
    {
        SerializedProperty element = list.serializedProperty.GetArrayElementAtIndex(index); // The element in the list

        SerializedProperty elementName  = element.FindPropertyRelative("title");
        string             elementTitle = string.IsNullOrEmpty(elementName.stringValue)
            ? "New Trigger Variable"
            : "" + $"{elementName.stringValue}" + " (" + storyTrigger.GetTriggerValue(index).ToString() + ")";

        EditorGUI.PropertyField(
            new Rect(rect.x + 10f, rect.y, (EditorGUIUtility.currentViewWidth - 75f), EditorGUIUtility.singleLineHeight),
            element,
            label: new GUIContent(elementTitle),
            includeChildren: true
            );
    }