using System.Collections; using System.Collections.Generic; using UnityEngine; using static Unity.VisualScripting.Metadata; public class ObjectSelectionSafe : MonoBehaviour { public GameObject unselectedArrow; public GameObject selectedArrowAvoid; public GameObject selectedArrowSafe; public bool selected = false; // Start is called before the first frame update void Start() { } // Update is called once per frame void Update() { } public void selectUnSelectObject(GameObject currentGameObject) { if (selected == false) { selected = true; unselectedArrow.SetActive(false); selectedArrowSafe.SetActive(true); } else if (selected == true) { selected = false; unselectedArrow.SetActive(true); selectedArrowSafe.SetActive(false); } } /* List foundObjects = new List(); GameObject[] allObjects = GameObject.FindObjectsOfType(true); foreach (GameObject obj in allObjects) { if (obj.CompareTag("selectingSignifier")) { obj.SetActive(true); } } */ }