Hi, I'm trying to find the editor script that handles the inspector for Standard UI Subtitle Panel. The reason being is so that I can add a new field for the Profile Panel parent allowing me to Hide the profile and name if the character is reading a sign and not talking to an NPC but Show the panel when talking to an NPC/Actor.
I've implemented the code already for hiding and showing the profile panel, I just need the ability to show the field in the inspector for the parent object holding the profile images and I can't find the custom inspector script for it.
How To Add New Serialized Editor Fields to Standard UI Subtitle Panel Script?
-
- Posts: 14
- Joined: Fri Mar 19, 2021 7:38 am
Re: How To Add New Serialized Editor Fields to Standard UI Subtitle Panel Script?
Hi,
The custom inspector scripts for the Standard Dialogue UI components are in Plugins / Pixel Crushers / Dialogue System / Scripts / Editor / UI / Standard UI / Dialogue UI. You can make a subclass of StandardUISubtitlePanelEditor and override OnInspectorGUI to add more inspector fields. Example:
The custom inspector scripts for the Standard Dialogue UI components are in Plugins / Pixel Crushers / Dialogue System / Scripts / Editor / UI / Standard UI / Dialogue UI. You can make a subclass of StandardUISubtitlePanelEditor and override OnInspectorGUI to add more inspector fields. Example:
Code: Select all
[CustomEditor(typeof(MyCustomSubtitlePanel), true)]
public class MyCustomSubtitlePanelEditor : StandardUISubtitlePanelEditor
{
public override void OnInspectorGUI()
{
base.OnInspectorGUI();
serializedObject.Update();
EditorGUILayout.PropertyField(serializedObject.FindProperty(nameof(MyCustomSubtitlePanelEditor.myCustomField), true);
serializedObject.ApplyModifiedProperties();
}
}
-
- Posts: 14
- Joined: Fri Mar 19, 2021 7:38 am
Re: How To Add New Serialized Editor Fields to Standard UI Subtitle Panel Script?
Weird, I don't have that heirarchy.
I've got:
Plugins -> Pixel Crushers -> Dialogue System: then the following subfolders.
Demo,
Prefabs,
Resources,
Templates,
Thirdparty Support,
Wrappers
Edit:
Ah cheers for posting the file name, thanks
I've got:
Plugins -> Pixel Crushers -> Dialogue System: then the following subfolders.
Demo,
Prefabs,
Resources,
Templates,
Thirdparty Support,
Wrappers
Edit:
Ah cheers for posting the file name, thanks
Re: How To Add New Serialized Editor Fields to Standard UI Subtitle Panel Script?
Out of curiosity, where did the Scripts folder end up?
-
- Posts: 14
- Joined: Fri Mar 19, 2021 7:38 am
Re: How To Add New Serialized Editor Fields to Standard UI Subtitle Panel Script?
Ah it appears to have been in the prefabs folder.
prefabs -> Standard UI Prefabs -> Pro -> Scripts -> Editor
prefabs -> Standard UI Prefabs -> Pro -> Scripts -> Editor
Re: How To Add New Serialized Editor Fields to Standard UI Subtitle Panel Script?
Hmm, maybe an accidental mouse drag. As long as you keep the Scripts folder somewhere within the Plugins folder, it's fine to leave it there or move it back to its original position.
-
- Posts: 14
- Joined: Fri Mar 19, 2021 7:38 am
Re: How To Add New Serialized Editor Fields to Standard UI Subtitle Panel Script?
Possibly, could have also been another team member thanks though