using System.Collections; using System.Collections.Generic; using System.Linq; using UnityEngine; public class PostureController : MonoBehaviour { public List redObjs = new List(); public List blueObjs = new List(); public DeviceManager deviceManager; public Transform redContanier; public Transform blueContanier; // Start is called before the first frame update void Awake() { deviceManager = DeviceManager.Instance; } // Update is called once per frame void Update() { } private void OnEnable() { GetSceneInfo(); } private void GetSceneInfo() { redObjs = deviceManager.devices.Where(x => x != null && x.gameObject.layer == 11).ToList(); blueObjs = deviceManager.devices.Where(x => x != null && x.gameObject.layer == 12).ToList(); } }