I wrote two simple scripts:
The first is:
using UnityEngine;
using System.Collections;
public class Cube : MonoBehaviour {
public GameObject goSide;
public Side sideToon;
// Use this for initialization
void Start () {
goSide = new GameObject("NewSide");
goSide.AddComponent<Side>();
goSide.transform.parent=this.transform;
goSide.transform.localEulerAngles=new Vector3(180.0f,90.0f,0.0f);
}
// Update is called once per frame
void Update () {
}
}
The second is this:
using UnityEngine;
using System.Collections;
public class Side : MonoBehaviour {}
I created a cube, attached the cube Script. When playing the inspector shows X Rotation= -5.008957e-06 (???)
When using other numbers strange results appear.
When using 90.0f everything is fine.
The rotation in Game seems correct. Some aftereffects occure.
Whats going on?