Components
Components are a great, codeless approach to sending reporting statements by utilizing UnityEvents.
The Activity Reporter’s Report()
method will send a statement for the linked activity with the provided result. If no arguments are provided to the method, the result set in the inspector will be used. However, this result can be overridden by using the Report method overloads.
Overload | Description |
---|---|
bool success |
Result with just success / failure |
Result result |
Struct with full scope of result and scoring options |
ResultBuilder result |
Uses a ResultBuilder asset for the result |
The Action Reporter’s Report()
method will send an action statement for the linked activity using the verb and subject set in the inspector.
A result builder asset can be used to create a result as an Object that can be linked in a UnityEvent. The result builder shares the same result configuration interface as the action reporter.
Below you can see a Unity Button that is using a Activity Reporter’s Report methods with a result builder. This can be useful when you to set up one activity reporter but take a codeless approach to sending different results.