How many time does a prefab takes to load??

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!

Instantiation time depends on the complexity of your prefab.

The best plan is do not instantiate at run time make up a bunch of objects and enable/disable them when you want to create and destroy things - there are also several Assets on the store that will help you with this.