That sounds a bit weird, but maybe something is wonky with the package handling.
Are you using Packages at all? If you do, make sure that you either set them as default package or load the package before trying to access it.
You can change the default package in the database view.
- packages.png (12.31 KiB) Viewed 19193 times
If you have never changed anything like that, its unlikely that this is causing a problem.
So i might need some more informations. What you could do is add a check to see if the ArticyRef is carrying an object at all.
To do that, just add a log output printing
- Code: Select all
Debug.Log( articyCardDeckObject.id );
if this prints 0, then the ref is loosing the assigned value, which could be related to you Instantiating it from a prefab. What object are you assigning into the ref?
While i never encountered it, thats at least at this point the likely cause.
If this is not 0, and a rather large number, the ref is most likely correct and the database doesn't carry any or the correct objects. To test that, you can print out the size and maybe the first object inside the Database.
- Code: Select all
Debug.Log( ArticyDatabase.Objects.Count );
Debug.Log( ArticyDatabase.Objects[0].TechnicalName );
If up to this point all is working as expected, you can try to query the database by hand, instead of using an ArticyRef. By using any of the
GetObject methods. If that works, something is broken with the ArticyRef and i need to have a look into it.
But at this point i think something gets lost between a prefab and instantiating it.
Sorry for your trouble and i hope we can work this out together!
Best regards
Nico