Skip to main content

AddressableLoader

A class in Root.Township, the global namespace.

Loads an Addressables prefab and instantiates it under itself, only on the chosen platforms.

Constructors​

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

Fields​

2 private and internal fields
MemberWhat it is
private AssetReference targetAddressableThe addressable prefab to load.
private PlatformFlags targetPlatformPlatforms this runs on.

Methods​

1 private and internal method
MemberWhat it is
private async void Start()If the current platform matches, loads the addressable and instantiates it as a child.