Search Results for

    Show / Hide Table of Contents

    Class EObject

    The base class of all Exiled objects.

    Inheritance
    System.Object
    TypeCastObject<EObject>
    EObject
    EActor
    TickComponent
    Inherited Members
    TypeCastObject<EObject>.Cast<TObject>()
    TypeCastObject<EObject>.Cast<TObject>(TObject)
    TypeCastObject<EObject>.As<TObject>()
    TypeCastObject<EObject>.Is<TObject>(TObject)
    System.Object.ToString()
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetType()
    System.Object.MemberwiseClone()
    Namespace: Exiled.API.Features.Core
    Assembly: Exiled.API.dll
    Syntax
    public abstract class EObject : TypeCastObject<EObject>

    Constructors

    | Improve this Doc View Source

    EObject()

    Initializes a new instance of the EObject class.

    Declaration
    protected EObject()
    | Improve this Doc View Source

    EObject(GameObject)

    Initializes a new instance of the EObject class.

    Declaration
    protected EObject(GameObject gameObject = null)
    Parameters
    Type Name Description
    UnityEngine.GameObject gameObject

    Properties

    | Improve this Doc View Source

    Base

    Gets or sets the base UnityEngine.GameObject.

    Declaration
    public GameObject Base { get; set; }
    Property Value
    Type Description
    UnityEngine.GameObject
    | Improve this Doc View Source

    IsEditable

    Gets or sets a value indicating whether the EObject values can be edited.

    Declaration
    public bool IsEditable { get; set; }
    Property Value
    Type Description
    System.Boolean
    | Improve this Doc View Source

    Name

    Gets or sets the name of the EObject instance.

    Declaration
    public string Name { get; set; }
    Property Value
    Type Description
    System.String
    | Improve this Doc View Source

    RegisteredTypes

    Gets all the registered EObject types.

    Declaration
    public static IReadOnlyDictionary<Type, List<string>> RegisteredTypes { get; }
    Property Value
    Type Description
    System.Collections.Generic.IReadOnlyDictionary<System.Type, System.Collections.Generic.List<System.String>>
    | Improve this Doc View Source

    Tag

    Gets or sets the tag of the EObject instance.

    Declaration
    public string Tag { get; set; }
    Property Value
    Type Description
    System.String

    Methods

    | Improve this Doc View Source

    CreateDefaultSubobject(Type, Object[])

    Creates a new instance of the EObject class.

    Declaration
    public static EObject CreateDefaultSubobject(Type type, params object[] parameters)
    Parameters
    Type Name Description
    System.Type type

    The EObject type.

    System.Object[] parameters

    The parameters to initialize the object.

    Returns
    Type Description
    EObject

    The new EObject instance.

    | Improve this Doc View Source

    CreateDefaultSubobject(Type, GameObject, String)

    Creates a new instance of the EObject class.

    Declaration
    public static EObject CreateDefaultSubobject(Type type, GameObject gameObject, string name)
    Parameters
    Type Name Description
    System.Type type

    The EObject type.

    UnityEngine.GameObject gameObject
    System.String name

    The name to be given to the new EObject instance.

    Returns
    Type Description
    EObject

    The new EObject instance.

    | Improve this Doc View Source

    CreateDefaultSubobject(Type, GameObject, String, Object[])

    Creates a new instance of the EObject class.

    Declaration
    public static EObject CreateDefaultSubobject(Type type, GameObject gameObject, string name, params object[] parameters)
    Parameters
    Type Name Description
    System.Type type

    The EObject type.

    UnityEngine.GameObject gameObject
    System.String name

    The name to be given to the new EObject instance.

    System.Object[] parameters

    The parameters to initialize the object.

    Returns
    Type Description
    EObject

    The new EObject instance.

    | Improve this Doc View Source

    CreateDefaultSubobject<T>()

    Creates a new instance of the EObject class.

    Declaration
    public static T CreateDefaultSubobject<T>()
    
        where T : EObject
    Returns
    Type Description
    T

    The new EObject instance.

    Type Parameters
    Name Description
    T

    The cast EObject type.

    | Improve this Doc View Source

    CreateDefaultSubobject<T>(Object[])

    Creates a new instance of the EObject class.

    Declaration
    public static T CreateDefaultSubobject<T>(params object[] parameters)
    
        where T : EObject
    Parameters
    Type Name Description
    System.Object[] parameters

    The parameters to initialize the object.

    Returns
    Type Description
    T

    The new EObject instance.

    Type Parameters
    Name Description
    T

    The EObject type to cast.

    | Improve this Doc View Source

    CreateDefaultSubobject<T>(Type)

    Creates a new instance of the EObject class.

    Declaration
    public static T CreateDefaultSubobject<T>(Type type)
    
        where T : EObject
    Parameters
    Type Name Description
    System.Type type

    The EObject type.

    Returns
    Type Description
    T

    The new EObject instance.

    Type Parameters
    Name Description
    T

    The cast EObject type.

    | Improve this Doc View Source

    CreateDefaultSubobject<T>(Type, GameObject, String)

    Creates a new instance of the EObject class.

    Declaration
    public static T CreateDefaultSubobject<T>(Type type, GameObject gameObject, string name)
    
        where T : EObject
    Parameters
    Type Name Description
    System.Type type

    The EObject type.

    UnityEngine.GameObject gameObject
    System.String name

    The name to be given to the new EObject instance.

    Returns
    Type Description
    T

    The new EObject instance.

    Type Parameters
    Name Description
    T

    The cast EObject type.

    | Improve this Doc View Source

    CreateDefaultSubobject<T>(Type, GameObject, String, Object[])

    Creates a new instance of the EObject class.

    Declaration
    public static T CreateDefaultSubobject<T>(Type type, GameObject gameObject, string name, params object[] parameters)
    
        where T : EObject
    Parameters
    Type Name Description
    System.Type type

    The EObject type.

    UnityEngine.GameObject gameObject
    System.String name

    The name to be given to the new EObject instance.

    System.Object[] parameters

    The parameters to initialize the object.

    Returns
    Type Description
    T

    The new EObject instance.

    Type Parameters
    Name Description
    T

    The cast EObject type.

    | Improve this Doc View Source

    CreateDefaultSubobject<T>(GameObject, String)

    Creates a new instance of the EObject class.

    Declaration
    public static T CreateDefaultSubobject<T>(GameObject gameObject, string name)
    
        where T : EObject
    Parameters
    Type Name Description
    UnityEngine.GameObject gameObject
    System.String name

    The name to be given to the new EObject instance.

    Returns
    Type Description
    T

    The new EObject instance.

    Type Parameters
    Name Description
    T

    The EObject type.

    | Improve this Doc View Source

    CreateDefaultSubobject<T>(GameObject, String, Object[])

    Creates a new instance of the EObject class.

    Declaration
    public static T CreateDefaultSubobject<T>(GameObject gameObject, string name, params object[] parameters)
    
        where T : EObject
    Parameters
    Type Name Description
    UnityEngine.GameObject gameObject
    System.String name

    The name to be given to the new EObject instance.

    System.Object[] parameters

    The parameters to initialize the object.

    Returns
    Type Description
    T

    The new EObject instance.

    Type Parameters
    Name Description
    T

    The EObject type.

    | Improve this Doc View Source

    Destroy()

    Destroys the current EObject instance.

    Declaration
    public void Destroy()
    | Improve this Doc View Source

    Destroy(Boolean)

    Declaration
    protected virtual void Destroy(bool destroying)
    Parameters
    Type Name Description
    System.Boolean destroying
    | Improve this Doc View Source

    DestroyActiveObject(Type, GameObject)

    Destroys an active EObject instance given the specified UnityEngine.GameObject.

    Declaration
    public static bool DestroyActiveObject(Type type, GameObject gameObject)
    Parameters
    Type Name Description
    System.Type type

    The type of the object.

    UnityEngine.GameObject gameObject

    The UnityEngine.GameObject belonging to the object.

    Returns
    Type Description
    System.Boolean

    true if the object was destroyed; otherwise, false.

    | Improve this Doc View Source

    DestroyActiveObject<T>(GameObject)

    Destroys an active EObject instance of type T given the specified UnityEngine.GameObject.

    Declaration
    public static bool DestroyActiveObject<T>(GameObject gameObject)
    
        where T : EObject
    Parameters
    Type Name Description
    UnityEngine.GameObject gameObject

    The UnityEngine.GameObject belonging to the EObject instance to be destroyed.

    Returns
    Type Description
    System.Boolean

    true if the object was destroyed; otherwise, false.

    Type Parameters
    Name Description
    T

    The T type to look for.

    | Improve this Doc View Source

    DestroyActiveObjectsOfType<T>()

    Destroys all the active EObject instances of type T.

    Declaration
    public static void DestroyActiveObjectsOfType<T>()
    
        where T : EObject
    Type Parameters
    Name Description
    T

    The T type to look for.

    | Improve this Doc View Source

    DestroyAllObjects()

    Destroys all the active EObject instances.

    Declaration
    public static void DestroyAllObjects()
    | Improve this Doc View Source

    DestroyAllObjectsOfType<T>()

    Destroys all the active T EObject instances.

    Declaration
    public static void DestroyAllObjectsOfType<T>()
    
        where T : EObject
    Type Parameters
    Name Description
    T

    The T type to look for.

    | Improve this Doc View Source

    Equals(Object)

    Declaration
    public override bool Equals(object other)
    Parameters
    Type Name Description
    System.Object other
    Returns
    Type Description
    System.Boolean
    Overrides
    System.Object.Equals(System.Object)
    | Improve this Doc View Source

    FindActiveObjectOfType<T>(Func<EObject, Boolean>)

    Finds the active EObject instances of type T filtered based on a predicate.

    Declaration
    public static T FindActiveObjectOfType<T>(Func<EObject, bool> predicate)
    
        where T : EObject
    Parameters
    Type Name Description
    System.Func<EObject, System.Boolean> predicate

    The condition to satify.

    Returns
    Type Description
    T

    The corresponding active T EObject.

    Type Parameters
    Name Description
    T

    The T type to look for.

    | Improve this Doc View Source

    FindActiveObjectsOfType<T>()

    Finds all the active EObject instances of type T.

    Declaration
    public static T[] FindActiveObjectsOfType<T>()
    
        where T : EObject
    Returns
    Type Description
    T[]

    A T[] containing all the matching results.

    Type Parameters
    Name Description
    T

    The T type to look for.

    | Improve this Doc View Source

    FindActiveObjectsOfType<T>(Func<T, Boolean>)

    Finds all the active EObject instances of type T.

    Declaration
    public static T[] FindActiveObjectsOfType<T>(Func<T, bool> predicate)
    
        where T : EObject
    Parameters
    Type Name Description
    System.Func<T, System.Boolean> predicate

    The condition to satify.

    Returns
    Type Description
    T[]

    A T[] containing all the elements that satify the condition.

    Type Parameters
    Name Description
    T

    The type to look for.

    | Improve this Doc View Source

    FindActiveObjectsOfType<T>(Func<EObject, Boolean>)

    Finds all the active EObject instances of type T filtered based on a predicate.

    Declaration
    public static T[] FindActiveObjectsOfType<T>(Func<EObject, bool> predicate)
    
        where T : EObject
    Parameters
    Type Name Description
    System.Func<EObject, System.Boolean> predicate

    The condition to satify.

    Returns
    Type Description
    T[]

    A T[] containing all the matching results.

    Type Parameters
    Name Description
    T

    The T type to look for.

    | Improve this Doc View Source

    FindActiveObjectsOfType<T>(Func<Object, Boolean>)

    Finds all the active EObject instances of type T.

    Declaration
    public static T[] FindActiveObjectsOfType<T>(Func<object, bool> predicate)
    
        where T : EObject
    Parameters
    Type Name Description
    System.Func<System.Object, System.Boolean> predicate

    The condition to satify.

    Returns
    Type Description
    T[]

    A T[] containing all the elements that satify the condition.

    Type Parameters
    Name Description
    T

    The type to look for.

    | Improve this Doc View Source

    FindActiveObjectsOfType<T>(String)

    Finds all the active EObject instances of type T with the specified name.

    Declaration
    public static T[] FindActiveObjectsOfType<T>(string name)
    
        where T : EObject
    Parameters
    Type Name Description
    System.String name

    The name to look for.

    Returns
    Type Description
    T[]

    A T[] containing all the matching results.

    Type Parameters
    Name Description
    T

    The T type to look for.

    | Improve this Doc View Source

    FindActiveObjectsOfType<T>(Type)

    Finds all the active EObject instances of type T.

    Declaration
    public static T[] FindActiveObjectsOfType<T>(Type type)
    
        where T : EObject
    Parameters
    Type Name Description
    System.Type type

    The EObject type.

    Returns
    Type Description
    T[]

    A T[] containing all the matching results.

    Type Parameters
    Name Description
    T

    The T type to look for.

    | Improve this Doc View Source

    FindActiveObjectsOfType<T>(Type, Func<EObject, Boolean>)

    Finds all the active EObject instances of type T filtered based on a predicate.

    Declaration
    public static T[] FindActiveObjectsOfType<T>(Type type, Func<EObject, bool> predicate)
    
        where T : EObject
    Parameters
    Type Name Description
    System.Type type

    The EObject type.

    System.Func<EObject, System.Boolean> predicate

    The condition to satify.

    Returns
    Type Description
    T[]

    A T[] containing all the matching results.

    Type Parameters
    Name Description
    T

    The T type to look for.

    | Improve this Doc View Source

    FindActiveObjectsWithTagOfType<T>(String)

    Finds all the active EObject instances of type T with the specified tag.

    Declaration
    public static T[] FindActiveObjectsWithTagOfType<T>(string tag)
    
        where T : EObject
    Parameters
    Type Name Description
    System.String tag

    The tag to look for.

    Returns
    Type Description
    T[]

    A T[] containing all the matching results.

    Type Parameters
    Name Description
    T

    The T type to look for.

    | Improve this Doc View Source

    FindMostAppropriateEntry<T>(String, IEnumerable<T>)

    Finds the most appropriate entry.

    Declaration
    public static T FindMostAppropriateEntry<T>(string name, IEnumerable<T> source)
    Parameters
    Type Name Description
    System.String name

    The name to pair.

    System.Collections.Generic.IEnumerable<T> source

    The source on which iterate on.

    Returns
    Type Description
    T

    The corresponding entry or langword_csharp_default if not found.

    Type Parameters
    Name Description
    T

    The type to look for.

    | Improve this Doc View Source

    FindObjectDefinedTypeByName(String, Boolean)

    Finds the most accurate System.Type matching the given name.

    Declaration
    public static Type FindObjectDefinedTypeByName(string name, bool ignoreAbstractTypes = true)
    Parameters
    Type Name Description
    System.String name

    The name to look for.

    System.Boolean ignoreAbstractTypes

    A value indicating whether abstract types should be ignored.

    Returns
    Type Description
    System.Type

    The System.Type with the name that matches the given name.

    | Improve this Doc View Source

    GetHashCode()

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    System.Int32
    Overrides
    System.Object.GetHashCode()
    | Improve this Doc View Source

    GetObjectTypeByName(String)

    Gets a System.Type from a given type name.

    Declaration
    public static Type GetObjectTypeByName(string typeName)
    Parameters
    Type Name Description
    System.String typeName

    The type name to look for.

    Returns
    Type Description
    System.Type

    A System.Type matching the type name or null if not found.

    | Improve this Doc View Source

    GetObjectTypeFromRegisteredTypes(Type)

    Gets a EObject type from all the registered types.

    Declaration
    public static Type GetObjectTypeFromRegisteredTypes(Type type)
    Parameters
    Type Name Description
    System.Type type

    The EObject type.

    Returns
    Type Description
    System.Type

    The matching System.Type.

    Exceptions
    Type Condition
    System.NullReferenceException

    Occurs when the requested type is not the same as the specified type.

    | Improve this Doc View Source

    GetObjectTypeFromRegisteredTypes(Type, String)

    Gets a EObject type from all the registered types.

    Declaration
    public static Type GetObjectTypeFromRegisteredTypes(Type type, string name)
    Parameters
    Type Name Description
    System.Type type

    The EObject type.

    System.String name

    The name of the type to look for.

    Returns
    Type Description
    System.Type

    The matching System.Type.

    Exceptions
    Type Condition
    System.NullReferenceException

    Occurs when the requested type's name is not the same as the specified name.

    | Improve this Doc View Source

    GetObjectTypeFromRegisteredTypes<T>()

    Gets a EObject type from all the registered types.

    Declaration
    public static Type GetObjectTypeFromRegisteredTypes<T>()
    
        where T : EObject
    Returns
    Type Description
    System.Type

    The matching System.Type.

    Type Parameters
    Name Description
    T

    The EObject type.

    Exceptions
    Type Condition
    System.NullReferenceException

    Occurs when the requested type is not the same as the specified type.

    | Improve this Doc View Source

    GetObjectTypeFromRegisteredTypes<T>(String)

    Gets a EObject type from all the registered types.

    Declaration
    public static Type GetObjectTypeFromRegisteredTypes<T>(string name)
    
        where T : EObject
    Parameters
    Type Name Description
    System.String name

    The name of the type to look for.

    Returns
    Type Description
    System.Type

    The matching System.Type.

    Type Parameters
    Name Description
    T

    The EObject type.

    Exceptions
    Type Condition
    System.NullReferenceException

    Occurs when the requested type's name is not the same as the specified name.

    | Improve this Doc View Source

    GetObjectTypeFromRegisteredTypesByName(String)

    Gets a EObject type from all the registered types.

    Declaration
    public static Type GetObjectTypeFromRegisteredTypesByName(string name)
    Parameters
    Type Name Description
    System.String name

    The name of the type to look for.

    Returns
    Type Description
    System.Type

    The matching System.Type.

    Exceptions
    Type Condition
    System.NullReferenceException

    Occurs when the requested type's name is not the same as the specified name.

    | Improve this Doc View Source

    OnBeginDestroy()

    Fired before the current EObject instance is destroyed.

    Declaration
    protected virtual void OnBeginDestroy()
    | Improve this Doc View Source

    OnDestroyed()

    Fired when the current EObject instance has been explicitly destroyed.

    Declaration
    protected virtual void OnDestroyed()
    | Improve this Doc View Source

    RegisterObjectType(Type, String)

    Registers the specified EObject type.

    Declaration
    public static Type RegisterObjectType(Type type, string name)
    Parameters
    Type Name Description
    System.Type type

    The type to register.

    System.String name

    The name of the registered type.

    Returns
    Type Description
    System.Type

    The registered System.Type.

    | Improve this Doc View Source

    RegisterObjectType<T>(String)

    Registers the specified EObject type T.

    Declaration
    public static Type RegisterObjectType<T>(string name)
    
        where T : EObject
    Parameters
    Type Name Description
    System.String name

    The name of the registered type.

    Returns
    Type Description
    System.Type

    The registered System.Type.

    Type Parameters
    Name Description
    T

    The type to register.

    | Improve this Doc View Source

    UnregisterObjectType(String)

    Unregisters the specified EObject type.

    Declaration
    public static bool UnregisterObjectType(string name)
    Parameters
    Type Name Description
    System.String name

    The name of the type to unregister.

    Returns
    Type Description
    System.Boolean

    true if the type was unregistered successfully; otherwise, false.

    | Improve this Doc View Source

    UnregisterObjectType(Type)

    Registers the specified EObject type.

    Declaration
    public static bool UnregisterObjectType(Type type)
    Parameters
    Type Name Description
    System.Type type

    The type to register.

    Returns
    Type Description
    System.Boolean

    true if the type was unregistered successfully; otherwise, false.

    Operators

    | Improve this Doc View Source

    Implicit(EObject to Boolean)

    Implicitly converts the given EObject instance to a System.Boolean.

    Declaration
    public static implicit operator bool (EObject object)
    Parameters
    Type Name Description
    EObject object

    Whether the EObject instance exists.

    Returns
    Type Description
    System.Boolean
    | Improve this Doc View Source

    Implicit(EObject to String)

    Implicitly converts the given EObject instance to a System.String.

    Declaration
    public static implicit operator string (EObject object)
    Parameters
    Type Name Description
    EObject object

    The EObject instance's name.

    Returns
    Type Description
    System.String

    Extension Methods

    ReflectionExtensions.CopyProperties(Object, Object)
    • Improve this Doc
    • View Source
    In This Article
    Back to top Generated by DocFX