Skip to main content

PlatformObjects.PlatformObjectSetup

A class in Root.Township, the global namespace.

A list of GameObjects turned on or off at bake time depending on the runtime platform.

Constructors​

MemberWhat it is
PlatformObjectSetup()Creates a PlatformObjects.PlatformObjectSetup from runtime and targets.
PlatformObjectSetup(PlatformFlags runtime, List<GameObject> targets)Creates a PlatformObjects.PlatformObjectSetup from runtime and targets.

Fields​

4 private and internal fields
MemberWhat it is
private bool defaultIsInactiveIf true, targets start inactive even on a matching platform.
private bool isKeepingWhenNotValidSerialized flag that nothing in this class reads.
private PlatformFlags targetPlatformsThe platforms the targets are meant for. Defaults to Windows.
private GameObject[] targetsThe GameObjects to turn on or off.

Methods​

MemberWhat it is
void Bake()Runs ProcessActiveTargets if the current platform is one of targetPlatforms, otherwise ProcessInactiveTargets.
2 private and internal methods
MemberWhat it is
private void ProcessActiveTargets()Sets each target active, or inactive if defaultIsInactive is set.
private void ProcessInactiveTargets()Sets each target inactive.

Used in​

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