i have problem with find gameobject in circle area
i tried with Collider2D and tags but didnt work
i have more 200 objects in sence and i just want show gameObject in Circle Area
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class CircleShow : MonoBehaviour
{
public GameObject ParentObj;
public GameObject GroundObjectsArray;
public List GroundObjectsList = new List();
public SpriteRenderer SpriteGround;
void Awake()
{
SpriteGround = ParentObj.transform.GetComponentsInChildren<SpriteRenderer>();
GroundObjectsArray = new GameObject[ParentObj.transform.childCount];
}
void Update()
{
for (int i = 0; i < GroundObjectsArray.Length; i++)
{
GroundObjectsArray *= ParentObj.transform.GetChild(i).gameObject;*
//GroundObjectsArray*.gameObject.SetActive(false);*
SpriteGround*.color -= new Color(0, 0, 0, 255);*
ObjectsInArea(GroundObjectsArray*);*
}
}
// get which gameobject in circle area
public void ObjectsInArea(GameObject GroundObj)
{
if()
{
GroundObjectsList.Add(GroundObj);
}
}
}
***
i new in unity and i use Physics2D.OverlapCircle but didn’t work for me because it just return boolean(true , false) i need just calculation Gameobject in area set to list