ArticyDatabaseGetObject(UInt64, UInt32) Method
Gets an object by its object id and an optional instance id.
Definition
Namespace: Articy.Unity
Assembly: ArticyRuntime (in ArticyRuntime.dll) Version: 1.3.1
The found object with the given aObjectId or null if the id doesn't exist in the database, the object wasn't cloned with the given instance id, or the owning package is not loaded.
Assembly: ArticyRuntime (in ArticyRuntime.dll) Version: 1.3.1
C#
public static ArticyObject GetObject(
ulong aObjectId,
uint aInstanceId = 0
)Parameters
- aObjectId UInt64
- The id of the object in question.
- aInstanceId UInt32 (Optional)
- The instance id, can be used to get another instance of the given object.
Return Value
ArticyObjectThe found object with the given aObjectId or null if the id doesn't exist in the database, the object wasn't cloned with the given instance id, or the owning package is not loaded.
Remarks
This is the basic way of getting an articy object by its id. If the object is not found null will be returned. If you are using packages you might get null as a result to this call, but are sure that the object id is correct. In that case make sure the owning package is fully loaded.
Example
C#
// this is the same as below but in hexadecimal notation (as in articy:draft)
var manfred2 = ArticyDatabase.GetObject(0x1000001000010C6);
// this is basically the same as above just in decimal notation
var manfred3 = ArticyDatabase.GetObject(72057598332899526);