Class XUObject
Stands for a relationnal object.
Assembly: Xareus.Relations.Unity.dll
Syntax
[DisallowMultipleComponent]
[OverrideClass("Xareus.Relations.Object", "Xareus.Relations")]
[OverrideClass("FIVE.Relations.Object", "FIVE.Relations")]
[Renamed("UFObject")]
[Renamed("UFObject", "Assembly-CSharp")]
[Renamed("UFObject", "FIVE.Unity")]
[Renamed("FIVE.Unity.UFObject", "FIVE.Unity")]
public class XUObject : IdentifiableBehaviour, IObject
Fields
idToXuTypeMap
Maps the types of this object with their identifier.
Declaration
protected Dictionary<string, XUType> idToXuTypeMap
Field Value
registered
Declaration
[HideInInspector]
protected bool registered
Field Value
types
Declaration
protected HashSet<IObjectType> types
Field Value
Properties
IdToUxTypeMap
lists all the types already present in this object
Declaration
public Dictionary<string, XUType> IdToUxTypeMap { get; }
Property Value
Name
Declaration
public string Name { get; set; }
Property Value
ObjectNameToXuObjectMap
Maps object names to their corresponding XUObject.
Declaration
public static IReadOnlyDictionary<string, XUObject> ObjectNameToXuObjectMap { get; }
Property Value
ObjectToXuObjectMap
Declaration
[Obsolete("Objects are now equivalent, you can remove the usage of this property")]
public static IReadOnlyDictionary<IObject, XUObject> ObjectToXuObjectMap { get; }
Property Value
Registered
Check if this object has been registered
Declaration
public bool Registered { get; }
Property Value
RegisteredObjects
Gets all objects that are registered in the relation engine
Declaration
public static IEnumerable<IObject> RegisteredObjects { get; }
Property Value
Types
Declaration
public HashSet<IObjectType> Types { get; set; }
Property Value
TypesIds
Get all Types Ids in the current object
Declaration
public IEnumerable<string> TypesIds { get; }
Property Value
XuObjectToObjectMap
Declaration
[Obsolete("Objects are now equivalent, you can remove the usage of this property")]
public static IReadOnlyDictionary<XUObject, IObject> XuObjectToObjectMap { get; }
Property Value
XuTypes
Get all Types in the current object
Declaration
public IEnumerable<XUType> XuTypes { get; }
Property Value
objectNameUfObjectMap
Declaration
[Obsolete("Use ObjectNameToXuObjectMap instead")]
public static IReadOnlyDictionary<string, XUObject> objectNameUfObjectMap { get; }
Property Value
objectUfObjectMap
Declaration
[Obsolete("Objects are now equivalent, you can remove the usage of this property")]
public static IReadOnlyDictionary<IObject, XUObject> objectUfObjectMap { get; }
Property Value
uFObjectObjectMap
Declaration
[Obsolete("Objects are now equivalent, you can remove the usage of this property")]
public static IReadOnlyDictionary<XUObject, IObject> uFObjectObjectMap { get; }
Property Value
Methods
AddType(string, XUType)
Adds the givne type to the object and assign it the given typeId
Declaration
public bool AddType(string typeId, XUType type)
Parameters
Type |
Name |
Description |
string |
typeId |
The typeId of the added type
|
XUType |
type |
The type to add
|
Returns
Type |
Description |
bool |
false if the typeId is already used, true otherwise
|
AddType(Type)
Adds an instance of the given type to the object
Declaration
public string AddType(Type type)
Parameters
Type |
Name |
Description |
Type |
type |
|
Returns
Type |
Description |
string |
the Id assigned to the type
|
AddType(XUObject, XUType)
Adds the given type to the object
Declaration
public static string AddType(XUObject xuObject, XUType xuType)
Parameters
Returns
Type |
Description |
string |
the Id assigned to the type
|
AddType(XUType)
Adds the given type to the object
Declaration
public string AddType(XUType type)
Parameters
Type |
Name |
Description |
XUType |
type |
|
Returns
Type |
Description |
string |
the Id assigned to the type
|
AddType<XuT>()
Adds an instance of the given type to the object
Declaration
public string AddType<XuT>() where XuT : XUType
Returns
Type |
Description |
string |
the Id assigned to the type
|
Type Parameters
AddUFObject(GameObject)
Declaration
[Obsolete("Use AddXuObject method instead")]
public static string AddUFObject(GameObject gameObject)
Parameters
Type |
Name |
Description |
GameObject |
gameObject |
|
Returns
AddXuObject(GameObject)
Adds a new object on the given gameobject if not already present
Declaration
public static string AddXuObject(GameObject gameObject)
Parameters
Type |
Name |
Description |
GameObject |
gameObject |
|
Returns
Type |
Description |
string |
The unique id of the object
|
FreeUnusedTypeIds()
Declaration
public void FreeUnusedTypeIds()
GetCoreObject(XUObject)
Get a Object from its Unity counterpart
Declaration
[Obsolete("Objects are now equivalent, you can remove the usage of this method")]
public static IObject GetCoreObject(XUObject xuObject)
Parameters
Returns
GetTypesIds()
Declaration
[Obsolete("Use the TypesIds property instead")]
public IEnumerable<string> GetTypesIds()
Returns
GetXuObject(string)
Get an Object from its id
Declaration
public static XUObject GetXuObject(string id)
Parameters
Type |
Name |
Description |
string |
id |
|
Returns
GetXuObject(IObject)
Get an Object from its Object counterpart
Declaration
[Obsolete("Objects are now equivalent, you can remove the usage of this method")]
public static XUObject GetXuObject(IObject @object)
Parameters
Type |
Name |
Description |
IObject |
object |
|
Returns
GetXuType(string)
Get the type with the given Id in the current object
Declaration
public XUType GetXuType(string typeId)
Parameters
Type |
Name |
Description |
string |
typeId |
|
Returns
GetXuType(Type)
Get one instance of the given type from the current object
Declaration
public XUType GetXuType(Type xuType)
Parameters
Type |
Name |
Description |
Type |
xuType |
|
Returns
GetXuType<T>()
Get one instance of the given type in the current object
Declaration
public T GetXuType<T>() where T : XUType
Returns
Type Parameters
GetXuTypes(Type)
Get all instances of the given type from the current object
Declaration
public IEnumerable<XUType> GetXuTypes(Type xuType)
Parameters
Type |
Name |
Description |
Type |
xuType |
|
Returns
GetXuTypes<T>()
Get all instances of the given type from the current object
Declaration
public IEnumerable<T> GetXuTypes<T>() where T : XUType
Returns
Type Parameters
HasXuType(Type)
Check if the given type is present from the current object
Declaration
public bool HasXuType(Type xuType)
Parameters
Type |
Name |
Description |
Type |
xuType |
|
Returns
HasXuType<T>()
Check if the given type is present in the current object
Declaration
public bool HasXuType<T>() where T : XUType
Returns
Type Parameters
ObjectsToXuObjects(IEnumerable<IObject>)
Declaration
[Obsolete("Objects are now equivalent, you can remove the usage of this method")]
public static IEnumerable<XUObject> ObjectsToXuObjects(IEnumerable<IObject> objects)
Parameters
Returns
ReRegister()
reregisters the current object
Declaration
protected virtual bool ReRegister()
Returns
Register()
registers the current object
Declaration
public virtual bool Register()
Returns
RemoveType(string)
Declaration
public bool RemoveType(string typeId)
Parameters
Type |
Name |
Description |
string |
typeId |
|
Returns
ToString()
Declaration
public override string ToString()
Returns
Overrides
UnityEngine.Object.ToString()
TryGetCoreObject(XUObject, out IObject)
Get a Object from its Unity counterpart
Declaration
[Obsolete("Objects are now equivalent, you can remove the usage of this method")]
public static void TryGetCoreObject(XUObject xuObject, out IObject @object)
Parameters
TryGetXuObject(string, out XUObject)
Get an object from its id
Declaration
public static void TryGetXuObject(string id, out XUObject xuObject)
Parameters
TryGetXuObject(IObject, out XUObject)
Get an Object from itsObject counterpart
Declaration
[Obsolete("Objects are now equivalent, you can remove the usage of this method")]
public static void TryGetXuObject(IObject @object, out XUObject xuObject)
Parameters
TryGetXuType(string, out XUType)
Get the type with the given Id in the current object
Declaration
public void TryGetXuType(string typeId, out XUType xuType)
Parameters
Unregister()
unregisters the current object
Declaration
public virtual bool Unregister()
Returns
XuObjectsToObjects(IEnumerable<XUObject>)
Declaration
[Obsolete("Objects are now equivalent, you can remove the usage of this method")]
public static IEnumerable<IObject> XuObjectsToObjects(IEnumerable<XUObject> xuObjects)
Parameters
Returns
Events
XuObjectChangedEvent
Event to register to the change of an object
Declaration
public static event XUObject.XuObjectChanged XuObjectChangedEvent
Event Type
Implements