Make gameobject appear when another is close

I want to use C# script to make a gameobject appear when another certain gameobject is close. Any way i can do this?

The easiest way i can think of is to
1.) Make an empty gameobject.
2.) Put the pillar inside the empty.
3.) Put a sphere collider component in the empty gameobject and set it to the size that you want.
4.) MAKE SURE the sphere collider is a trigger or it wont work.
5.) Make a script and put this code in it.

	public GameObject Pillar;

	void OnTriggerEnter(Collider other)
	{
		if (other.gameObject.tag == "Player")
		{

			Pillar.SetActive(true);
		}
	}

6.) in unity set the pillar gameobject in the script as the pillar you want to appear.
7.)set the pillar inside the empty as inactive.
btw make sure the script is in the empty gameobject

EDIT: when i say put the pillar in the empty gameobject, i meant make it a child of the gameobject in the hierarchy.

You can use this to check the distance between 2 objects.

if(Vector3.Distance(position1, position2) < 2){
//Make things happen
}

You can also use object1.SetActive(true) to make a gameobject appear (if you first uncheck it’s active box in the top left of the inespector.