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
typeTypeThe EObject type.
gameObjectGameObjectnamestringThe 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
typeTypeThe EObject type.
gameObjectGameObjectnamestringThe 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 : EObject
Returns
- T
The new EObject instance.
Type Parameters
TThe 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 : EObject
Parameters
parametersobject[]The parameters to initialize the object.
Returns
- T
The new EObject instance.
Type Parameters
TThe EObject type to cast.
CreateDefaultSubobject<T>(Type)
Creates a new instance of the EObject class.
public static T CreateDefaultSubobject<T>(Type type) where T : EObject
Parameters
Returns
- T
The new EObject instance.
Type Parameters
TThe 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 : EObject
Parameters
typeTypeThe EObject type.
gameObjectGameObjectnamestringThe name to be given to the new EObject instance.
Returns
- T
The new EObject instance.
Type Parameters
TThe 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 : EObject
Parameters
typeTypeThe EObject type.
gameObjectGameObjectnamestringThe name to be given to the new EObject instance.
parametersobject[]The parameters to initialize the object.
Returns
- T
The new EObject instance.
Type Parameters
TThe 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 : EObject
Parameters
Returns
- T
The new EObject instance.
Type Parameters
TThe 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 : EObject
Parameters
gameObjectGameObjectnamestringThe name to be given to the new EObject instance.
parametersobject[]The parameters to initialize the object.
Returns
- T
The new EObject instance.
Type Parameters
TThe 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
typeTypeThe type of the object.
gameObjectGameObjectThe 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 : EObject
Parameters
gameObjectGameObjectThe UnityEngine.GameObject belonging to the EObject instance to be destroyed.
Returns
Type Parameters
TThe
Ttype to look for.
DestroyActiveObjectsOfType<T>()
Destroys all the active EObject instances of type T.
public static void DestroyActiveObjectsOfType<T>() where T : EObject
Type Parameters
TThe
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 : EObject
Type Parameters
TThe
Ttype to look for.
Equals(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 : EObject
Parameters
Returns
- T
The corresponding active
TEObject.
Type Parameters
TThe
Ttype to look for.
FindActiveObjectsOfType<T>()
Finds all the active EObject instances of type T.
public static T[] FindActiveObjectsOfType<T>() where T : EObject
Returns
- T[]
A
T[] containing all the matching results.
Type Parameters
TThe
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 : EObject
Parameters
Returns
- T[]
A
T[] containing all the matching results.
Type Parameters
TThe
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 : EObject
Parameters
Returns
- T[]
A
T[] containing all the elements that satify the condition.
Type Parameters
TThe 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 : EObject
Parameters
Returns
- T[]
A
T[] containing all the elements that satify the condition.
Type Parameters
TThe 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 : EObject
Parameters
namestringThe name to look for.
Returns
- T[]
A
T[] containing all the matching results.
Type Parameters
TThe
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 : EObject
Parameters
Returns
- T[]
A
T[] containing all the matching results.
Type Parameters
TThe
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 : EObject
Parameters
Returns
- T[]
A
T[] containing all the matching results.
Type Parameters
TThe
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 : EObject
Parameters
tagstringThe tag to look for.
Returns
- T[]
A
T[] containing all the matching results.
Type Parameters
TThe
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
namestringThe name to pair.
sourceIEnumerable<T>The source on which iterate on.
Returns
- T
The corresponding entry or default if not found.
Type Parameters
TThe 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
namestringThe name to look for.
ignoreAbstractTypesboolA value indicating whether abstract types should be ignored.
Returns
GetHashCode()
public override int GetHashCode()
Returns
GetObjectTypeByName(string)
Gets a Type from a given type name.
public static Type GetObjectTypeByName(string typeName)
Parameters
typeNamestringThe 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
namestringThe 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 : EObject
Returns
Type Parameters
TThe 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 : EObject
Parameters
namestringThe name of the type to look for.
Returns
Type Parameters
TThe 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 : EObject
Parameters
namestringThe name of the registered type.
Returns
Type Parameters
TThe type to register.
UnregisterObjectType(string)
Unregisters the specified EObject type.
public static bool UnregisterObjectType(string name)
Parameters
namestringThe name of the type to unregister.
Returns
UnregisterObjectType(Type)
Registers the specified EObject type.
public static bool UnregisterObjectType(Type type)
Parameters
typeTypeThe 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)