📅  最后修改于: 2022-03-11 14:48:22.239000             🧑  作者: Mango
public void GetAllObjectsWithScript() {
ScriptName[] list = FindObjectsOfType(typeof(ScriptName)) as ScriptName[];
foreach(ScriptName obj in list) {
// Do whatever
}
}