luxe: editor
Editor
Section titled “Editor”import "luxe: editor" for EditorAccess to information about the editor, if the game is currently running in the editor. Please note this API is new and heavily work in progress.
Editor.get
Section titled “Editor.get”Editor.get : unknownReturns the editor API for access to the editor
Editor.get(.)
Section titled “Editor.get(.)”Editor.get(context_id : Any) : unknownReturns the editor context with the given ID. Examples include
luxe.editor.worldfor the world editor, orluxe.editor.tiles.//We can check if a world is in edit mode via the `edit` tag.//For example, a scene being previewed in editor is still running in//the editor, but we don't want to act as if it's being edited.var is_world_editable = World.tag_has(world, "edit")if(!is_world_editable) return//if we're in the editor, we can access the world editor and do some thingsvar world_editor = Editor.get("luxe.editor.world-editor")if(world_editor) {//simple example, make sure the gizmo matches the transform//if there's no gizmo, the function returns nullvar gizmo = world_editor.gizmoif(gizmo) gizmo.refresh()}