Hi,
I’d like to know the differences/advantages/when to use either of these two methods of holding an object reference.
Thanks
Hi,
I’d like to know the differences/advantages/when to use either of these two methods of holding an object reference.
Thanks
Find() takes the first object that qualifies, so if you have multiple objects in the scene, it might take the wrong one. Also it takes some processing power to look for the object in the scene. On the other hand, if you set the object manually via the Inspector, you will have to make sure not to forget doing it. Find() will work without you thinking about it.