docs: updated for variable access warning suppression

This commit is contained in:
alterNERDtive 2022-07-12 23:00:32 +02:00
parent cf3d34389d
commit c1abfe5453
No known key found for this signature in database
GPG key ID: 9656B56456F5FCD7

View file

@ -93,6 +93,19 @@ private static void TestContext(VoiceAttackInvokeProxyClass vaProxy)
}
```
This will log a warning to the VoiceAttack event log.
You can, if you are sure that you will _not_ run into a race condition, suppress
said warning:
```csharp
[Context("test")]
private static void TestContext(VoiceAttackInvokeProxyClass vaProxy)
{
string test = Plugin.Get<string>("~test", suppressWarning: true);
}
```
## Getting Variable Values
To get the value of a variable, invoke the `Get<T>(string name)` method of your