Skip to content

Commit 3dea86a

Browse files
Merge pull request #1035 from Microsoft/revert-1033-Dev_Unity_2017.2.0
Revert "Instance isn't found if class is on a disabled GameObject."
2 parents 0efe92c + d2e048c commit 3dea86a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Assets/HoloToolkit/Utilities/Scripts/SingleInstance.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public static T Instance
1818
{
1919
if (_Instance == null)
2020
{
21-
T[] objects = Resources.FindObjectsOfTypeAll<T>();
21+
T[] objects = FindObjectsOfType<T>();
2222
if (objects.Length != 1)
2323
{
2424
Debug.LogErrorFormat("Expected exactly 1 {0} but found {1}", typeof(T).ToString(), objects.Length);

0 commit comments

Comments
 (0)