Hey guys just a quick one.
How do I make a script assign the name of the object it is attached to to a variant.
using UnityEngine;
using System.Collections;
public class BuildingAssembler : MonoBehaviour {
public GameObject TargetGameObject;
void Start ()
{
TargetGameObject = //What Would I Put Here??\\);
}
}
I need to to be unique to a number of objects so I can’t just enter the Game Objects Name.
Any help would be great.
Thanks Guys.