Search Issue Tracker
Won't Fix
Votes
1
Found in [Package]
2.0.0a11
Issue ID
UVSB-877
Regression
Yes
Using mutable structs with Bolt on class variables causes variables to be discarded
Issue from discord
From User Rogue#0728
Does bounds work differently in Bolt 2? I'm copying a script i've got working in Bolt 1 , which sets the min max of bounds then checks to see if a game object is within those bounds, however it bolt 2 doesn't seem to set the bound size correctly, any suggestions?
Seems not setting at all the min max variables are set correctly, just not going any further
!https://media.discordapp.net/attachments/376115450314096653/726501611580555314/unknown.png!
bolt 1 flow works okay
!https://media.discordapp.net/attachments/376115450314096653/726501739728994364/unknown.png!
----
Rohit preformed some initial investigation.
If you have a Unity bounds object and try to set parts of it using the SetMinMax function it doesn't seem to set. Tested it locally and the bug repros.
!image-2020-06-30-09-22-15-368.png!
I looked into this a little. Seems to be an issue with Unity using mutable structs + Bolt using properties for class variables. When you 'get' the class variable, it gets a copy. The function is called on the copy and the copy is immediately discarded.Can be worked around somewhat by using local graph variables, which are generated as fields rather than properties.Note: not sure about any differences between live and generated mode if any
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Numeric property drag cursor gets enabled in the Inspector Preview window when the window is above numeric properties
- UI elements become unusable due to Object and Text Fields being set to empty/"0" when clicking "Reset" on their Components
- Scene Asset is not attached to a Lighting Data Asset for a URP Package Sample Scene
- Gizmos are not rendered for the Base Camera when using Camera Stacking
- UI Mask Component does not apply correctly when Canvas Render Mode is set to Screen Space - Camera
Resolution Note:
Bolt 2 will not be released as its own product. See https://forum.unity.com/threads/visual-scripting-roadmap-update-august-2020.951675/ for details.