Class UnityMenuSettingsDefinition
Unity ScriptableObject implementation of IMenuSettingsDefinition that defines menu configuration.
Provides settings for menu layout, options, alignment, and event handling through Unity's inspector.
Namespace: Serenity.Menu.Infrastructure.Settings
Assembly: Serenity.UnityMenu.Infrastructure.dll
Syntax
public class UnityMenuSettingsDefinition : ScriptableObject, IMenuSettingsDefinition, IFoundationSettings
Constructors
UnityMenuSettingsDefinition()
Declaration
public UnityMenuSettingsDefinition()
Fields
EventToDispatchOnSubmit
Declaration
public EventDispatcherSignal EventToDispatchOnSubmit
Field Value
| Type | Description |
|---|---|
| EventDispatcherSignal | The event dispatcher signal to trigger when a menu option is submitted. |
Guid
Declaration
public string Guid
Field Value
| Type | Description |
|---|---|
| string | The globally unique identifier for this menu definition. |
Id
Declaration
public string Id
Field Value
| Type | Description |
|---|---|
| string | The unique identifier for this menu definition. |
InstantiationMode
Declaration
public MenuInstantiationMode InstantiationMode
Field Value
| Type | Description |
|---|---|
| MenuInstantiationMode | Controls when this menu's visual instance is created. Configuration-only in this iteration; defaults to PreloadOnStartup (value 0) so existing assets preserve the current eager-construction behavior. Not yet honored by any runtime code. |
IsTranslatingTitle
Declaration
public bool IsTranslatingTitle
Field Value
| Type | Description |
|---|---|
| bool | Whether the title is being translated. |
MenuAlignment
Declaration
public UiAnchorType MenuAlignment
Field Value
| Type | Description |
|---|---|
| UiAnchorType | The anchor type that determines how the menu is aligned relative to its container. |
OnHide
Declaration
public List<EventDispatcherSignal> OnHide
Field Value
| Type | Description |
|---|---|
| List<EventDispatcherSignal> | Event dispatcher signals to fire when the menu transitions to the hidden state. |
OnShow
Declaration
public List<EventDispatcherSignal> OnShow
Field Value
| Type | Description |
|---|---|
| List<EventDispatcherSignal> | Event dispatcher signals to fire when the menu transitions to the shown state. |
OptionAlignment
Declaration
public UiComponentAlignmentType OptionAlignment
Field Value
| Type | Description |
|---|---|
| UiComponentAlignmentType | The alignment type for individual options within the menu. |
Options
Declaration
public UiOption[] Options
Field Value
| Type | Description |
|---|---|
| UiOption[] | Array of UI options that comprise this menu's selectable items. |
OptionsGap
Declaration
public float OptionsGap
Field Value
| Type | Description |
|---|---|
| float | The gap spacing between menu options in Unity units. |
Title
Declaration
public string Title
Field Value
| Type | Description |
|---|---|
| string | The title of the menu. |
TitleGap
Declaration
public float TitleGap
Field Value
| Type | Description |
|---|---|
| float | The gap spacing between the title and the options in Unity units. |
Methods
ToString()
Returns a detailed string representation of this menu settings definition.
Includes all configuration properties and options for debugging and logging purposes.
Declaration
public override string ToString()
Returns
| Type | Description |
|---|---|
| string | A formatted string containing all menu configuration details. |