void Start() { // Load scenes list from file ReadSceneList(); // Start at the root level of the scene menu system currentNode = rootNode; // Configure top level menu items in the inspector. Inspector = OVRInspector.instance; Inspector.RegisterContext(this, (int)InspectorContext.Help, true); Inspector.RegisterContext(this, (int)InspectorContext.SceneList, true); // Keep the inspector around as we load scenes DontDestroyOnLoad(Inspector.gameObject); // pop the inspector up now and show the intro text Inspector.Show(); Inspector.SetDocTextFromFile(introFile); // It's easy to accidentally scroll the docs as you put the headset on so // disable the docs scrolling briefly StartCoroutine(DisableDocsScrollingForStartup()); InitReporting(); #if !UNITY_ANDROID || UNITY_EDITOR // Lock the cursor Cursor.lockState = CursorLockMode.Locked; Cursor.visible = false; #endif }
// Show help screen public void BuildHelpUI(OVRInspector Inspector) { Inspector.SetDocTextFromFile(helpFile); Inspector.AddButton("Show Intro Docs", delegate { ShowIntroDocs(); }); if (Inspector.ScenePanelPresent()) { Inspector.AddButton("Show Scene Docs", delegate { GotoSceneControls(); }); } }
private void ShowIntroDocs() { Inspector.SetDocTextFromFile(introFile); }