- Home /
"The object is not the main asset" error on network.instantiate
I'm encountering an issue with Network instantiation of a prefab that I can't find any information about.
"The object is not the main asset. Only root objecs of a prefab may be used for Instantiating UnityEngine.Network:Instantiate(Object, Vector3, Quaternion, Int32)"
The code looks like this:
var newMissile = Network.Instantiate(missilePrefab, transform.position + transform.TransformDirection(originOffset), launchTube.rotation, 1) as GameObject;
The problem began when I added a child object to an existing prefab. Before this the missile would launch without problems. Now even if I change the prefab in question to another without any children the error still occurs.
Does anyone know what this error actually means and what might be causing it?
Your answer
 
 
              koobas.hobune.stream
koobas.hobune.stream 
                       
                
                       
			     
			 
                