Search Results for

    Show / Hide Table of Contents

    Interface IScriptType

    Interface for custom scripting languages type object with metadata.

    Namespace: FlaxEditor.Scripting
    Assembly: FlaxEngine.CSharp.dll
    Syntax
    public interface IScriptType

    Properties

    BaseType

    Gets the type from which the current type directly inherits.

    Declaration
    ScriptType BaseType { get; }
    Property Value
    FlaxEditor.Scripting.ScriptType

    CanCreateInstance

    Gets a value indicating whether can create default instance of this type via CreateInstance() method.

    Declaration
    bool CanCreateInstance { get; }
    Property Value
    System.Boolean

    ContentItem

    Gets the editor content item that corresponds to this script type. Can be null.

    Declaration
    ContentItem ContentItem { get; }
    Property Value
    FlaxEditor.Content.ContentItem

    IsAbstract

    Gets a value indicating whether the type is abstract and must be overridden.

    Declaration
    bool IsAbstract { get; }
    Property Value
    System.Boolean

    IsArray

    Gets a value indicating whether the type is an array.

    Declaration
    bool IsArray { get; }
    Property Value
    System.Boolean

    IsClass

    Gets a value indicating whether the type is a class or a delegate; that is, not a value type or interface.

    Declaration
    bool IsClass { get; }
    Property Value
    System.Boolean

    IsEnum

    Gets a value indicating whether the type represents an enumeration.

    Declaration
    bool IsEnum { get; }
    Property Value
    System.Boolean

    IsGenericType

    Gets a value indicating whether the type is generic type and is used as a template.

    Declaration
    bool IsGenericType { get; }
    Property Value
    System.Boolean

    IsInterface

    Gets a value indicating whether the type is an interface.

    Declaration
    bool IsInterface { get; }
    Property Value
    System.Boolean

    IsPointer

    Gets a value indicating whether the type is a pointer and value is represented by the pointer to the data.

    Declaration
    bool IsPointer { get; }
    Property Value
    System.Boolean

    IsPublic

    Gets a value indicating whether the type is declared public.

    Declaration
    bool IsPublic { get; }
    Property Value
    System.Boolean

    IsReference

    Gets a value indicating whether the type is a reference and value is represented by the valid pointer to the data.

    Declaration
    bool IsReference { get; }
    Property Value
    System.Boolean

    IsSealed

    Gets a value indicating whether the type is declared sealed and cannot be overridden.

    Declaration
    bool IsSealed { get; }
    Property Value
    System.Boolean

    IsStatic

    Gets a value indicating whether the type is static.

    Declaration
    bool IsStatic { get; }
    Property Value
    System.Boolean

    IsValueType

    Gets a value indicating whether the type is a value type (basic type, enumeration or a structure).

    Declaration
    bool IsValueType { get; }
    Property Value
    System.Boolean

    Name

    Gets a type name (eg. name of the class or enum without leading namespace).

    Declaration
    string Name { get; }
    Property Value
    System.String

    Namespace

    Gets a full namespace of the type.

    Declaration
    string Namespace { get; }
    Property Value
    System.String

    TypeName

    Gets a full name of the type including leading namespace and any nested types names. Uniquely identifies the type and can be used to find it via GetType(String).

    Declaration
    string TypeName { get; }
    Property Value
    System.String

    Methods

    CreateInstance()

    Creates the instance of the object of this type (or throws exception in case of error).

    Declaration
    object CreateInstance()
    Returns
    System.Object

    The created instance of the object.

    GetAttributes(Boolean)

    When overridden in a derived class, returns an array of all custom attributes applied to this member.

    Declaration
    object[] GetAttributes(bool inherit)
    Parameters
    System.Boolean inherit

    true to search this member's inheritance chain to find the attributes; otherwise, false.

    Returns
    System.Object[]

    An array that contains all the custom attributes applied to this member, or an array with zero elements if no attributes are defined.

    GetFields(BindingFlags)

    When overridden in a derived class, searches for the fields defined for the current type using the specified binding constraints.

    Declaration
    ScriptMemberInfo[] GetFields(BindingFlags bindingAttr)
    Parameters
    System.Reflection.BindingFlags bindingAttr

    A bitmask comprised of one or more System.Reflection.BindingFlags that specify how the search is conducted.-or- Zero (System.Reflection.BindingFlags.Default), to return an empty array.

    Returns
    FlaxEditor.Scripting.ScriptMemberInfo[]

    An array of member objects representing all fields defined for the current type that match the specified binding constraints.-or- An empty array of type member, if no fields are defined for the current type, or if none of the defined fields match the binding constraints.

    GetMembers(BindingFlags)

    When overridden in a derived class, searches for the members defined for the current type using the specified binding constraints.

    Declaration
    ScriptMemberInfo[] GetMembers(BindingFlags bindingAttr)
    Parameters
    System.Reflection.BindingFlags bindingAttr

    A bitmask comprised of one or more System.Reflection.BindingFlags that specify how the search is conducted.-or- Zero (System.Reflection.BindingFlags.Default), to return an empty array.

    Returns
    FlaxEditor.Scripting.ScriptMemberInfo[]

    An array of member objects representing all members defined for the current type that match the specified binding constraints.-or- An empty array of type member, if no members are defined for the current type, or if none of the defined members match the binding constraints.

    GetMembers(String, MemberTypes, BindingFlags)

    Searches for the specified members of the specified member type, using the specified binding constraints.

    Declaration
    ScriptMemberInfo[] GetMembers(string name, MemberTypes type, BindingFlags bindingAttr)
    Parameters
    System.String name

    The string containing the name of the members to get.

    System.Reflection.MemberTypes type

    The value to search for.

    System.Reflection.BindingFlags bindingAttr

    A bitmask comprised of one or more System.Reflection.BindingFlags that specify how the search is conducted.-or- Zero, to return an empty array.

    Returns
    FlaxEditor.Scripting.ScriptMemberInfo[]

    An array of member objects representing the public members with the specified name, if found; otherwise, an empty array.

    GetMethods(BindingFlags)

    When overridden in a derived class, searches for the methods defined for the current type using the specified binding constraints.

    Declaration
    ScriptMemberInfo[] GetMethods(BindingFlags bindingAttr)
    Parameters
    System.Reflection.BindingFlags bindingAttr

    A bitmask comprised of one or more System.Reflection.BindingFlags that specify how the search is conducted.-or- Zero (System.Reflection.BindingFlags.Default), to return an empty array.

    Returns
    FlaxEditor.Scripting.ScriptMemberInfo[]

    An array of member objects representing all methods defined for the current type that match the specified binding constraints.-or- An empty array of type member, if no methods are defined for the current type, or if none of the defined methods match the binding constraints.

    GetProperties(BindingFlags)

    When overridden in a derived class, searches for the properties defined for the current type using the specified binding constraints.

    Declaration
    ScriptMemberInfo[] GetProperties(BindingFlags bindingAttr)
    Parameters
    System.Reflection.BindingFlags bindingAttr

    A bitmask comprised of one or more System.Reflection.BindingFlags that specify how the search is conducted.-or- Zero (System.Reflection.BindingFlags.Default), to return an empty array.

    Returns
    FlaxEditor.Scripting.ScriptMemberInfo[]

    An array of member objects representing all properties defined for the current type that match the specified binding constraints.-or- An empty array of type member, if no properties are defined for the current type, or if none of the defined properties match the binding constraints.

    HasAttribute(Type, Boolean)

    Determines whether the specified attribute was defined for this type.

    Declaration
    bool HasAttribute(Type attributeType, bool inherit)
    Parameters
    System.Type attributeType

    The attribute type.

    System.Boolean inherit

    true to search this member's inheritance chain to find the attributes; otherwise, false.

    Returns
    System.Boolean

    true if the specified type has attribute; otherwise, false.

    HasInterface(ScriptType)

    Determines whether the current type implements the specified interface type. Checks this type, its base classes and implemented interfaces base interfaces too.

    Declaration
    bool HasInterface(ScriptType c)
    Parameters
    FlaxEditor.Scripting.ScriptType c

    The type of the interface to check.

    Returns
    System.Boolean

    True if this type implements the given interface, otherwise false.

    TrackLifetime(Action<ScriptType>)

    Registers delegate to be invoked upon script type disposal (except hot-reload in Editor via ScriptsReload). For example, can happen when user deleted Visual Script asset.

    Declaration
    void TrackLifetime(Action<ScriptType> disposing)
    Parameters
    System.Action<FlaxEditor.Scripting.ScriptType> disposing

    Event to call when script type gets disposed (eg. removed asset).

    Extension Methods

    Extensions.ReflectiveCompare<T>(T, T)
    Extensions.RawClone<T>(T)
    In This Article
    Back to top Copyright © 2012-2024 Wojciech Figat