Trigger Wrapper

How to use

You can create custom scripts that are based on this class in order to automate the process of changing the properties of the highlighter from code, based on the state of the HighlighterTrigger script. This can make it easier to use the HighlighterTrigger script as you won't need to manually subscribe and unsubscribe to its events. Essentially, this class simplifies the process of using the HighlighterTrigger script.

You should use it as a base class and then override specific functions that you would like to use. Again, the best way to understand it is to look at the examples.

C# API

protected HighlighterTrigger highlighterTrigger - Use it to check the status of highlighterTrigger.IsCurrentlyTriggered.

protected Highlighter highlighter - Modify properties of this object.

Virtual Functions:

protected virtual void OnEnable() - Subscribes to HighlighterTrigger events. When overriding in child class, call base.OnEnable()

protected virtual void OnDisable() - Unsubscribes to HighlighterTrigger events. When overriding in child class, call base.OnDisable()

protected virtual void TriggeringStarted() - Override the function and add your custom code.

protected virtual void TriggeringEnded() - Override the function and add your custom code.

protected virtual void HitTrigger() - Override the function and add your custom code.

Last updated