Maybe this is a little old, but I ran over the same issue and came up with two simple solutions:
Solution 1
Place your object inside a empty game object at the desired rotation and create the prefab from this empty one. When you instantiate your prefab at identity rotation, the actual object inside the parent will keep the original saved rotation.
Solution 2
Use this code to initialize object:
Instantiate(
myPrefab ,
new Vector3(x,y,z) ,
myPrefab.transform.rotation
);
To be honest, I’ve not tried the second one, but I’m assuming it will spawn it at the prefab stored rotation.
Good luck!
Did you rotate the object before making it a prefab? If not, try doing so.
– Penmanjust tried this, and again, no luck =/
– JaredjarekI'm instantiating with this code: var tempHundred: Transform; tempHundred = Instantiate(hundred,transform.position, transform.rotation); could that be the problem?
– JaredjarekWhat is this attached to? I.E. Which
– Penmantransform
is getting passed to it? Because that's what's going to determine it's position and rotation.