SceneUI||doc135339

September 20, 2022

SceneUI

adoptInstance.new("SceneUI") Create a scenario UI instance

Introduction

The scene window is a scene instance generated in a 3D scene. It is used as a container for the GUI interface and is usually used for billboards, prompts, etc. in games. Although sceneui does not inherit from movablenode, it will still be affected by its parent space transformation when it is under an instance child. For example, when the parent node of sceneui moves, sceneui will also move, and when the parent node of sceneui rotates, sceneui will also rotate.

Attribute

string Layout
GUI layout file path
Window Window [ClientOnly]
GUI window instances mounted on the scene window
bool AlwaysOnTop
Whether the GUI interface level of the scene window remains at the top level of the screen
bool AlwaysFaceCamera
Does the GUI interface of the scene window always face the camera
float ViewDistance
Visual distance of GUI interface of scene window
bool ScaleWithDistance
Whether the GUI interface of the scene window is scaled with distance
Vector3 LocalPosition
Local coordinates of the scene window
Vector3 LocalRotation 
Local 3D rotation of scene window
bool LockWorldRotation 
Whether the scene window does not rotate with the parent

Inherited from Instance

string Name
Name of the instance
Instance Parent
Parent of the instance
Map Map [ReadOnly]
Scenario of the instance
string ClassName [ReadOnly]
Class name of the instance
int ID [ReadOnly]
Unique ID of the instance

Function

Inherited from Instance

bool IsValid()
Get whether the instance object reference is valid
void Destroy()
Destroy instance
Instance Clone()
Clone the current instance
bool IsAncestorOfInstance instance )
Get whether it is the ancestor of an instance
bool IsDescendantOfInstance instance )
Get whether it is a descendant of an instance
bool IsClassstring className )
Get whether the instance type is a certain type
Instance FindFirstAncestorstring name )
Get the ancestor node instance by name
Instance FindFirstAncestorByClassstring className )
Get the ancestor node instance according to the type name
Instance FindFirstChildstring name, bool recursive )
Get child node instances by name
Instance FindFirstChildByClassstring name, bool recursive )
Get the child node instance according to the type name
table<Instance> GetChildrenbool recursive )
Get all child node instances
void AddChildInstance instance )
Add an instance to a child
void DestroyAllChildren()
Destroy all child node instances
BindableEvent GetEventstring eventName )
Get the bindable event of the instance

event

Inherited from Instance

BindableEvent OnChildAdded
Triggered after adding child nodes to the instance
BindableEvent OnChildRemoved
Triggered after removing child nodes from an instance
BindableEvent OnDestroy
Triggered when the instance is about to be destroyed