Esempio n. 1
0
 public static Vector3 ToUnityVector(this Serializable.Vector3 v)
 {
     return(new Vector3
     {
         x = v.X,
         y = v.Y,
         z = v.Z,
     });
 }
Esempio n. 2
0
 public override void Fill <T>(T t)
 {
     UnityEngine.Transform obj = t as UnityEngine.Transform;
     if (obj != null)
     {
         this.position = obj.position;
         this.rotation = obj.rotation.eulerAngles;
         this.scale    = obj.localScale;
     }
     else
     {
         Debug.LogWarning("type error cast " + t.GetType().ToString() + "  to " + this.GetType().ToString());
     }
 }
Esempio n. 3
0
 public override void FillMemberDefault()
 {
     if (position == null)
     {
         position = new Vector3();
     }
     if (scale == null)
     {
         scale = new Vector3();
     }
     if (rotation == null)
     {
         rotation = new Vector3();
     }
 }