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

◆ Null

readonly NullComparer Sisus.NullExtensions.Null = new NullComparer()
static

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

using static Sisus.NullExtensions;
public class EventListener : MonoBehaviour{IEvent}, IEventListener
{
private IEvent trigger;
protected override void Init(IEventBroadcaster trigger)
{
this.trigger = trigger;
}
private void OnEnable()
{
trigger.AddListener(this);
}
private void OnEvent()
{
Debug.Log($"{name} heard event {trigger}.");
}
private void OnDisable()
{
if(trigger != Null)
{
trigger.RemoveListener(this);
}
}
}
static readonly NullComparer Null
A value against which any object can be compared to determine whether it is null or an Object which h...
Definition NullExtensions.cs:95
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