void HoverObject() { var ray = Camera.main.ScreenPointToRay(Input.mousePosition); Debug.DrawRay(ray.origin, ray.direction * 100, Color.yellow); RaycastHit hit; if (Physics.Raycast(ray, out hit, 100000)) { string name = hit.collider.gameObject.name; Debug.Log("SELECTION MANAGER : object detected (" + name + ")"); Behaviour halo = simc.GetHaloComponent(name); halo.enabled = true; lastactive = halo; } else if (lastactive != null) { Debug.Log("SELECTION MANAGER : nothing selected"); lastactive.enabled = false; lastactive = null; } }