Skip to main content
Version: 1.1.0

EditorSproutyDialogsSceneField

Inherits: HBoxContainer

Description

Component that allows to select a scene and show its path in the field. It has buttons to create a new scene of a given type and go to edit the scene.

Properties

TypeNameDefault
SceneTypescene_type-

Methods

Return TypeMethod
voidset_scene_type(type: SceneType)
intget_scene_uid()
Stringget_scene_path()
voidset_scene_path(path: String)
voidclear_path()

Signals

signal scene_path_changed(path: String)

Emitted when the scene is changed.


Enumerations

enum SceneType

Scene types available for selection


Property Descriptions

var scene_type : SceneType

Scene type to load. Determines which scene types are available for selection and validation.


Method Descriptions

func set_scene_type(type: SceneType) -> void

Set the scene type to load. Updates the resource picker settings and dialog configuration based on the selected scene type.


func get_scene_uid() -> int

Returns the UID of the selected scene. Returns -1 if no valid scene is selected.


func get_scene_path() -> String

Returns the current scene path in the field. Returns an empty string if the path is not valid.


func set_scene_path(path: String) -> void

Set the scene path in the field. Validates the scene before setting it.


func clear_path() -> void

Clear the current value of the field.