Provides runtime safety helpers for validating and normalizing menu option value and interaction type combinations.
Inheritance
UnityMenuOptionRuntimeSafety
Assembly: Serenity.Menu.Installation.dll
public static class UnityMenuOptionRuntimeSafety
Methods
CreateFallbackOption(UiOption)
Creates a safe fallback menu action option when the original option cannot be used as configured.
Declaration
public static UiOption CreateFallbackOption(UiOption option)
Parameters
Returns
GetAllowedInteractionTypes(UiComponentValueType)
Gets the interaction types that are valid for the specified UI component value type.
Declaration
public static IReadOnlyList<UiComponentInteractionType> GetAllowedInteractionTypes(UiComponentValueType valueType)
Parameters
Returns
HasCompatibleGameSettingType(UiComponentValueType, GameSettingsValueType)
Determines whether a menu option value type is compatible with a game settings value type.
Declaration
public static bool HasCompatibleGameSettingType(UiComponentValueType optionValueType, GameSettingsValueType gameSettingsValueType)
Parameters
Returns
IsInteractionTypeAllowed(UiComponentValueType, UiComponentInteractionType)
Determines whether the given interaction type is valid for the specified UI component value type.
Declaration
public static bool IsInteractionTypeAllowed(UiComponentValueType valueType, UiComponentInteractionType interactionType)
Parameters
Returns
NormalizeInteractionType(UiOption)
Returns the option unchanged when its interaction type is valid, or clones it with the first valid interaction type for its value type.
Declaration
public static UiOption NormalizeInteractionType(UiOption option)
Parameters
Returns