void Unload() { var objects = UnityEngine.Object.FindObjectsOfType <BagRotator>(); if (objects != null) { foreach (var obj in objects) { UnityEngine.Object.Destroy(obj); } } instance = null; }
void OnServerInitialized() { instance = this; LoadVariables(); initialized = true; }