Init(args)
Scripting Reference
Loading...
Searching...
No Matches

◆ NullOrInactive

readonly NullOrInactiveComparer Sisus.NullExtensions.NullOrInactive = new NullOrInactiveComparer()
static

A value against which any object can be compared to determine whether it is null or an Object which is inactive or has been destroyed.

using static Sisus.NullExtensions;
public class LookAt : MonoBehaviour{ITrackable}
{
private ITrackable target;
protected override void Init(ITrackable target) => this.target = target;
private void Update()
{
if(target != NullOrInactive)
{
transform.LookAt(target.Position);
}
}
}
static readonly NullOrInactiveComparer NullOrInactive
A value against which any object can be compared to determine whether it is null or an Object which i...
Definition NullExtensions.cs:123
Helper class for checking whether the value of a variable that is of object, interface or generic typ...
Definition NullExtensions.cs:57
Definition Any.cs:16
Definition Any.cs:16