hi everyone I have a very weird problem that I have trouble figuring out.
I have imported obi rope 6.2 into a 2021.1.19f1 vr hdrp project I am working on and when I try to start a scene with a rope or rod all I get is a null ref exception in ObiConstraints.cs
actor.solverBatchOffsets[constraintType].Clear();
explicitly solverBatchOffsets is what is null.
Backend used doesn't matter
My testscene is empty except for camera, directional light and obi rope and obi solver. The blueprint is also unaltered straight from create asset.
In a completely new project (same unity version, hdrp, steam vr too) the issue does not appear.
Why could this go wrong? Is there a way I can hotfix this?
---
I suspect that either Awake isn't called correctly on ObiActor or that solverBatchOffsets is not serialized. In any case when I check if solverbatchOffsets is null in ObiActor.OnEnable it does return null as well. Initializing it in OnEnable prevents the error but breaks the simulation.
--- figured it out ---
Awake isn't called (and I guess on many other important components too) when you have Scene reload disabled (I am stupid, hopefulyl this spares someone else the hours to find out)
I have imported obi rope 6.2 into a 2021.1.19f1 vr hdrp project I am working on and when I try to start a scene with a rope or rod all I get is a null ref exception in ObiConstraints.cs
actor.solverBatchOffsets[constraintType].Clear();
explicitly solverBatchOffsets is what is null.
Backend used doesn't matter
My testscene is empty except for camera, directional light and obi rope and obi solver. The blueprint is also unaltered straight from create asset.
In a completely new project (same unity version, hdrp, steam vr too) the issue does not appear.
Why could this go wrong? Is there a way I can hotfix this?
---
I suspect that either Awake isn't called correctly on ObiActor or that solverBatchOffsets is not serialized. In any case when I check if solverbatchOffsets is null in ObiActor.OnEnable it does return null as well. Initializing it in OnEnable prevents the error but breaks the simulation.
--- figured it out ---
Awake isn't called (and I guess on many other important components too) when you have Scene reload disabled (I am stupid, hopefulyl this spares someone else the hours to find out)