In the method hasItem we use the ReferenceEquals method on an object. What is object, can we use it to call various methods when we need them?
object
is this base of all things. almost everything in C# is an object
. If it is a class, it is an object
. ReferenceEquals
is a static method on object
. You can call any public method that is a member of object
, just like you can call any public method on a MonoBehaviour
that is a member of that MonoBehaviour
1 Like
thnx !
This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.