- Home /
Question by
hanisherif1997_unity · May 16 at 11:21 AM ·
c#
Instances using the new keyword.
This is a very basic question. I cannot wrap my head around the concept of instances/objects. I see the usage of new keyword to create instances of a class and then access the members within the class using dot symbol. But then again i have seen accessing members of a class without using the new keyword.
Why is this so? Does unity create instances when u use a public fields (or serialized private fields) and assign references to the script in the inspector? is it mandatory to create an instance to access members of any class?
Comment
Your answer
