this
The this
keyword provides a way for the object instance that is currently executing code to refer to itself.
this in Unity
In Unity, most custom code that we write is to create script components. Therefore, in Unity, this
usually refers to the script component that is executing the current code. Common uses include accessing a different component, or identifying the associated gameObject.
The this keyword refers to the current instance of the class ...
The MSDN reference provides several usage examples
Last updated