When undoing or redoing modifications to the audio source component resource field, the resource reference is lost if it was an audio random container.
Regression details
Reproducible on 2023.2.0b4 and up.
Not reproducible on 2023.2.0b3 and down.
Repro
- Create and open an empty project.
- Create an audio random container (Assets > Create > Audio > Audio Random Container).
- Import a clip.
- Create an audio source game object (GameObject > Audio > Audio Source).
- Drag the audio random container to the Audio Resource field in the audio source component.
- Drag the clip to the Audio Resource field in the audio source component.
- Undo the latest action.
Expected: The audio source has the audio random container resource.
Actual: The audio source resource is None.
Note
This only happens when the undo / redo action is between audio clip and audio random container.