Class
LayerCollector
NotCreatableNotBrowsable
The base class of 2D UI containers which render GuiObjects
in layers.
LayerCollector is the base class of 2D UI containers which render
GuiObject descendants, such as ScreenGui.
For performance improvements, the appearance of a LayerCollector is
cached until one of the following events occurs:
- A descendant is added to or removed from it.
- A property of a descendant changes.
- A property of the
LayerCollectoritself changes.
Properties 3#
Enabledboolean | Toggles the visibility of this LayerCollector.ReadSafe |
ResetOnSpawnboolean | Determines if the LayerCollector resets (deletes itself and
re-clones into the player's PlayerGui) every time the player's
character respawns.ReadSafe |
ZIndexBehaviorZIndexBehavior | Controls how GuiObject.ZIndex behaves on all descendants of this
LayerCollector.ReadSafe |
Enabled: boolean#
ReadSafe
Toggles the visibility of this LayerCollector. When false, the
UI contents will not render, process user input, or update in response to
changes.
ResetOnSpawn: boolean#
ReadSafe
When set to false and this LayerCollector is a direct child of
StarterGui, it will only be cloned into each player's
PlayerGui once and it will not be deleted when the player's
character respawns.
When set to true (default), or if this LayerCollector is an
indirect descendant of StarterGui, it will be cloned into each
player's PlayerGui when their character respawns, and it will
delete itself when the player's character respawns again.
ZIndexBehavior: ZIndexBehavior#
ReadSafe
Controls how GuiObject.ZIndex behaves on all descendants of this
LayerCollector.
With ZIndexBehavior.Sibling (default), children always render above
their parents, and the ZIndex is used to decide
the order in which children of a single UI object will render over each
other.
ZIndexBehavior.Global sorts all descendants according to the
ZIndex, then breaks ties using the hierarchy
order. As a result, descendants of a GuiObject need to have a
ZIndex value that's at least as high as the
parent, or they will render underneath their parent.
Methods 1#
| GetLayoutNodeTree | Deprecated |
GetLayoutNodeTree(): Dictionary#
DeprecatedDeprecated
Deprecated. This method should not be used for new work.
Returns
Dictionary
Inherited members#
Inherited from GuiBase2d 12
Properties (11)
AbsolutePosition, AbsoluteRotation, AbsoluteSize, AutoLocalize, Localize, RootLocalizationTable, SelectionBehaviorDown, SelectionBehaviorLeft, SelectionBehaviorRight, SelectionBehaviorUp, SelectionGroup
Events (1)
Inherited from Instance 58
Properties (10)
Archivable, archivable, Capabilities, IsInSandbox, Name, Parent, PredictionMode, RobloxLocked, Sandboxed, UniqueId
Methods (39)
AddTag, children, ClearAllChildren, Clone, clone, Destroy, destroy, FindFirstAncestor, FindFirstAncestorOfClass, FindFirstAncestorWhichIsA, FindFirstChild, findFirstChild, FindFirstChildOfClass, FindFirstChildWhichIsA, FindFirstDescendant, GetActor, GetAttribute, GetAttributeChangedSignal, GetAttributes, GetChildren, getChildren, GetDebugId, GetDescendants, GetFullName, GetStyled, GetStyledPropertyChangedSignal, GetTags, HasTag, IsAncestorOf, IsDescendantOf, isDescendantOf, IsPropertyModified, QueryDescendants, Remove, remove, RemoveTag, ResetPropertyToDefault, SetAttribute, WaitForChild