Custom Super Unit That display certain variables?

mikenspired 3 years ago updated by Lazlo Bonin (Lead Developer) 3 years ago 3

I am using Bolt for Game designers to have an easier time creating game play.

I would like to have custom super units like custom inspectors inside Unity for script variables.

For example a  Super unit with a boolean "Has Attack spell"

If its checked it displays other variables like prefabs to drop in to populate.

When its unchecked it hides the other variables.

Is this a possibility?

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

Hi Mike,

Having a unit where the port definition changes based on the settings requires C# to create Custom Units, which are the most customizable nodes that are used by everything you see natively in Bolt. It's not simple though, and there is no API documentation for it yet, but the #api channel on Discord has some users that could help you.

A much simpler solution would be to use Super Units and allow for the attack inputs to be optional, or just ignored if the Has Attack Spell input is false.

That is what I have right now. Optional inputs. I was just hoping for a solution to make things more user friendly. A game designer may look at those empty inputs and think "I need those! or it wont work". I'll probably just seperate the logic into seperate super units.

I'll try and take a look at how some of the downloadable custom nodes are and see if its worth the effort.


That's a very interesting point you bring up, though!

Maybe we could add some checkbox on the port definition, e.g. "Required". If unchecked, the port could show as dimmed out if it isn't connected, indicating that it isn't strictly required.