Skip to main content

MissingScriptsFinder

Important Attention Reminder

Coding Style wiki


MissingScriptsFinder searches scenes and prefabs for Missing Scripts (lost script references). The results are printed as clickable logs (click in the Console to ping the corresponding object/asset). Supported search scopes: loaded scenes, Build Settings scenes, all project scenes, and all prefabs (modified from Mr-sB/MissingScriptsFinder).

NamespaceOxGKit.Utilities.MissingFinder.Editor
Typepublic static class MissingScriptsFinder
SourceMissingScriptsFinder.cs

The features live under MissingScriptsFinder in the main menu bar:

MenuDescription
MissingScriptsFinder/Search in loaded scenesSearches currently loaded scenes for Missing Scripts.
MissingScriptsFinder/Search in build settings scenesSearches enabled scenes in Build Settings for Missing Scripts.
MissingScriptsFinder/Search in build settings scenes (include disable)Searches all scenes in Build Settings (including disabled ones) for Missing Scripts.
MissingScriptsFinder/Search in project all scenesSearches all scenes in the project for Missing Scripts.
MissingScriptsFinder/Search in all prefabsSearches all prefabs in the project for Missing Scripts.

Reminder The search recursively checks all children; unloaded scenes are opened additively for the check and closed automatically afterwards, leaving the current scene state untouched.


Method Overview

The following methods match the menu items above and can also be called directly from custom tooling:

MethodDescription
FindMissingScriptsInLoadedScenesSearches loaded scenes.
FindMissingScriptsInBuildSettingsScenesSearches enabled Build Settings scenes.
FindMissingScriptsInBuildSettingsScenesIncludeDisableSearches all Build Settings scenes (including disabled).
FindMissingScriptsInProjectAllScenesSearches all project scenes.
FindMissingScriptsInAllPrefabsSearches all project prefabs.

FindMissingScriptsInLoadedScenes

public static void FindMissingScriptsInLoadedScenes()

Searches all objects (including children) in the currently loaded scenes for Missing Scripts.

FindMissingScriptsInBuildSettingsScenes

public static void FindMissingScriptsInBuildSettingsScenes()

Searches the enabled scenes in Build Settings for Missing Scripts.

FindMissingScriptsInBuildSettingsScenesIncludeDisable

public static void FindMissingScriptsInBuildSettingsScenesIncludeDisable()

Searches all scenes in Build Settings (including disabled scenes) for Missing Scripts.

FindMissingScriptsInProjectAllScenes

public static void FindMissingScriptsInProjectAllScenes()

Searches every scene asset in the project for Missing Scripts.

FindMissingScriptsInAllPrefabs

public static void FindMissingScriptsInAllPrefabs()

Scans the script references of all prefabs in the project (matching script GUIDs), checks each suspicious prefab, and prints the Missing Scripts count with locating logs.