0

Is there a way to use += in Bolt?

mikiz_1107 2 years ago updated by Ex-Crow 2 years ago 3

Example: RigidBody.velocity  +=  velocityTweak

Bolt Version:
1.4
Unity Version:
Platform(s):
Scripting Backend:
.NET Version (API Compatibility Level):
+1
RigidBody.velocity  +=  velocityTweak 

is the same as 

RigidBody.velocity = RigidBody.velocity + velocityTweak

So that's what you do in Bolt. A get variable unit, an addition unit and a set variable unit.

Oh alright, just wanted to check if there is a better or more appropriate way to write that

+1

Not in Bolt 1 by default. There are some community made += units here: https://github.com/RealityStop/Bolt.Addons.Community

And Bolt 2 will support it natively down the road.