Closed thestonefox closed 4 years ago
@bddckr @fight4dream do you have any thoughts/input on this idea?
Seeing your discussion on Slack I think this works fine, just with the raised issue of not being able to reuse this for multiple "remember and emit later" use cases without having to create multiple instances of this object.
But I think for that your suggestion of writing your own thing in the first place to do that in a more direct way is valid.
Yeah, we don't wan to turn the emitters into a queuing system.
This is purely just so you can use the emitter to set and emit on your terms.
I am welcoming this addition
in master now
The simplest solution would be to serialize the
Payload
property and make the setterpublic
https://github.com/ExtendRealityLtd/Zinnia.Unity/blob/master/Runtime/Event/Proxy/SingleEventProxyEmitter.cs#L17
This would then allow the
Payload
to be set in the editor or via code/unity events and then simply calling the existingEmitPayload()
method would emit this set payload.This would allow something to set the payload and then to emit the payload at a later stage such as with a countdown timer.