Completed (Unreleased)

Change the modular behavior units from the relative "toggle" to absolute Enable / Disable

CSmith 2 years ago updated by Lazlo Bonin (Lead Developer) 1 year ago 1

RE: When a Flow Behavior or State Behavior is marked as modular

I think "Toggle" can be dangerous and leave uncertainty about it's guaranteed state at any time.

I want to suggest making it 2 versions (in the way you can do get (drag) or set (alt-drag) vars)

Drag = Enable

Alt-Drag = Disable

I'd rather code toggle behavior manually if/when it's needed but make the units absolute.


Below I have "absolute" events that I know will Activate or DeActivate the Game UI, but I can't guarantee my Game State machine will be enabled or disabled for sure.  It depends on what state it was left in outside of this behavior.

If the left unit under the SHOW event stream was Enable and the right was Disable, I would know exactly what this behavior's instruction is. With toggle I don't because it's relative.

Even if the game state is already enabled when I call enable, I would rather it just stay enabled or vice versa stay disabled despite a redundant call to disable.

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

(Sorry for the bump/necro, I'm doing some roadmap grooming following the Unity acquisition!)

This will be supported in the next Bolt 2 Alpha, which will be a Unity release.