PluginAttributeExitPoint Property

RAGE Plugin Hook Documentation

[This is preliminary documentation and is subject to change.]

Gets or sets the full name of the method to serve as exit point of the plugin (Eg. "EntryPoint.OnUnload". If null, the first found method that's static, returns void, takes a bool and is named "OnUnload" will be used.

Namespace:  Rage.Attributes
Assembly:  RagePluginHook (in RagePluginHook.dll) Version: 0.0.0.0 (0.56.1131.11510)
Syntax

public string ExitPoint { get; set; }

Property Value

Type: String
The full name (type and method) of the method to call when the plugin is unloaded (either gracefully or forcefully).
Exceptions

ExceptionCondition
ArgumentNullExceptionThrown if value is null.
Remarks

The exit point must have the following signature (access modifier and name can be anything):

private static void OnUnload(bool isTerminating)
{
}

When the plugin is unloaded, all fibers are aborted, and then a new fiber is started to execute the exit method, which means that calls to GameFiber.Sleep(), etc. are valid.

If isTerminating is true, the plugin is being forcefully unloaded, in which case sleeping is illegal. Use the value of isTerminating to determine whether you can sleep or not.

While the exit method is executed on a fiber, new fibers cannot be started once the plugin is unloading and any attempt to do so will throw an exception.

See Also

Reference