Skip to content

Commit 5b268ec

Browse files
author
Stephen Hodgson
committed
explicit Instantiation
1 parent 97df5c7 commit 5b268ec

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Assets/HoloToolkit/Utilities/Scripts/SceneLauncher.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ private void Start()
6363
SceneLauncherBuildIndex = SceneManager.GetActiveScene().buildIndex;
6464

6565
// Determine the size of the buttons. Instantiate one of them so that we can check its bounds.
66-
var sceneButtonForSize = Instantiate(SceneButtonPrefab);
66+
SceneLauncherButton sceneButtonForSize = Instantiate(SceneButtonPrefab);
6767
var sceneButtonForSizeCollider = sceneButtonForSize.GetComponent<Collider>();
6868

6969
if (sceneButtonForSizeCollider != null)
@@ -90,7 +90,7 @@ private void CreateSceneButton(GameObject buttonParent, int sceneIndex)
9090
var scene = SceneManager.GetSceneByBuildIndex(sceneIndex);
9191
Debug.Assert(SceneManager.GetSceneByName(sceneName) == scene);
9292

93-
var sceneButton = Instantiate(SceneButtonPrefab, GetButtonPosition(sceneIndex, sceneMapping.Length), Quaternion.identity, buttonParent.transform);
93+
SceneLauncherButton sceneButton = Instantiate(SceneButtonPrefab, GetButtonPosition(sceneIndex, sceneMapping.Length), Quaternion.identity, buttonParent.transform);
9494
sceneButton.SceneIndex = sceneIndex;
9595
sceneButton.SceneName = sceneName;
9696
sceneButton.MenuReference = ButtonSpawnLocation;

0 commit comments

Comments
 (0)