- A units category has changed.
- A new unit or type is introduced.
- A unit or type is removed or marked obsolete.
- A unit or types namespace changed.
- A unit or types declaration has changed, including method signatures.
*If you are a C# programmer, you can alternatively use the attribute [RenamedFrom(string previousName)] and include the previous type name, including namespaces to prevent a regeneration.*
*Units, Graphs, Macros, ect, SHOULD NOT be included in the unit options window unless you need access to the internal scripts methods and variables.*
How do I regenerate units?
In the unity menu goto Tools > Bolt > Build Unit Options.
Delegates work just like the name says, they delegate behavior between multiple sources. In the context of events and Bolt, this means we can attach and detach events. Imagine having an internal list of events that can be added or removed. One trigger to the Binding Delegate will call all events that have been bound.
Imagine playing some sort of game where there is a spotlight moving around. If you are caught in it at the end of the buzzer, you are shocked. You could use a collider with the light, and everytime a player enters or leaves, you bind or unbind. When the time is up, Trigger the Binding Delegate. Any players who are bound from still being in the light, get shocked due to the events logic that is on each player object.
Delegate Events have no name, and are triggered by a reference to the binding delegate. To create an event, in the fuzzy finder, goto 'Events > Delegate' and place down a Delegate Event.
CREATE BINDING DELEGATE
A delegate, is a type that is used as a pointer to a single method. In code, it contains pointers to other methods by binding them. In C# you would see it like this:
public delegate void
// Binds a delegate
del += @delegate;
// Unbinds a delegate.
del -= @delegate;
In bolt we create the delegate and get a reference to the Delegate Event like this:
In bolt, the equivalent to binding a delegate is super easy. We already saved the references to a variable, so bind and unbind units do the trick.
Now you can successfully trigger your binding delegates.
All content unless stated is Copyright 2019 Life and Style Media, LLC.
Images, logos, and icons for Bolt were provided by the product copyright owner, Ludiq. https://ludiq.io