Skip to main content

Class ChatPropertyDrawer

A property drawer for ChatEntry.

[CustomPropertyDrawer(typeof(ChatEntry))]
public class ChatPropertyDrawer : BaseEntryPropertyDrawer

Inheritance​

BaseEntryPropertyDrawer→ChatPropertyDrawer

Remarks​

The Typewriter editor uses Unity drawers to display the entry details.

Methods​

GetHandledFields()​

Returns the list of serialized fields that this drawer intends to handle manually, which instructs the base drawer to skip drawing these fields automatically. This allows the derived drawer to provide custom rendering for the specified fields.

protected override IEnumerable<string> GetHandledFields()

Returns​

IEnumerable<string> — An IEnumerable containing the names of fields to exclude from the base drawer’s default rendering.

PopulateContent(VisualElement, SerializedProperty)​

Populates the custom GUI for the serialized ChatEntry.

protected override void PopulateContent(VisualElement root, SerializedProperty property)

Parameters​

NameTypeDescription
rootVisualElementThe root VisualElement to which UI elements are added.
propertySerializedPropertyThe SerializedProperty to populate the custom GUI for.
  • Remarks
  • Methods
    • GetHandledFields()
    • PopulateContent(VisualElement, SerializedProperty)