public class ExampleScript : MonoBehaviour {
public CriAtomSource[] atomSources;
private CriAtomExSoundObject[] soundObjects;
void Start ()
{
int numSources = atomSources.Length;
soundObjects = new CriAtomExSoundObject[numSources];
for (int i = 0; i < numSources; i++) {
soundObjects[i] = new CriAtomExSoundObject(false, true);
soundObjects[i].AddPlayer(atomSources[i].player);
}
}
void OnDestroy() {
for (int i = 0; i < soundObjects.Length; i++) {
soundObjects[i].DeleteAllPlayers();
soundObjects[i].Dispose();
}
}
}