Skip to content

Sroka/EcsAudioBridge

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 

EcsAudioBridge

Unity AudioSource pooling system usable from ECS

How to use

In order to use just add EcsAudioSource component to object. It will automatically add AudioSource and read all data from it

To play audio from ECS system just call Play() or PlayOneShot() method on a component:

            Entities.ForEach((ref EcsAudioSource ecsAudioSource, ) =>
            {
                if (/* Some condition */)
                {
                    ecsAudioSource.PlayOneShot();
                }
            }).Schedule();
            Entities.ForEach((ref EcsAudioSource ecsAudioSource, ) =>
            {
                if (/* Some condition */)
                {
                    ecsAudioSource.Play();
                }
            }).Schedule();

About

Unity AudioSource pooling system usable from ECS

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages