Method OrNull
|
Improve this Doc
View Source
OrNull(GameObject)
Facilitates use of null propagation operator for unity GameObjects by respecting op_equality.
Declaration
public static GameObject OrNull(this GameObject @this)
Parameters
Type |
Name |
Description |
GameObject |
this |
this |
Returns
Type |
Description |
GameObject |
Returns null when GameObject.op_equality returns false. |
|
Improve this Doc
View Source
OrNull<T>(T)
Facilitates use of null propagation operator for unity MonBehaviours by respecting op_equality.
Declaration
public static T OrNull<T>(this T @this) where T : UnityEngine.Object
Parameters
Type |
Name |
Description |
T |
this |
this |
Returns
Type |
Description |
T |
Returns null when MonoBehaviours.op_equality returns false. |
Type Parameters
Name |
Description |
T |
Any type that inherits MonoBehaviour |