private void OnDestroy() { if (s_instance == this) { s_instance = null; } }
public static void LoadFromResource(string path = null) { if (path == null) { path = DEFAULT_RESOURCE_PATH; } if ((s_instance = Resources.Load <VRModuleSettings>(path)) == null) { s_instance = CreateInstance <VRModuleSettings>(); } }