A class in Root.Township, the global namespace.
Obsolete editor bake helper that swaps this object for an instance of a prefab's root, at the same transform.
Constructors
| Member | What it is |
|---|
ChunkingPrefabReplace() | Unity makes components itself; use AddComponent or spawn a prefab instead of new. |
Fields
1 private and internal field
| Member | What it is |
|---|
private GameObject prefab | Backing field for Prefab. Moved up to the prefab's root on replace. |
Properties
| Member | What it is |
|---|
bool IsBaked { get; set; } | Set to true by Bake. |
GameObject Prefab { get; set; } | The prefab to swap in. |
Methods
| Member | What it is |
|---|
static void CheckReplace(ref GameObject target, bool isChunkingPrefabFolderForced = false) | Replaces the target if it has this component, or walks a ChunkingPrefabFolder's children and replaces those. |
GameObject ReplaceWithPrefab() | Instantiates the prefab's root object, copies this transform to it, destroys this object, and returns the new one. |
bool ValidatePrefab() | Always returns false and does nothing. |
1 private and internal method
| Member | What it is |
|---|
private void IBakeable.Bake() | Marks it baked and runs ReplaceWithPrefab. |