Skip to content

Commit 3be0532

Browse files
StephenHodgsonStephen Hodgson
authored andcommitted
updated scene config window
1 parent 94c64de commit 3be0532

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

Assets/HoloToolkit/Utilities/Scripts/Editor/SceneSettingsWindow.cs

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ namespace HoloToolkit.Unity
1212
public class SceneSettingsWindow : AutoConfigureWindow<SceneSettingsWindow.SceneSetting>
1313
{
1414
/// <summary>
15-
/// Can be found in the meta file of the camera prefab. We use the GUID instead of a path in case people move the toolkit folders & assets around in their own projects.
15+
/// Can be found in the meta file of the camera prefab. We use the GUID in case people move the toolkit folders & assets around in their own projects.
1616
/// TODO: Update prefab GUID to point to MixedRealityCamera.
1717
/// </summary>
1818
private const string CameraPrefabGUID = "d379ed0a5618c9f479f58bd83a2d0ad3";
@@ -33,10 +33,7 @@ protected override void ApplySettings()
3333
{
3434
if (Values[SceneSetting.AddMixedRealityCamera])
3535
{
36-
DestroyImmediate(Camera.main.gameObject);
37-
PrefabUtility.InstantiatePrefab(
38-
AssetDatabase.LoadAssetAtPath<GameObject>(
39-
AssetDatabase.GUIDToAssetPath(CameraPrefabGUID)));
36+
Instantiate(AssetDatabase.LoadAssetAtPath<GameObject>(AssetDatabase.GUIDToAssetPath(CameraPrefabGUID)));
4037
}
4138

4239
var mainCamera = CameraCache.Refresh(Camera.main);
@@ -58,7 +55,7 @@ protected override void ApplySettings()
5855

5956
protected override void LoadSettings()
6057
{
61-
for (int i = 0; i <= (int)SceneSetting.CameraToOrigin; i++)
58+
for (int i = (int)SceneSetting.CameraToOrigin; i <= (int)SceneSetting.CameraToOrigin; i++)
6259
{
6360
Values[(SceneSetting)i] = true;
6461
}
@@ -73,9 +70,8 @@ protected override void LoadStrings()
7370
Names[SceneSetting.AddMixedRealityCamera] = "Add the Mixed Reality Camera Prefab";
7471
Descriptions[SceneSetting.AddMixedRealityCamera] =
7572
"Recommended\n\n" +
76-
"Adds the Mixed Reality Camera Prefab to the scene. This prefab comes preset with all the components and options for automatically handling Occluded and Transparent " +
77-
"Mixed Reality Applications.\n\n" +
78-
"<color=#ff0000ff><b>Warning!</b></color> This will delete any existing cameras in your scene with the \"<b>Main Camera</b>\" tag!";
73+
"Adds the Mixed Reality Camera Prefab to the scene.\n\n" +
74+
"The prefab comes preset with all the components and options for automatically handling Occluded and Transparent Mixed Reality Applications.";
7975

8076
Names[SceneSetting.CameraToOrigin] = "Move Camera to Origin";
8177
Descriptions[SceneSetting.CameraToOrigin] =

0 commit comments

Comments
 (0)