void Awake() { viewManager = GetComponent<NetViewManager>(); lock (LockObj) { if (instance == null) instance = this; } }
private static PickupSpawner CreateInstance() { lock (LockObj) { if (applicationIsQuitting) return null; return instance ?? (instance = new GameObject("_PickupSpawner").AddComponent<PickupSpawner>()); } }