Version: 2020.3
言語: 日本語
public static Object[] objects ;

説明

シーンからフィルタせずに Selection のオブジェクトを返します

プロジェクトのアセットを含むすべてのオブジェクトが返されます。また Selection にオブジェクトを割り当てることができます。

See Also: Selection.instanceIDs.


Scriptable Wizard that lets you select GameObjects by their tag.

using UnityEngine;
using UnityEditor;

class SelectAllOfTag : ScriptableWizard { string tagName = "ExampleTag";

[MenuItem("Example/Select All of Tag...")] static void SelectAllOfTagWizard() { ScriptableWizard.DisplayWizard( "Select All of Tag...", typeof(SelectAllOfTag), "Make Selection"); }

void OnWizardCreate() { GameObject[] gos = GameObject.FindGameObjectsWithTag(tagName); Selection.objects = gos; } }