-
Notifications
You must be signed in to change notification settings - Fork 0
RequiresField
wwwDayDream edited this page May 9, 2024
·
2 revisions
This attribute is used to specify that your plugin requires a specific field to be present (and so we will create it).
Usage: This attribute can be applied multiple times to an assembly.
Parameters:
-
targetType (
Type
): The type to inject the field onto. -
fieldName (
string
): The name of the required field. -
fieldType (
Type
): The type of the required field.
Example:
[assembly: RequiresField(typeof(Player), "exampleField", typeof(float))]
Creates
private float exampleField;