ArticyDatabaseGetObject Method (UInt64, UInt32) |
Namespace: Articy.Unity
public static ArticyObject GetObject( ulong aObjectId, uint aInstanceId = 0 )
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.
Tip |
---|
Remember that C# understands numbers to be written in decimal or in hexadecimal notation. You can therefore just copy and paste the object id found in articy in the model sheet as the parameter to this method |
// 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);