Is there a better way to bind delegates?

RAVaught
Tue, 30 Dec 2014 11:20:55 +0000
Blueprint

The Problem:

Right now, the way that way that we have to bind delegates involves calling a bind delegate event dispatcher, and then linking that directly to the execution node of the delegate, from which flows all of the code executed in the delegate. This creates a number of undesirable behaviors:

1. You can’t bind delegates in the construction script.

2. Procedurally binding delegates becomes very, very messy involving a secondary layer of events to bind/unbind events and a layer of function calls.

3. The additional complexity increases the likelihood of bugs, and makes the code less readable.

The Question:

Is there a better way to bind delegates that:

1. Does not require the additional layer of functions and delegates to set delegates

2. Can be called from the construction graph.

The Suggestion

If the answer to the above is “No”, perhaps Epic could implement a event stub for use in binding. Essentially, the stub creates the event signature, but has no executable pin. The event, with its executable, would then be propagated to the event graph as an empty event node.

Benefits:

1. Events could be bound in the construction script, which would make it propagate to all child objects.

2. Make blueprints more readable by allowing better positioning of event nodes by allowing them to be detached from the OnBeginPlay event chain.

3. Removes the need for an additional layer of event nodes to bind/unbind the events that you actually want.

4. Would allow for events to be bound in functions, but defined in the event graph.

Cheers, Tony

9 posts - 1 participant