Skip to main content

SpawnerGrab

A class in Root.Township, the global namespace.

Server: when a player grabs this object's pickup, spawns a fresh copy of prefab and swaps it into their hand, like taking an item from an endless pile.

Constructors​

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

Fields​

1 private and internal field
MemberWhat it is
private NetworkPrefab prefabThe prefab handed to the grabbing player.

Methods​

MemberWhat it is
void SpawnToGrab(Interactable interactable, Interactor interactor)Server: spawns prefab here and replaces the grabbed pickup with it. The no-argument overload uses this entity's pickup and its first holder.
void SpawnToGrab()Server: spawns prefab here and replaces the grabbed pickup with it. The no-argument overload uses this entity's pickup and its first holder.