protected virtual void Awake() { if (instance == null) { instance = this; } else if (instance != this) { Destroy(gameObject); } var sdkManager = VRTK_SDKManager.instance; if (sdkManager != null && sdkManager.persistOnLoad) { DontDestroyOnLoad(gameObject); } }
protected virtual void Awake() { if (instance == null) { instance = this; } else if (instance != this) { Destroy(gameObject); } var sdkManager = VRTK_SDKManager.instance; if (sdkManager != null && sdkManager.persistOnLoad) { DontDestroyOnLoad(gameObject); } haptics = gameObject.AddComponent <VRTK_Haptics>(); objectAppearance = gameObject.AddComponent <VRTK_ObjectAppearance>(); }