Ejemplo n.º 1
0
    private void OnGUI()
    {
        so.Update();
        assetBase = (TextAsset)EditorGUILayout.ObjectField(assetBase, typeof(TextAsset));
        jsonPath  = EditorGUILayout.TextField(jsonPath);
        if (GUILayout.Button("Generate Lines") && assetBase != null)
        {
            generatedLines = new List <string>(assetBase.GetStringArray());
        }

        if (GUILayout.Button("Get Customer Dialogue"))
        {
            customerDialogue = !string.IsNullOrEmpty(jsonPath) ? jsonPath.InitializeFromJSON <NpcDialogueStorage>() : null;
        }

        EditorGUILayout.PropertyField(propGeneratedLines, true);

        EditorGUILayout.PropertyField(dialogue, true);

        so.ApplyModifiedProperties();
    }