Class ModulePanelHost
Puts modules' UI panels into the GUI scenes: when a scene loads, every prefab carrying the Addressables label
<scene name>_Panels (for example ClientWorldGUI_Panels) is instantiated into it.
public static class ModulePanelHost
- Inheritance
-
ModulePanelHost
- Inherited Members
Remarks
A module's panel lives in the module's folder as a prefab, not in the GUI scene, so removing the module leaves the scene without a missing script, and nothing outside the module names the panel.
Each panel keeps its prefab's name, which is its UIManager key: it is instantiated under an inactive holder, renamed, then moved into the scene, so its Awake (where it registers) sees the right name. A panel instantiated after the client is set still receives it: registration injects it.
A scene with no such label costs one location lookup.
Fields
LabelSuffix
The label suffix: <scene name> + this.
public const string LabelSuffix = "_Panels"
Field Value
Methods
LabelFor(string)
The label a scene's module panels carry.
public static string LabelFor(string sceneName)
Parameters
sceneNamestring