Custom nodes can be added to the SoundCue editor by inheriting from USoundNode

  • ParseNodes is essentially a tick function for the node
  • If your node allows children, you need to call ParseNodes on your children - see how the base function USoundNode::ParseNodes is implemented for examples
  • If you don’t call the children’s parsenodes, your node is effectively skipped
  • It seems you need to add at least one FWaveInstance into the WaveInstances parameter in order for any sound to be played. This is handled by nodes like the WavePlayer node as long as you call its ParseNodes when its a child of your node.
  • To keep state for your node, you need to use macros RETRIEVE_SOUNDNODE_PAYLOAD and DECLARE_SOUNDNODE_ELEMENT and some others. Check their usage in existing engine code, they should be fairly straightforward.

Other gotchas

Stop playback early

To stop playback of a node early, you need to set ActiveSound.bFinished = true, but you also need to call WaveInstance->NotifyFinished(false) on any FWaveInstances that your child nodes have generated. If you don’t notify the wave instances, the entire node graph will stop instead of just the current node (for whatever reason)

Parameter affects sound duration

In this case you need to return INDEFINITELY_LOOPING_DURATION from the GetDuration() function. Otherwise the audio cuts out early.