-
Notifications
You must be signed in to change notification settings - Fork 65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add notification bus to spawner #800
base: development
Are you sure you want to change the base?
Add notification bus to spawner #800
Conversation
Is this PR ready for the review? |
Yes. This code was created to allow notifications about spawning to be sent to other components. Currently, no ROS2Gem components use this feature. |
|
d7359a9
to
7d44c30
Compare
I've added the notification handlers to the behavior context. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested with ScriptCanvas and the notifications work correctly (both spawning and despawning).
A design question: what is the reasoning behind the passing three data fields (spawnableName
, rootEntityId
, ticketName
) when spawning and only one (ticketName
) when despawning? It looks somewhat inconsistent.
I wanted to send as much identifying information as possible. The spawnable name identifies the object type, entity id its place in O3DE, and the ticket name is the unique key that identifies it. There is no need to resend the spawnable name and entity id for the despawn notification as the ticket name uniquely identifies it. |
Signed-off-by: Artur Kamieniecki <[email protected]>
Signed-off-by: Artur Kamieniecki <[email protected]>
Signed-off-by: Artur Kamieniecki <[email protected]>
c406cec
to
ccdaa99
Compare
Rebased and force-pushed on top of the |
What does this PR do?
This PR adds a bus to the spawner component that notifies other components about spawns.
How was this PR tested?
By spawning and despawning entities and listening on the bus with a custom component.