A class in Root.Township, the global namespace.
Build-time bake step that turns chosen child objects on or off depending on the platform, and destroys objects listed for removal.
Constructors
| Member | What it is |
|---|
PlatformObjects() | Unity makes components itself; use AddComponent or spawn a prefab instead of new. |
Fields
| Member | What it is |
|---|
List<GameObject> childTargetsToDestroy | Objects to destroy when baking. |
2 private and internal fields
| Member | What it is |
|---|
private static Logger logger | NLog logger for this class. |
private PlatformObjects.PlatformObjectSetup[] platformObjects | Groups of objects and the platforms they stay active on. |
Methods
| Member | What it is |
|---|
override void Bake(bool isSaving) | Applies each setup (active on matching platforms, inactive elsewhere), destroys childTargetsToDestroy and clears missing LOD renderers. |
void Bake() | Applies each setup (active on matching platforms, inactive elsewhere), destroys childTargetsToDestroy and clears missing LOD renderers. |
2 private and internal methods
| Member | What it is |
|---|
private void DestroyLostChildren() | Destroys each object in childTargetsToDestroy, handing it to a parent PlatformObjects if the editor can't destroy it. |
private static void TryMoveTargetToParent(GameObject root, GameObject target) | Adds the object to a parent PlatformObjects destroy list, or just deactivates it if there is none. |