0
Not a Bug

Searching inside a menu dragged out from a node is not context aware

MegaMiley 6 months ago updated by Lazlo Bonin (Lead Developer) 6 months ago 1

When I take a Vector3 variable (in this case the gravity value) and drag out from there I get a menu which shows context aware options as expected. When I then type to search for a specific field (like its magnitude) it's no longer context aware and shows me the method for Vector2 and 4 as well as Vector3. I would expect it to remain context aware when searching for a function or property

Bolt Version:
2.0 Alpha 7
Unity Version:
2018.4.14f1
Platform(s):
Windows
Scripting Backend:
Mono
.NET Version (API Compatibility Level):
.NET 4.x
Bolt 2
Not a Bug

Hi MegaMiley,

Thanks for the report.

Looking back at your Discord screenshot, I understand the confusion.

The fuzzy finder is always context aware, and will never display incompatible units for the currently dragged value type.

However, it will also display units that are compatible via an implicit or explicit type conversion. Unity defines custom cast operators from almost any vector type to another, which is why Bolt shows all options for those, regardless of which vector type it's dragged from.

At the moment, reordering the search results based on exact vs converted type compatibility is out of scope for Bolt 2.0.

However, I'd like to point out that common operators and utility methods like Magnitude are always surfaced right when dragging out from a value type, so you'll get the correct overload among the top results without having to search at all:

https://streamable.com/ftgor