Skip to content

Commit e3d9676

Browse files
committed
Version 1.2.1
1 parent e89863f commit e3d9676

File tree

4 files changed

+119
-0
lines changed

4 files changed

+119
-0
lines changed
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
//======= Copyright (c) Valve Corporation, All rights reserved. ===============
2+
//
3+
// Purpose: Preferences pane for how SteamVR plugin behaves.
4+
//
5+
//=============================================================================
6+
7+
using UnityEngine;
8+
using UnityEditor;
9+
10+
public class SteamVR_Preferences
11+
{
12+
/// <summary>
13+
/// Should SteamVR automatically enable VR when opening Unity or pressing play.
14+
/// </summary>
15+
public static bool AutoEnableVR
16+
{
17+
get
18+
{
19+
return EditorPrefs.GetBool("SteamVR_AutoEnableVR", true);
20+
}
21+
set
22+
{
23+
EditorPrefs.SetBool("SteamVR_AutoEnableVR", value);
24+
}
25+
}
26+
27+
[PreferenceItem("SteamVR")]
28+
static void PreferencesGUI()
29+
{
30+
EditorGUILayout.BeginVertical();
31+
EditorGUILayout.Space();
32+
33+
// Automatically Enable VR
34+
{
35+
string title = "Automatically Enable VR";
36+
string tooltip = "Should SteamVR automatically enable VR on launch and play?";
37+
AutoEnableVR = EditorGUILayout.Toggle(new GUIContent(title, tooltip), AutoEnableVR);
38+
string helpMessage = "To enable VR manually:\n";
39+
helpMessage += "- go to Edit -> Project Settings -> Player,\n";
40+
helpMessage += "- tick 'Virtual Reality Supported',\n";
41+
helpMessage += "- make sure OpenVR is in the 'Virtual Reality SDKs' list.";
42+
EditorGUILayout.HelpBox(helpMessage, MessageType.Info);
43+
}
44+
45+
EditorGUILayout.EndVertical();
46+
}
47+
}
48+

Assets/SteamVR/Editor/SteamVR_Preferences.cs.meta

Lines changed: 12 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
14.5 KB
Loading

Assets/SteamVR/InteractionSystem/Core/Icons/vr_interaction_system.png.meta

Lines changed: 59 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)