Version: 2022.1
言語: 日本語
public static MonoScript[] GetAllRuntimeMonoScripts ();

戻り値

MonoScript[] Returns an array of scripts.

説明

Gets an array of scripts that will be available at runtime.

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}"); } } }