Skip to main content

PlatformComponents

A class in Root.Township, the global namespace.

Build-time bake step that removes chosen components on platforms they aren't meant for (for example Windows-only components on Quest).

Constructors​

MemberWhat it is
PlatformComponents()Unity makes components itself; use AddComponent or spawn a prefab instead of new.

Fields​

1 private and internal field
MemberWhat it is
private PlatformComponents.PlatformObjectSetup[] platformObjectsGroups of components and the platforms they're kept on.

Methods​

MemberWhat it is
override void Bake(bool isSaving)Destroys each listed component whose target platforms don't include the current runtime, then clears missing renderers from the LOD group.
void Bake()Destroys each listed component whose target platforms don't include the current runtime, then clears missing renderers from the LOD group.
1 private and internal method
MemberWhat it is
private void Awake()Empty.