LayerCollector
LayerCollector is the base class of 2D UI containers which render GuiObject descendants, such as ScreenGui.
Caching static UI for performance improvements
A Gui's appearance is cached until one of the following events occurs:
- A descendant is added to the Gui.
- A descendant is removed from the Gui.
- A property of a descendant of the Gui changes.
- A property of the Gui changes.
If any of these events occur, the Gui's appearance will be recomputed the next frame it gets rendered.
Sommario
Proprietà
Toggles the visibility of the LayerCollector.
- lettura parallela
Controls how this LayerCollector behaves when its associated Player respawns.
- lettura parallela
Controls how GuiObject.ZIndex behaves on all descendants of the LayerCollector.
- sola letturanon replicato
Describes the actual screen position of a UI element, in pixels.
- sola letturanon replicato
Describes the actual screen rotation of a UI element, in degrees.
- sola letturanon replicato
Describes the actual screen size of a UI element, in pixels.
- lettura parallela
When set to true, localization will be applied to this GuiBase2d and its descendants based on the GuiBase2d.RootLocalizationTable specified for this GuiBase2d.
- lettura parallela
A reference to a LocalizationTable to be used to apply automated localization to this GuiBase2d and its descendants.
- lettura parallela
Customizes gamepad selection behavior in the down direction.
- lettura parallela
Customizes gamepad selection behavior in the left direction.
- lettura parallela
Customizes gamepad selection behavior in the right direction.
- lettura parallela
Customizes gamepad selection behavior in the up direction.
- lettura parallela
Allows customization of gamepad selection movement.
Eventi
Eventi inherited from GuiBase2d- SelectionChanged(amISelected : bool,previousSelection : GuiObject,newSelection : GuiObject):RBXScriptSignal
Fires when the gamepad selection moves to, leaves, or changes within the connected GuiBase2d or any descendent GuiObjects.
Proprietà
Enabled
Toggles the visibility of the LayerCollector. When false, the UI contents will not render, process user input, or update in response to changes.
ResetOnSpawn
When set to false and this LayerCollector is a direct child of StarterGui, this LayerCollector will only be cloned into each player's PlayerGui once, and the LayerCollector will not be deleted when the player respawns.
When set to true, or if this LayerCollector is an indirect descendant of StarterGui, this LayerCollector will be cloned into each player's PlayerGui when they respawn, and it will delete itself when the player respawns again.
ZIndexBehavior
Controls how GuiObject.ZIndex behaves on all descendants of the LayerCollector.
Enum.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.
With Enum.ZIndexBehavior.Sibling, 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.