Infohazard.Core 1.4.1
Infohazard Core Utility Library
Loading...
Searching...
No Matches
Infohazard.Core.TriggerVolume Class Reference

A script that makes it easy to add events to a trigger collider. More...

Classes

class  TriggerEvents
 Class that stores the UnityEvents used by a TriggerVolume. More...
 

Properties

TriggerEvents Events [get]
 UnityEvents that enable you to assign functionality in the editor. More...
 
IReadOnlyCollection< GameObject > Occupants [get]
 All objects currently inside the trigger volume. More...
 
IReadOnlyList< Collider > ControlledColliders [get]
 List of colliders to enable/disable along with this component. More...
 

Events

Action< GameObject > TriggerEntered
 Invoked when an object matching the tag filter enters the trigger. More...
 
Action< GameObject > TriggerExited
 Invoked when an object matching the tag filter exits the trigger. More...
 
Action< GameObject > AllExited
 Invoked when the last object matching the tag filter exits the trigger. More...
 

Detailed Description

A script that makes it easy to add events to a trigger collider.

Provides both UnityEvents (assignable in the inspector) and normal C# events for when an object enters or leaves the trigger, and when all objects have left the trigger. Also provides a tag filter, allowing you to control which types of object can activate it.

Property Documentation

◆ ControlledColliders

IReadOnlyList<Collider> Infohazard.Core.TriggerVolume.ControlledColliders
get

List of colliders to enable/disable along with this component.

◆ Events

TriggerEvents Infohazard.Core.TriggerVolume.Events
get

UnityEvents that enable you to assign functionality in the editor.

◆ Occupants

IReadOnlyCollection<GameObject> Infohazard.Core.TriggerVolume.Occupants
get

All objects currently inside the trigger volume.

Event Documentation

◆ AllExited

Action<GameObject> Infohazard.Core.TriggerVolume.AllExited

Invoked when the last object matching the tag filter exits the trigger.

◆ TriggerEntered

Action<GameObject> Infohazard.Core.TriggerVolume.TriggerEntered

Invoked when an object matching the tag filter enters the trigger.

◆ TriggerExited

Action<GameObject> Infohazard.Core.TriggerVolume.TriggerExited

Invoked when an object matching the tag filter exits the trigger.


The documentation for this class was generated from the following file: