MonoScript[] Returns an array of scripts.
Gets an array of scripts that will be available at runtime.
Additional resources: AssetDatabase.FindAssets.
using UnityEngine; using UnityEditor;
class Example { [MenuItem("Examples/Get Scripts Available at Runtime")] public static void GetScriptsAvailableAtRuntime() { foreach (var monoScript in MonoImporter.GetAllRuntimeMonoScripts()) { Debug.Log($"Class: {monoScript.GetClass()}, Name: {monoScript.name}"); } } }