private static void Create() { instance = GameObject.Find(DataLink.Name); if (instance == null) { Logger.debug("Creating reactor instance.."); dataLink = new DataLink(); instance = new GameObject(DataLink.Name, typeof(KspReactor)); } }
private static void Destroy() { if (instance != null) { Logger.debug("Destroying reactor instance.."); dataLink.Destroy(); dataLink = null; GameObject.Destroy(instance); instance = null; } }