Promote port to variable

Lazlo Bonin (Lead Developer) 4 years ago updated 1 year ago 6 1 duplicate

Not exactly sure what UX I want for this, but ports should be "promotable" (in Blueprints terms) to variables, meaning a variable with a matching name would get created and automatically connected.

Promoting a value input port would create a connected get variable unit.

Promoting a value output port would create a connected set variable unit.

The naming scheme for promotion should be customizable to fit the user's taste (for example, camelCase, snake_case, PascalCase, etc.). If a variable with the same name already exists, a number should be appended (e.g. health_1).

Bolt Version:
Unity Version:
Scripting Backend:
.NET Version (API Compatibility Level):

Duplicates 1

Under Review

If I understand correctly, what you'd like is to be able to right-click a get/set variable unit, then select something like "Define Variable" (assuming it doesn't already exist). Clicking that would create a variable of the matching scope with the same name (and even better, if Bolt can detect it from the connections, automatically select the type for it). Is that right?

That's an interesting / simple idea for sure!


Yep exactly!  It's the little things that add up to be a nuisance, and the auto type detection would be fantastic - not sure about the auto name - the reason being is that (not sure if needs to be raised as a seperate request) there seems to be no variable refactoring mechanism, if i change the name then the old variable names stay the same in the graph?  If this can be resolved too at the same time, auto name away!

And now while im excited over the idea, drag variable units to the input / output nodes to auto create input/output variables of the same type?!  LIke a super unit, first unit might be set position for example, i drag the vector3 input it needs to the input node and it creates a vector3 input variable for me too, auto named?  Personally, I'd do away with the variable/graph inspectors if I could and just interact with nodes to do what I want!

I've thought about that second idea too, but please post a separate thread about it so I can keep track!


This made it into Bolt 2 Alpha 6.