I have a sprite game object with an image which i want to instantiate to three positions. I use this
public GameObject people;
Vector3[] positionArray = new [] { new Vector3(10.362f,-2.2677f,0f), new Vector3(15.874f,10.257f,0f), new Vector3(-24.073f, 7.8497f,0f) };
// Use this for initialization
void Start () {
// create an array of points for the people to be spawned
people = GameObject.Find ("Cube");
RandomPlace();
}
// Update is called once per frame
void Update () {
}
public void RandomPlace() {
GameObject obj = (GameObject)Instantiate(people, positionArray[Random.Range(0, 3)],people.transform.rotation);
}
but when the game object is instantiated its quality is not good, kind of pixelated at the edges. What is causing this ? I use unity 4.6