Skip to main content

AdditionalStaticContent.StaticContent

A private class in Root.Township, the global namespace. Reach it through att-stubs' publicized assemblies or Harmony's AccessTools.

One prefab entry in AdditionalStaticContent, with the local position, rotation and scale it is spawned at.

Constructors​

MemberWhat it is
StaticContent()Creates an AdditionalStaticContent.StaticContent with default values.

Fields​

5 private and internal fields
MemberWhat it is
private bool isVisualOnlyWhen true, the spawned copy is not marked for script-assigned static batching in the editor.
private Vector3 localPositionLocal position the prefab is spawned at.
private Quaternion localRotationLocal rotation the prefab is spawned at.
private Vector3 localScaleLocal scale the prefab is spawned at.
private GameObject prefabThe prefab to spawn.

Methods​

MemberWhat it is
Transform InstantiateContent(Transform parent)Spawns the prefab under the parent at the stored transform. In the editor it adds or removes the static batching marker.
bool IsEquals(GameObject prefab)True if this entry uses the given prefab.
bool Validate()Resets the transform to identity if the scale is about zero, and returns whether it did.
1 private and internal method
MemberWhat it is
private bool IsApproxZeroScale()True when the stored scale is about zero.

Used in​

Members of other types that take, return or hold a StaticContent: