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
gameObject
GameObject
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
type
TypeThe EObject type.
gameObject
GameObjectname
stringThe 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
type
TypeThe EObject type.
gameObject
GameObjectname
stringThe name to be given to the new EObject instance.
parameters
object[]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
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 : EObject
Parameters
parameters
object[]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 : EObject
Parameters
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 : EObject
Parameters
type
TypeThe EObject type.
gameObject
GameObjectname
stringThe 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 : EObject
Parameters
type
TypeThe EObject type.
gameObject
GameObjectname
stringThe name to be given to the new EObject instance.
parameters
object[]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 : EObject
Parameters
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 : EObject
Parameters
gameObject
GameObjectname
stringThe name to be given to the new EObject instance.
parameters
object[]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
destroying
bool
DestroyActiveObject(Type, GameObject)
Destroys an active EObject instance given the specified UnityEngine.GameObject.
public static bool DestroyActiveObject(Type type, GameObject gameObject)
Parameters
type
TypeThe type of the object.
gameObject
GameObjectThe 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
gameObject
GameObjectThe UnityEngine.GameObject belonging to the EObject instance to be destroyed.
Returns
Type Parameters
T
The
T
type to look for.
DestroyActiveObjectsOfType<T>()
Destroys all the active EObject instances of type T
.
public static void DestroyActiveObjectsOfType<T>() where T : EObject
Type Parameters
T
The
T
type 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
T
The
T
type to look for.
Equals(object)
Determines whether the specified object is equal to the current object.
public override bool Equals(object other)
Parameters
other
object
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
T
EObject.
Type Parameters
T
The
T
type 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
T
The
T
type 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
T
The
T
type 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
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 : EObject
Parameters
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 : EObject
Parameters
name
stringThe name to look for.
Returns
- T[]
A
T
[] containing all the matching results.
Type Parameters
T
The
T
type 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
T
The
T
type 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
T
The
T
type 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
tag
stringThe tag to look for.
Returns
- T[]
A
T
[] containing all the matching results.
Type Parameters
T
The
T
type to look for.
FindMostAppropriateEntry<T>(string, IEnumerable<T>)
Finds the most appropriate entry.
public static T FindMostAppropriateEntry<T>(string name, IEnumerable<T> source)
Parameters
name
stringThe name to pair.
source
IEnumerable<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
name
stringThe name to look for.
ignoreAbstractTypes
boolA 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
typeName
stringThe 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
name
stringThe 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
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 : EObject
Parameters
name
stringThe 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 : EObject
Parameters
name
stringThe 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
name
stringThe name of the type to unregister.
Returns
UnregisterObjectType(Type)
Registers the specified EObject type.
public static bool UnregisterObjectType(Type type)
Parameters
type
TypeThe 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)