Hello,
We’re using ScriptableObjects as sound containers in our project. They contain a List of a custom class “SoundEvent”, which has an EventReference field inside. Unfortunately, the Event Reference Updater doesn’t seem to be able to detect changes in these EventReferences whenever we rename events in FMOD Studio. Is there any way I could modify the EventReferenceUpdater script to find and update the changes in these references? I’m attaching the relevant snippets of code for context below.
Scriptable Object:
using System.Collections.Generic;
using UnityEngine;
namespace Eof.Sound
{
public class SoundHolderSO : ScriptableObject
{
[SerializeField] private List<SoundEvent> soundEvents = new();
[SerializeField] private List<MusicEvent> musicEvents = new();
public List<SoundEvent> SoundEvents => soundEvents;
public List<MusicEvent> MusicEvents => musicEvents;
}
}
SoundEvent:
using System;
using FMODUnity;
using UnityEngine;
using Eof.Tools;
namespace Eof.Sound
{
[Serializable]
public class SoundEvent
{
[SerializeField] protected SoundActionType actionType = SoundActionType.Start;
[SerializeField] protected SoundHandlerTrigger trigger;
[SerializeField, SoundAnimationTrigger, SoundAnimationClip] protected AnimationClip animationClip;
[SerializeField, SoundAnimationTrigger] protected int animationFrame;
[SerializeField] protected EventReference reference;
[SerializeField] protected bool followsTransform = true;
[HideInInspector] [SerializeField] protected FMOD.GUID eventID;
public EventReference Reference => reference;
public SoundHandlerTrigger Trigger => trigger;
public SoundActionType ActionType => actionType;
public AnimationClip AnimationClip => animationClip;
public int AnimationFrame => animationFrame;
}
}
Thanks.