Skip to main content
Clarifying
Source Link
DMGregory
  • 140.8k
  • 23
  • 257
  • 401

It appears I made a typo, thank you @Zibelas for pointing that out. Instead

Instead of using FindObjectsOfTypeFindObjectsOfType I used FindObjectOfTypeFindObjectOfType.FindObjectsOfType

FindObjectsOfType returned the array, while FindObjectOfTypeFindObjectOfType returned a single object. Trying to cast that single object T to an array with as T[] caused objs to be set to null.

It appears I made a typo, thank you @Zibelas for pointing that out. Instead of using FindObjectsOfType I used FindObjectOfType.FindObjectsOfType returned the array, while FindObjectOfType returned a single object.

It appears I made a typo, thank you @Zibelas for pointing that out.

Instead of using FindObjectsOfType I used FindObjectOfType.

FindObjectsOfType returned the array, while FindObjectOfType returned a single object. Trying to cast that single object T to an array with as T[] caused objs to be set to null.

explained the error
Source Link

It appears I made a typo, thank you @Zibelas for pointing that out. Instead of using FindObjectsOfType I used FindObjectOfType.FindObjectsOfType returned the array, while FindObjectOfType returned a single object.

It appears I made a typo, thank you @Zibelas for pointing that out. Instead of using FindObjectsOfType I used FindObjectOfType.

It appears I made a typo, thank you @Zibelas for pointing that out. Instead of using FindObjectsOfType I used FindObjectOfType.FindObjectsOfType returned the array, while FindObjectOfType returned a single object.

Added the type of typo
Source Link

It appears I made a typo, thank you @Zibelas for pointing that out. Instead of using FindObjectsOfType I used FindObjectOfType.

It appears I made a typo, thank you @Zibelas for pointing that out.

It appears I made a typo, thank you @Zibelas for pointing that out. Instead of using FindObjectsOfType I used FindObjectOfType.

Source Link
Loading