void RelationSettingControl() { Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition); RaycastHit2D hit = Physics2D.Raycast(ray.origin, ray.direction); if (Input.GetMouseButtonDown(0)) { if (hit.collider != null) { createManager.RelationToggle(hit.collider.gameObject); } } }