FMOD Event Reference Updater Hang

When using the FMOD Event Reference Updater it will hang and stop responding the Unity editor when arriving at the Odin Validator/Editor/Profiles/Main Profile.asset during the ScriptableObjects pass.

I am using Fmod 2.03.07 and Unity 6000.0.42. Might be an Odin issue not sure.

Perhaps it would be nice to Context menu option to scan specific folders so we could skip folders that don’t commonly have references to fmod events stored in them?

Side note, is there a way to combin Odin Validator with Fmod when looking for references?

Thanks for reporting this issue, and we are currently looking into this.

These are two separate plugins which are not aware of each other or their contained types, it’s not something that would be doable.

1 Like

It would be great if we have possibility to exclude some assets and folders from update process, or select working directory. I am also ran in the similar problem with FInd Reference 2 asset, Unity hangs when FMOD tries to scan search cache of this asset. It probably too big or something weird happens under the hood. Usually I have separate folder for all my game stuff, I think there is no need for FMOD to scan whole project.

2 Likes

Thanks for the feedback, I have added that information to our internal task related to the Event Reference Updater slowness/hanging.

I was getting fed up with this still being a problem, so I made a workaround. Instead of scanning the whole assets directory which is time consuming and results in this hang. I added a Search Folder field so you can quickly scan a folder instead of the whole project.

I’m posting it here in case it helps anyone else.**

  1. Replace the hardcoded SearchFolders field:**

csharp

// BEFORE:
private readonly string[] SearchFolders = {
    "Assets",
};

// AFTER:
[SerializeField]
private string searchFolder = "Assets";

2. Add a folder picker to OnGUI, just above the bottom buttons around line 2100:

csharp

// Folder picker — add this just before the "// Buttons" section in OnGUI()
using (new EditorGUILayout.HorizontalScope())
{
    EditorGUILayout.LabelField(L10n.Tr("Search Folder"), GUILayout.Width(EditorGUIUtility.labelWidth));
    EditorGUILayout.LabelField(searchFolder, EditorStyles.textField);

    if (GUILayout.Button(L10n.Tr("Browse…"), GUILayout.Width(70)))
    {
        string selected = EditorUtility.OpenFolderPanel(
            L10n.Tr("Select Folder to Scan"), searchFolder, string.Empty);

        if (!string.IsNullOrEmpty(selected))
        {
            // Convert absolute path to project-relative (must start with "Assets")
            if (selected.StartsWith(Application.dataPath))
            {
                searchFolder = "Assets" + selected.Substring(Application.dataPath.Length);
            }
            else
            {
                EditorUtility.DisplayDialog(
                    L10n.Tr("Invalid Folder"),
                    L10n.Tr("Please select a folder inside the project's Assets directory."),
                    L10n.Tr("OK"));
            }
        }
    }

    if (GUILayout.Button(L10n.Tr("Reset"), GUILayout.Width(50)))
    {
        searchFolder = "Assets";
    }
}

3. Update SearchProject() to use the field instead of the old array:

csharp

// BEFORE:
string[] prefabGuids = AssetDatabase.FindAssets("t:GameObject", SearchFolders);
string[] sceneGuids = AssetDatabase.FindAssets("t:Scene", SearchFolders);
string[] scriptableObjectGuids =
    AssetDatabase.FindAssets("t:ScriptableObject", SearchFolders).Distinct().ToArray();

// AFTER:
string[] searchFolders = new[] { searchFolder };
string[] prefabGuids = AssetDatabase.FindAssets("t:GameObject", searchFolders);
string[] sceneGuids = AssetDatabase.FindAssets("t:Scene", searchFolders);
string[] scriptableObjectGuids =
    AssetDatabase.FindAssets("t:ScriptableObject", searchFolders).Distinct().ToArray();