You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
usingNaughtyAttributes;usingUnityEngine;usingUnityEngine.Playables;[System.Serializable]publicclassCustomDialogBehaviour:PlayableBehaviour{[ResizableTextArea]publicstringdialogText;// working fine[Button("ToUpper")]// not even displaying BtnpublicvoidToUpper(){dialogText=dialogText.ToUpper();}publicColortextColor;publicColorcloudColor;
#if UNITY_EDITOR[UnityEditor.CustomEditor(typeof(CustomDialogBehaviour)),UnityEditor.CanEditMultipleObjects]publicclassCustomDialogBehaviourEditor:UnityEditor.Editor{publicoverridevoidOnInspectorGUI(){if(GUILayout.Button("ToUpperCase"))//this also not displaying btn{varcustomDialogBehaviour=serializedObject.FindProperty("dialogText");customDialogBehaviour.stringValue=customDialogBehaviour.stringValue.ToUpper();serializedObject.ApplyModifiedProperties();}DrawDefaultInspector();}}
#endif
}
The text was updated successfully, but these errors were encountered:
usingNaughtyAttributes;usingTimeline.Samples;usingUnityEngine;usingUnityEngine.Playables;usingUnityEngine.Timeline;publicclassCustomDialogPlayableAsset:PlayableAsset,ITimelineClipAsset{[NoFoldOut][NotKeyable]publicCustomDialogBehaviourtemplate=new(){cloudColor=Color.white,textColor=Color.white,dialogText=""};[Button("ToUpper")]// this also not displaying any btnvoidToUpper(){UnityEditor.Undo.RecordObject(this,"ToUpperCase");template.dialogText=template.dialogText.ToUpper();UnityEditor.EditorUtility.SetDirty(this);}publicClipCapsclipCaps{get{returnClipCaps.Blending;}}publicoverridePlayableCreatePlayable(PlayableGraphgraph,GameObjectowner){returnScriptPlayable<CustomDialogBehaviour>.Create(graph,template);}}
#if UNITY_EDITOR[UnityEditor.CustomEditor(typeof(CustomDialogPlayableAsset)),UnityEditor.CanEditMultipleObjects]publicclassCustomDialogPlayableAssetEditor:UnityEditor.Editor{publicoverridevoidOnInspectorGUI(){if(GUILayout.Button("ToUpperCase"))// this is displaying Btn{varcustomDialogBehaviour=targetasCustomDialogPlayableAsset;customDialogBehaviour.template.dialogText=customDialogBehaviour.template.dialogText.ToUpper();serializedObject.ApplyModifiedProperties();}DrawDefaultInspector();}}
#endif
here is my Code for Time timeline Track
The text was updated successfully, but these errors were encountered: