Hi there! I have a prefab in Unity with DepthKit clips, and I want to dynamically load in + instantiate that prefab within a scene at runtime. When I drag my prefab directly into a scene from editor - not at runtime - there are no issues. If the prefab is in the scene at the moment of pressing ‘play’, and is active and enabled, there are also no issues.
However, when I dynamically load in the DepthKit prefab at runtime - the gameobject, when instantiated, is set as the child of a parent holder that is disabled/turned off by default (as intended).
When I then enable/turn on that parent, my DepthKit clips have quite a lot of null parameter errors and the DepthKit clips are not visible - it’s hard to pinpoint the cause (or what the parameter ‘t’ is).
If anyone has any insight that would be much appreciated! I need to know how much of the issue is caused by addressables vs. being caused by the gameobject being disabled.
First, so sorry not responding to this sooner. We aim to be much more responsive on support forums, and this fell through the cracks!
Because your use pattern is a bit unique, we have not had time to attempt to reproduce this specific issue on our side.
A few quick notes:
You are using Unity 2021, and we test and verify against Unity 2020.3 LTS. I recommend quickly trying and verifying if the issue persists in 2020.3 LTS as well.
The issue seems to be something with the VFX graph based on the stack trace. If you remove the VFX graph renderer and just use the Core renderer, does the issue persist? Is there perhaps a reference to a VFX Look that is still enabled on a different component?
You may try to disable the VFX components specifically, not only the parent game object.
Let me know if any of this is helpful in diagnosing the issue.
Hi, @VickyPotts. We think we have identified the cause of this issue, and it should be fixed in the upcoming version of our Unity plugins. We’ll let you know when it’s available.