Class SceneGridSettings

The SceneGridSettings class provides editor persisted settings for SceneGrid instances.

Simply subscribe to the onDirty event and update your SceneGrid instance when you get the event. To modify the settings use the SceneGridSettingsWindow. A globally shared settings instance is available through the static SceneGridSettings.instance property.

Hierarchy (view full)

Constructors

Properties

enabled: boolean
linesColor: Color
planeColor: Color
planeNormal: EnumValueTyped<GridPlaneNormal, number>
spacing: number

Accessors

  • get isGlobal(): boolean
  • Gets the settings.

    Returns boolean

Methods

  • Marks the settings as dirty and invokes the onDirty event handler.

    Returns void

    This method should be invoked after making a change, so subsystems such as a viewport cna be updated. If the settings are the shared editor settings, the editor settings will be marked for autosave.

Events

onDirty: Event<[SceneGridSettings], void>

Invoked when the settings changed.

This is an internal event. Do not subscribe directly to it, use UserProjectSettings.onSettingsChanged.