Hashtable makes a prefab instance lose Mesh Renderer enable property

Hi everyone

I wonder why Hashtable does like title

Here is codes

Hashtable mapShip = new Hashtable();

public class data
{
public GameObject oShip;
}

data itm = new data();
itm.oShip = (GameObject)Instantiate(fabShip, position, rotation); // I can see a ship correctly until here but

mapShip.Add(key, itm); // the ship disappeared here is a screenshot images


As you can see the inspector window shows the Mesh Renderer component is disabled

Could you help me? I really have no idea what the problem is…


Oh I’m sorry

It is not hashtable problem but my own handling code

I disabled a ship which is far from main camera.

It’s is solved.