# This file is automatically generated. Please don't edit it manually. # To submit a bug report on the content, see # https://devforum.roblox.com/c/bug-reports/documentation-issues/72 name: LayerCollector type: class memory_category: Instances summary: | The base class of 2D UI containers which render `Class.GuiObject|GuiObjects` in layers. description: | **LayerCollector** is the base class of 2D UI containers which render `Class.GuiObject` descendants, such as `Class.ScreenGui`. For performance improvements, the appearance of a `Class.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 `Class.LayerCollector` itself changes. code_samples: [] inherits: - GuiBase2d descendants: - BillboardGui - PluginGui - ScreenGui - SurfaceGuiBase tags: - NotCreatable - NotBrowsable deprecation_message: '' properties: - name: LayerCollector.Enabled summary: | Toggles the visibility of this `Class.LayerCollector`. description: | Toggles the visibility of this `Class.LayerCollector`. When `false`, the UI contents will not render, process user input, or update in response to changes. code_samples: [] type: boolean tags: [] deprecation_message: '' security: read: None write: None thread_safety: ReadSafe category: Data serialization: can_load: true can_save: true capabilities: - UI - name: LayerCollector.ResetOnSpawn summary: | Determines if the `Class.LayerCollector` resets (deletes itself and re-clones into the player's `Class.PlayerGui`) every time the player's character respawns. description: | When set to `false` and this `Class.LayerCollector` is a direct child of `Class.StarterGui`, it will only be cloned into each player's `Class.PlayerGui` once and it will not be deleted when the player's character respawns. When set to `true` (default), or if this `Class.LayerCollector` is an **indirect** descendant of `Class.StarterGui`, it will be cloned into each player's `Class.PlayerGui` when their character respawns, and it will delete itself when the player's character respawns again. code_samples: [] type: boolean tags: [] deprecation_message: '' security: read: None write: None thread_safety: ReadSafe category: Data serialization: can_load: true can_save: true capabilities: - UI - name: LayerCollector.ZIndexBehavior summary: | Controls how `Class.GuiObject.ZIndex` behaves on all descendants of this `Class.LayerCollector`. description: | Controls how `Class.GuiObject.ZIndex` behaves on all descendants of this `Class.LayerCollector`. With `Enum.ZIndexBehavior.Sibling` (default), children always render above their parents, and the `Class.GuiObject.ZIndex|ZIndex` is used to decide the order in which children of a single UI object will render over each other. `Enum.ZIndexBehavior.Global` sorts all descendants according to the `Class.GuiObject.ZIndex|ZIndex`, then breaks ties using the hierarchy order. As a result, descendants of a `Class.GuiObject` need to have a `Class.GuiObject.ZIndex|ZIndex` value that's at least as high as the parent, or they will render underneath their parent. code_samples: [] type: ZIndexBehavior tags: [] deprecation_message: '' security: read: None write: None thread_safety: ReadSafe category: Data serialization: can_load: true can_save: true capabilities: - UI methods: - name: LayerCollector:GetLayoutNodeTree summary: '' description: '' code_samples: [] parameters: [] returns: - type: Dictionary summary: '' tags: - Deprecated deprecation_message: | This method should not be used for new work. security: None thread_safety: Unsafe capabilities: - UI events: [] callbacks: []