Class EObject
The base class of all Exiled objects.
public abstract class EObject : TypeCastObject<EObject>- Inheritance
- 
      
      
      EObject
- Derived
- Inherited Members
- Extension Methods
Constructors
EObject()
Initializes a new instance of the EObject class.
protected EObject()EObject(GameObject)
Initializes a new instance of the EObject class.
protected EObject(GameObject gameObject = null)Parameters
- gameObjectGameObject
Properties
Base
Gets or sets the base UnityEngine.GameObject.
public GameObject Base { get; set; }Property Value
- GameObject
IsEditable
Gets or sets a value indicating whether the EObject values can be edited.
public bool IsEditable { get; set; }Property Value
Name
Gets or sets the name of the EObject instance.
public string Name { get; set; }Property Value
RegisteredTypes
Gets all the registered EObject types.
public static IReadOnlyDictionary<Type, List<string>> RegisteredTypes { get; }Property Value
Tag
Gets or sets the tag of the EObject instance.
public string Tag { get; set; }Property Value
Methods
CreateDefaultSubobject(Type, params object[])
Creates a new instance of the EObject class.
public static EObject CreateDefaultSubobject(Type type, params object[] parameters)Parameters
Returns
CreateDefaultSubobject(Type, GameObject, string)
Creates a new instance of the EObject class.
public static EObject CreateDefaultSubobject(Type type, GameObject gameObject, string name)Parameters
- typeType
- The EObject type. 
- gameObjectGameObject
- namestring
- The name to be given to the new EObject instance. 
Returns
CreateDefaultSubobject(Type, GameObject, string, params object[])
Creates a new instance of the EObject class.
public static EObject CreateDefaultSubobject(Type type, GameObject gameObject, string name, params object[] parameters)Parameters
- typeType
- The EObject type. 
- gameObjectGameObject
- namestring
- The name to be given to the new EObject instance. 
- parametersobject[]
- The parameters to initialize the object. 
Returns
CreateDefaultSubobject<T>()
Creates a new instance of the EObject class.
public static T CreateDefaultSubobject<T>() where T : EObjectReturns
- T
- The new EObject instance. 
Type Parameters
- T
- The cast EObject type. 
CreateDefaultSubobject<T>(params object[])
Creates a new instance of the EObject class.
public static T CreateDefaultSubobject<T>(params object[] parameters) where T : EObjectParameters
- parametersobject[]
- The parameters to initialize the object. 
Returns
- T
- The new EObject instance. 
Type Parameters
- T
- The EObject type to cast. 
CreateDefaultSubobject<T>(Type)
Creates a new instance of the EObject class.
public static T CreateDefaultSubobject<T>(Type type) where T : EObjectParameters
Returns
- T
- The new EObject instance. 
Type Parameters
- T
- The cast EObject type. 
CreateDefaultSubobject<T>(Type, GameObject, string)
Creates a new instance of the EObject class.
public static T CreateDefaultSubobject<T>(Type type, GameObject gameObject, string name) where T : EObjectParameters
- typeType
- The EObject type. 
- gameObjectGameObject
- namestring
- The name to be given to the new EObject instance. 
Returns
- T
- The new EObject instance. 
Type Parameters
- T
- The cast EObject type. 
CreateDefaultSubobject<T>(Type, GameObject, string, params object[])
Creates a new instance of the EObject class.
public static T CreateDefaultSubobject<T>(Type type, GameObject gameObject, string name, params object[] parameters) where T : EObjectParameters
- typeType
- The EObject type. 
- gameObjectGameObject
- namestring
- The name to be given to the new EObject instance. 
- parametersobject[]
- The parameters to initialize the object. 
Returns
- T
- The new EObject instance. 
Type Parameters
- T
- The cast EObject type. 
CreateDefaultSubobject<T>(GameObject, string)
Creates a new instance of the EObject class.
public static T CreateDefaultSubobject<T>(GameObject gameObject, string name) where T : EObjectParameters
Returns
- T
- The new EObject instance. 
Type Parameters
- T
- The EObject type. 
CreateDefaultSubobject<T>(GameObject, string, params object[])
Creates a new instance of the EObject class.
public static T CreateDefaultSubobject<T>(GameObject gameObject, string name, params object[] parameters) where T : EObjectParameters
- gameObjectGameObject
- namestring
- The name to be given to the new EObject instance. 
- parametersobject[]
- The parameters to initialize the object. 
Returns
- T
- The new EObject instance. 
Type Parameters
- T
- The EObject type. 
Destroy()
Destroys the current EObject instance.
public void Destroy()Destroy(bool)
Destroys the current EObject instance.
protected virtual void Destroy(bool destroying)Parameters
- destroyingbool
DestroyActiveObject(Type, GameObject)
Destroys an active EObject instance given the specified UnityEngine.GameObject.
public static bool DestroyActiveObject(Type type, GameObject gameObject)Parameters
- typeType
- The type of the object. 
- gameObjectGameObject
- The UnityEngine.GameObject belonging to the object. 
Returns
DestroyActiveObject<T>(GameObject)
Destroys an active EObject instance of type T given the specified UnityEngine.GameObject.
public static bool DestroyActiveObject<T>(GameObject gameObject) where T : EObjectParameters
- gameObjectGameObject
- The UnityEngine.GameObject belonging to the EObject instance to be destroyed. 
Returns
Type Parameters
- T
- The - Ttype to look for.
DestroyActiveObjectsOfType<T>()
Destroys all the active EObject instances of type T.
public static void DestroyActiveObjectsOfType<T>() where T : EObjectType Parameters
- T
- The - Ttype to look for.
DestroyAllObjects()
Destroys all the active EObject instances.
public static void DestroyAllObjects()DestroyAllObjectsOfType<T>()
Destroys all the active T EObject instances.
public static void DestroyAllObjectsOfType<T>() where T : EObjectType Parameters
- T
- The - Ttype to look for.
Equals(object)
Determines whether the specified object is equal to the current object.
public override bool Equals(object other)Parameters
- otherobject
Returns
FindActiveObjectOfType<T>(Func<EObject, bool>)
Finds the active EObject instances of type T filtered based on a predicate.
public static T FindActiveObjectOfType<T>(Func<EObject, bool> predicate) where T : EObjectParameters
Returns
- T
- The corresponding active - TEObject.
Type Parameters
- T
- The - Ttype to look for.
FindActiveObjectsOfType<T>()
Finds all the active EObject instances of type T.
public static T[] FindActiveObjectsOfType<T>() where T : EObjectReturns
- T[]
- A - T[] containing all the matching results.
Type Parameters
- T
- The - Ttype to look for.
FindActiveObjectsOfType<T>(Func<EObject, bool>)
Finds all the active EObject instances of type T filtered based on a predicate.
public static T[] FindActiveObjectsOfType<T>(Func<EObject, bool> predicate) where T : EObjectParameters
Returns
- T[]
- A - T[] containing all the matching results.
Type Parameters
- T
- The - Ttype to look for.
FindActiveObjectsOfType<T>(Func<object, bool>)
Finds all the active EObject instances of type T.
public static T[] FindActiveObjectsOfType<T>(Func<object, bool> predicate) where T : EObjectParameters
Returns
- T[]
- A - T[] containing all the elements that satify the condition.
Type Parameters
- T
- The type to look for. 
FindActiveObjectsOfType<T>(Func<T, bool>)
Finds all the active EObject instances of type T.
public static T[] FindActiveObjectsOfType<T>(Func<T, bool> predicate) where T : EObjectParameters
Returns
- T[]
- A - T[] containing all the elements that satify the condition.
Type Parameters
- T
- The type to look for. 
FindActiveObjectsOfType<T>(string)
Finds all the active EObject instances of type T with the specified name.
public static T[] FindActiveObjectsOfType<T>(string name) where T : EObjectParameters
- namestring
- The name to look for. 
Returns
- T[]
- A - T[] containing all the matching results.
Type Parameters
- T
- The - Ttype to look for.
FindActiveObjectsOfType<T>(Type)
Finds all the active EObject instances of type T.
public static T[] FindActiveObjectsOfType<T>(Type type) where T : EObjectParameters
Returns
- T[]
- A - T[] containing all the matching results.
Type Parameters
- T
- The - Ttype to look for.
FindActiveObjectsOfType<T>(Type, Func<EObject, bool>)
Finds all the active EObject instances of type T filtered based on a predicate.
public static T[] FindActiveObjectsOfType<T>(Type type, Func<EObject, bool> predicate) where T : EObjectParameters
Returns
- T[]
- A - T[] containing all the matching results.
Type Parameters
- T
- The - Ttype to look for.
FindActiveObjectsWithTagOfType<T>(string)
Finds all the active EObject instances of type T with the specified tag.
public static T[] FindActiveObjectsWithTagOfType<T>(string tag) where T : EObjectParameters
- tagstring
- The tag to look for. 
Returns
- T[]
- A - T[] containing all the matching results.
Type Parameters
- T
- The - Ttype to look for.
FindMostAppropriateEntry<T>(string, IEnumerable<T>)
Finds the most appropriate entry.
public static T FindMostAppropriateEntry<T>(string name, IEnumerable<T> source)Parameters
- namestring
- The name to pair. 
- sourceIEnumerable<T>
- The source on which iterate on. 
Returns
- T
- The corresponding entry or default if not found. 
Type Parameters
- T
- The type to look for. 
FindObjectDefinedTypeByName(string, bool)
Finds the most accurate Type matching the given name.
public static Type FindObjectDefinedTypeByName(string name, bool ignoreAbstractTypes = true)Parameters
- namestring
- The name to look for. 
- ignoreAbstractTypesbool
- A value indicating whether abstract types should be ignored. 
Returns
GetHashCode()
Serves as the default hash function.
public override int GetHashCode()Returns
- int
- A hash code for the current object. 
GetObjectTypeByName(string)
Gets a Type from a given type name.
public static Type GetObjectTypeByName(string typeName)Parameters
- typeNamestring
- The type name to look for. 
Returns
GetObjectTypeFromRegisteredTypes(Type)
Gets a EObject type from all the registered types.
public static Type GetObjectTypeFromRegisteredTypes(Type type)Parameters
Returns
Exceptions
- NullReferenceException
- Occurs when the requested type is not the same as the specified type. 
GetObjectTypeFromRegisteredTypes(Type, string)
Gets a EObject type from all the registered types.
public static Type GetObjectTypeFromRegisteredTypes(Type type, string name)Parameters
Returns
Exceptions
- NullReferenceException
- Occurs when the requested type's name is not the same as the specified name. 
GetObjectTypeFromRegisteredTypesByName(string)
Gets a EObject type from all the registered types.
public static Type GetObjectTypeFromRegisteredTypesByName(string name)Parameters
- namestring
- The name of the type to look for. 
Returns
Exceptions
- NullReferenceException
- Occurs when the requested type's name is not the same as the specified name. 
GetObjectTypeFromRegisteredTypes<T>()
Gets a EObject type from all the registered types.
public static Type GetObjectTypeFromRegisteredTypes<T>() where T : EObjectReturns
Type Parameters
- T
- The EObject type. 
Exceptions
- NullReferenceException
- Occurs when the requested type is not the same as the specified type. 
GetObjectTypeFromRegisteredTypes<T>(string)
Gets a EObject type from all the registered types.
public static Type GetObjectTypeFromRegisteredTypes<T>(string name) where T : EObjectParameters
- namestring
- The name of the type to look for. 
Returns
Type Parameters
- T
- The EObject type. 
Exceptions
- NullReferenceException
- Occurs when the requested type's name is not the same as the specified name. 
OnBeginDestroy()
Fired before the current EObject instance is destroyed.
protected virtual void OnBeginDestroy()OnDestroyed()
Fired when the current EObject instance has been explicitly destroyed.
protected virtual void OnDestroyed()RegisterObjectType(Type, string)
Registers the specified EObject type.
public static Type RegisterObjectType(Type type, string name)Parameters
Returns
RegisterObjectType<T>(string)
Registers the specified EObject type T.
public static Type RegisterObjectType<T>(string name) where T : EObjectParameters
- namestring
- The name of the registered type. 
Returns
Type Parameters
- T
- The type to register. 
UnregisterObjectType(string)
Unregisters the specified EObject type.
public static bool UnregisterObjectType(string name)Parameters
- namestring
- The name of the type to unregister. 
Returns
UnregisterObjectType(Type)
Registers the specified EObject type.
public static bool UnregisterObjectType(Type type)Parameters
- typeType
- The type to register. 
Returns
Operators
implicit operator bool(EObject)
public static implicit operator bool(EObject @object)Parameters
Returns
implicit operator string(EObject)
public static implicit operator string(EObject @object)