Summary
When inheriting an interface with an event, all subtypes with that interface will treat the event as if its connected between them. See the below example on how to reproduce
Please select what you are reporting on:
Verse
What Type of Bug are you experiencing?
Verse
Steps to Reproduce
Use the following code to reproduce the issue, creating a blank entity for each component subtype.
using { /Verse.org/SceneGraph }
using { /Verse.org/Simulation }
event_interface := interface:
Event<public> : event() = event(){}
event_component_1 := class<final_super>(event_interface, component):
Event <override> : event() = event(){}
OnSimulate<override>()<suspends>:void=
branch:
Event.Await()
Print("Event 1 fired!")
Sleep(1.0)
Print("Firing Event 1")
Event.Signal()
event_component_2 := class<final_super>(event_interface, component):
Event <override> : event() = event(){}
OnSimulate<override>()<suspends>:void=
branch:
Event.Await()
Print("Event 2 fired!")
Sleep(5.0)
Print("Firing Event 2")
Event.Signal()
Expected Result
The event should not be fired for the event_component_2 class until the 5 seconds have elapsed in its OnSimulate function.
Observed Result
When the event_component_1 class fires its event after 1 second the event_component_2 class behaves as if its inherited event was also fired
NOTE: You can fix this issue by overriding the event in subtype classes
Platform(s)
PC