-
-
Notifications
You must be signed in to change notification settings - Fork 497
Open
Description
here is my Code for Time timeline Track
using NaughtyAttributes;
using UnityEngine;
using UnityEngine.Playables;
[System.Serializable]
public class CustomDialogBehaviour : PlayableBehaviour
{
[ResizableTextArea] public string dialogText; // working fine
[Button("ToUpper")] // not even displaying Btn
public void ToUpper()
{
dialogText = dialogText.ToUpper();
}
public Color textColor;
public Color cloudColor;
#if UNITY_EDITOR
[UnityEditor.CustomEditor(typeof(CustomDialogBehaviour)), UnityEditor.CanEditMultipleObjects]
public class CustomDialogBehaviourEditor : UnityEditor.Editor
{
public override void OnInspectorGUI()
{
if (GUILayout.Button("ToUpperCase")) //this also not displaying btn
{
var customDialogBehaviour = serializedObject.FindProperty("dialogText");
customDialogBehaviour.stringValue = customDialogBehaviour.stringValue.ToUpper();
serializedObject.ApplyModifiedProperties();
}
DrawDefaultInspector();
}
}
#endif
}Metadata
Metadata
Assignees
Labels
No labels