Script for setting levels in our options menu is crashing PS4 build?

The script I’m using to set the levels on our options menu keeps breaking our PS4 builds, and we don’t get any errors the build just doesn’t work when this script is included :frowning: The script works fine in the editor… Any ideas about what could be wrong? Thank you!

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using FMOD.Studio;
using UnityEngine.SceneManagement;
using FMODUnity;


public class AudioLevelControllerNikolajTest : MonoBehaviour
{

    [SerializeField]
    [EventRef]
    private string adjustMusicLevelEvent = "event:/SFX/UI/OptionsMenu/AdjustMusicLevel";

    [SerializeField]
    [EventRef]
    private string adjustMusicLevelMelodyEvent = "event:/SFX/UI/OptionsMenu/AdjustMusicMelody";

    [SerializeField]
    [EventRef]
    private string adjustSFXLevelEvent = "event:/SFX/UI/OptionsMenu/AdjustSFXLevel";

    [SerializeField]
    [EventRef]
    private string adjustCommentsLevelEvent = "event:/SFX/UI/OptionsMenu/AdjustCommentsLevel";

    EventInstance adjustMusicLevelInstance;
    EventInstance adjustSFXLevelInstance;
    EventInstance adjustCommentsLevelInstance;

    Bus masterBus;
    Bus musicBus;
    Bus sfxBus;
    Bus commentsBus;

    FMOD.Studio.PLAYBACK_STATE commentsPlaybackState;
    PLAYBACK_STATE musicPlaybackState;
    PLAYBACK_STATE sfxPlaybackState;

    void Start()
    {
        masterBus = RuntimeManager.GetBus("bus:/");
        musicBus = RuntimeManager.GetBus("bus:/MusicMainGroup");
        sfxBus= RuntimeManager.GetBus("bus:/SFX");
        commentsBus = RuntimeManager.GetBus("bus:/Comments");

        adjustCommentsLevelInstance = RuntimeManager.CreateInstance(adjustCommentsLevelEvent);
        adjustSFXLevelInstance = RuntimeManager.CreateInstance(adjustSFXLevelEvent);
    }

    public void MasterLevelChange (float level)
    {
        masterBus.setVolume(level);
    }

    public void MusicLevelChange(float level)
    {
        musicBus.setVolume(level);

        adjustMusicLevelInstance.getPlaybackState(out musicPlaybackState);

        if ((musicPlaybackState == FMOD.Studio.PLAYBACK_STATE.STOPPED || musicPlaybackState == FMOD.Studio.PLAYBACK_STATE.STOPPING))
        {
            adjustMusicLevelInstance = RuntimeManager.CreateInstance(adjustMusicLevelEvent);
            adjustMusicLevelInstance.setParameterValue("AdjustLevelTrig", 1f);
            adjustMusicLevelInstance.start();
            adjustMusicLevelInstance.setParameterValue("TrigSound", 1f);
            adjustMusicLevelInstance.release();
        }
        else
        {
            adjustMusicLevelInstance.setParameterValue("AdjustLevelTrig", 1f);
            adjustMusicLevelInstance.setParameterValue("TrigSound", 1f);
        }

    }

    public void SFXLevelChange(float level)
    {
        adjustSFXLevelInstance.getPlaybackState(out sfxPlaybackState);

        sfxBus.setVolume(level);
        RuntimeManager.PlayOneShot(adjustSFXLevelEvent);

    }

    public void CommentsLevelChange(float level)
    {

        adjustCommentsLevelInstance.getPlaybackState(out commentsPlaybackState);

        commentsBus.setVolume(level);

        if ((commentsPlaybackState == FMOD.Studio.PLAYBACK_STATE.STOPPED || commentsPlaybackState == FMOD.Studio.PLAYBACK_STATE.STOPPING))
        {
            adjustCommentsLevelInstance.start();
        }

    }

    private void OnDestroy()
    {
        adjustMusicLevelInstance.release();
        adjustSFXLevelInstance.release();
        adjustMusicLevelInstance.stop(FMOD.Studio.STOP_MODE.ALLOWFADEOUT);
    }

    private void OnDisable()
    {
        adjustMusicLevelInstance.stop(FMOD.Studio.STOP_MODE.ALLOWFADEOUT);
    }
}

Okay I solved the problem. When the game started, we were setting levels of the FMOD busses using masterBus.setVolume(level); and this was crashing the game. But adding a very short delay before this solved the problem…