Class TypeReferenceAttribute
Specifies a options for an type reference picker in the editor. Allows to customize view or provide custom value assign policy (eg. restrict types to inherit from a given type).
Inheritance
Namespace: FlaxEngine
Assembly: FlaxEngine.CSharp.dll
Syntax
public class TypeReferenceAttribute : Attribute
Constructors
TypeReferenceAttribute(String, String)
Initializes a new instance of the TypeReferenceAttribute class.
Declaration
public TypeReferenceAttribute(string typeName = null, string checkMethod = null)
Parameters
System.String
typeName
The full name of the type to link (includes types inheriting from it). Use null or empty to skip it. |
System.String
checkMethod
The name of the function (static or member) to invoke to check if the given type is valid to assign. Function must return boolean value and have one argument of type SystemType. Use null or empty to skip it. |
TypeReferenceAttribute(Type, String)
Initializes a new instance of the TypeReferenceAttribute class.
Declaration
public TypeReferenceAttribute(Type typeName, string checkMethod = null)
Parameters
System.Type
typeName
The full name of the type to link (includes types inheriting from it). Use null or empty to skip it. |
System.String
checkMethod
The name of the function (static or member) to invoke to check if the given type is valid to assign. Function must return boolean value and have one argument of type SystemType. Use null or empty to skip it. |
Fields
CheckMethod
The name of the function (static or member) to invoke to check if the given type is valid to assign. Function must return boolean value and have one argument of type SystemType. Use null or empty to skip it.
Declaration
public string CheckMethod
Field Value
System.String
|
TypeName
The full name of the type to link (includes types inheriting from it). Use null or empty to skip it.
Declaration
public string TypeName
Field Value
System.String
|