Skip to content

Add audio asset events#212

Merged
waynemwashuma merged 6 commits intowimaengine:devfrom
waynemwashuma:add-audio-asset-events
Jul 28, 2025
Merged

Add audio asset events#212
waynemwashuma merged 6 commits intowimaengine:devfrom
waynemwashuma:add-audio-asset-events

Conversation

@waynemwashuma
Copy link
Collaborator

@waynemwashuma waynemwashuma commented Jul 28, 2025

Objective

  • Implements Add asset lifecycle events #208 for audio assets, in this case, only for Audio asset type.You can now check for addition, modification and deletion of an Audio asset.

Solution

N/A

Showcase

function readEvents(world){
  const additions = world.getResourceByTypeId<Events<AudioAdded>>(typeidGeneric(Events,[AudioAdded]))
  const modifications = world.getResourceByTypeId<Events<AudioModified>>(typeidGeneric(Events,[AudioModified]))
  const deletions = world.getResourceByTypeId<Events<AudioDropped>>(typeidGeneric(Events,[AudioDropped]))

  // do something with the events
}

Migration guide

N/A

Checklist

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.

@waynemwashuma waynemwashuma marked this pull request as ready for review July 28, 2025 16:11
@waynemwashuma waynemwashuma merged commit 9ac1aa7 into wimaengine:dev Jul 28, 2025
1 check passed
@waynemwashuma waynemwashuma deleted the add-audio-asset-events branch July 28, 2025 16:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

mod:audio type:enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant