Timeline for How to access a variable from another script in Unity c#
Current License: CC BY-SA 3.0
2 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Aug 16, 2024 at 7:58 | comment | added | DMGregory♦ |
Note that now there's the faster method FindAnyObjectByType() which should normally be used in place of FindObjectOfType(). If you need to the exact behaviour of the old method (always getting the first object when there are many options), use FindFirstObjectByType(). This makes it more explicit when the sorting is needed/not.
|
|
| Mar 20, 2016 at 2:34 | history | answered | Hamza Hasan | CC BY-SA 3.0 |