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

Package: Visual Scripting Bugs

-

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

  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.

Comments (1)

  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

Log in to post comment