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

Package: Visual Scripting Bugs

-

Issue from [discord |https://discordapp.com/channels/372898201088426004/376115450314096653/726395535942221844]

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_

  1. 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.

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.