Meta information for script calls, consumed by ScriptHandler attributed methods in service classes.
More...
|
NwObject? | ObjectSelf [get] |
| Gets the object that is currently running on this script. More...
|
|
string | ScriptName [get] |
| Gets the name of the script that is being executing. More...
|
|
ScriptParams | ScriptParams [get] |
| Gets the parameters set for this script call.
NOTE: variable values are NOT guaranteed outside of this script context, and must be read before any async method/lambda is invoked. More...
|
|
EventScriptType | ScriptType [get] |
| Gets the event that triggered the execution of this script. More...
|
|
Meta information for script calls, consumed by ScriptHandler attributed methods in service classes.
◆ TryGetEvent< TEvent >()
bool Anvil.API.CallInfo.TryGetEvent< TEvent > |
( |
[NotNullWhen(true)] out TEvent? |
eventData | ) |
|
|
inline |
Attempts to get the current running event.
- Parameters
-
eventData | When this method returns, contains the created event if the current event is a TEvent. Otherwise, returns the default value for TEvent. |
- Template Parameters
-
TEvent | The expected event type. Only events attributed with GameEventAttribute are supported. |
- Returns
- true if the current running script is a TEvent, otherwise false.
- Type Constraints
-
TEvent | : | IEvent | |
TEvent | : | new() | |
◆ ObjectSelf
Gets the object that is currently running on this script.
◆ ScriptName
string Anvil.API.CallInfo.ScriptName |
|
get |
Gets the name of the script that is being executing.
◆ ScriptParams
Gets the parameters set for this script call.
NOTE: variable values are NOT guaranteed outside of this script context, and must be read before any async method/lambda is invoked.
◆ ScriptType
EventScriptType Anvil.API.CallInfo.ScriptType |
|
get |
Gets the event that triggered the execution of this script.
The documentation for this class was generated from the following file:
- NWN.Anvil/src/main/API/Scripts/CallInfo.cs