class
MonoClass
Contains information about a single Mono (managed) class.
Public
Methods
~MonoClass
GetNamespace
Returns the namespace of this class.
GetTypeName
Returns the type name of this class.
GetFullName
Returns the full name (Namespace::TypeName) of this class.
GetAssembly
Returns the assembly this class is a part of.
GetMethod
Returns an object referencing a method with the specified name and number of parameters.
GetField
Returns an object referencing a field with the specified name.
GetProperty
Returns an object referencing a property with the specified name.
GetAttribute
Returns an instance of an attribute of the specified that is part of this class.
Returns null if this class type does not have that type of attribute.
GetBaseClass
Returns the base class of this class.
Null if this class has no base.
GetMethodExact
Returns an object referencing a method, expects exact method name with parameters.
GetAllFields
Returns all fields belonging to this class.
GetAllProperties
Returns all properties belonging to this class.
GetAllMethods
Returns all methods belonging to this class.
GetAllAttributes
Gets all attributes applied to this class.
HasAttribute
Check if this class has an attribute of the type .
HasField
Check if this class has a field with the specified name.
Does not check base classes.
IsSubClassOf
Checks if this class is a sub class of the specified class.
IsInstanceOfType
Checks is the provided object instance of this class' type.
GetInstanceSize
Returns the size of an instance of this class, in bytes.
InvokeMethod
Shortcut for invoking a method on a class.
Invokes a method with the provided name and number of parameters.
- name
- Name of the method to invoke (no parameter list or brackets.
- instance
- Object instance on invoke the method on. Null if method is static.
- params
- Array containing pointers to method parameters. Array length must be equal to number of parameters. Can be null if method has no parameters. For value types parameters should be pointers to the values and for reference types they should be pointers to MonoObject.
- numParams
- Number of parameters the method accepts.
AddInternalCall
Hooks up an internal call that will trigger the provided method callback when the managed method with the specified name is called.
If name is not valid this will silently fail.
CreateInstance
Creates a new instance of this class and optionally constructs it.
If you don't construct the instance then you should invoke the ".ctor" method manually afterwards.
CreateInstance
Creates a new instance of this class and then constructs it using the constructor with the specified number of parameters.
- params
- Array containing pointers to constructor parameters. Array length must be equal to number of parameters.
- numParams
- Number of parameters the constructor accepts.
CreateInstance
Creates a new instance of this class and then constructs it using the constructor with the specified signature.
- ctorSignature
- Method signature. Example: "Vector2,int[]"
- params
- Array containing pointers to constructor parameters. Array length must be equal to number of parameters.
GetInternalClass
Returns the internal mono representation of the class.
staticConstruct
Invokes the parameterless constructor on the provided object.