Hello everyone,
so I’m trying to change a couple of prefabs when mouse over/out them, and, I’m using this:
using UnityEngine;
using System.Collections;
public class zr_start : MonoBehaviour {
public GameObject btn_startOver;
void OnMouseEnter() {
Instantiate(btn_startOver, new Vector3(0,0,0), Quaternion.identity);
Destroy(this.gameObject);
}
}
and it do work but it have a 2 second delay to destroy the prefab and add the other one, it does not happen immediately, I was just wondering why that delay and if there’s a way of get rid of that delay maybe???
any idea or help would be great!