Search Issue Tracker
Won't Fix
Votes
1
Found in [Package]
2.0.0a10
Issue ID
UVSB-644
Regression
No
Can't drag most items from Hierarchy into Bolt Component variable field
A Bolt Class with variables can't have the inspector fields filled by dragging in an GameObject from Hierarchy for most variable types. However, Hierarchy objects can be selected without issue using the radial button attached to the inspector field.
!aNTXNZpf6R.gif|width=481,height=214!
*Repro:*
1. Create a project and have Bolt 2 set up.
2. Create -> Bolt -> Bolt Class, click to view this new asset in Inspector.
4. Click "+" under "Variables" to add a new variable. For this example, choose Text as the type.
5. In Hierarchy, Right-Click -> UI -> Text
6. In Hierarchy, Right-Click -> Create Empty, and add component "Bolt Component."
7. Select your component class in this Bolt Component.
8. Click the check on the bolt class variable to enable it. Drag your text object from Hierarchy into this field.
*Expected Result*: The object is accepted by the field.
*Actual Result*: The field does not allow most objects to be dragged in for most variable types.
----
*Notes:*
- Works fine on Bolt 1.
- Couldn't get a version older than 2.0.0a6 to work for testing.
- Tested and reproducible with: All UI elements (i.e. Button, Text, Slider, Toggle), Light, Particle System, Mesh Renderer, Box Collider, Camera, Sprite, Terrain
- Tested and +not reproducible+ with: GameObject
Comments (1)
-
PanthenEye
May 27, 2020 15:54
The dragged object has to exactly match the type of the variable. That is, if you drag a gameobject on a gameobject variable it works. But if you want to let's say grab the sprite renderer from the same gameobject and apply it on a variable of type sprite renderer then dragging the same object won't work because types don't match.
You can, however, work around this by dragging the component itself on the variable because then the types implicitly match and the variable will accept it. This can be tested within the inspector of the same object where you have a Bolt component variable of say type Transform and then you drag the same objects transform component into the variable - it will work as intended.
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
- UI Document file remains marked as Dirty after Undoing made changes
- Switching between UI Documents with different Canvas sizes marks the UXML file as dirty
- m_Modifications block serializes incorrectly when replacing source prefabs
- Multiple warnings are thrown when importing Terrain URP Demo Scene to the Project
- The Frame value field does not update when using the increment/decrement arrows in the Frame Debugger if the value has been manually inputted
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.