MonoScript[] Returns an array of scripts.
Gets an array of scripts that will be available at runtime.
See Also: 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}"); } } }