以下のスクリプトを適当なオブジェクトにもたせれて実行すれば、
EventSystem、Rigidbodyをもつオブジェクトを取得し、Inspectorから把握することができます。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UIElements; namespace UnityEngine.EventSystems { public class FindObjects : MonoBehaviour { public Rigidbody[] RObjects; public EventSystem[] EObjects; void Start() { RObjects = FindObjectsOfType<EventSystem>(); EObjects = FindObjectsOfType<Rigidbody>(); } } } |
スポンサーリンク