[Bug][Unity 2020.1.4f1][BD 1.6.7] Variable Mapping not working correctly

Remzo

New member
Variable Mapping doesn't seem to be working as written in the documentation, or is there something I am missing?

It looks like the PropertyMappingOwner is correctly assigned but the value received from the SharedVariables is not correct.

1607423929085.png

I've created a simple repro case with a custom class and task and attached it here as a unitypackage.

Any help would be appreciated!
 

Attachments

  • VariableMappingTest.unitypackage
    3.2 KB · Views: 1
If you import the runtime source does it work? I noticed the same with the Asset Store version, imported the source to debug, and it started to work. The versions shouldn't be different so I need to look into why that didn't work. https://opsive.com/downloads/?pid=803
 
Thanks Justin. This is indeed a very strange issue.

It's now working for me but this is what I did: I removed the Asset Store package and tried both versions of the runtime source and it still wasn't working. Using runtime source 2019_3, I then attached the debugger and put a breakpoint in SharedVariable.cs line 107, started running in editor, and stepped over the next few lines but everything seemed as expected. I then continued execution and everything was now working correctly even with starting/stopping and restarting Unity. To be throrough, I then removed the runtime source from the project and re-imported the Asset Store version - this was now also working!

Moving away from my test case and into another scene, the mappings there were not working even though nothing else had changed. I suspected maybe it's some kind of initialisation issue so I explicitly created a GameObject in the scene with the BehaviorManager component attached and after running the scene again it was now working there too.

I will continue using the runtime source 2019_3 and having the BehaviorManager already created in the scene, hopefully this workaround will keep the mappings working consistently for the time being and I hope all this helps you in tracking it down.
 
I would like to report that the same problem occurred in my environment.
Unity 2020.3.2f1
Behavior Designer 1.6.7

I imported the above runtime source and it now works correctly.
 
Top