static int ToString(IntPtr L)
    {
        LuaScriptMgr.CheckArgsCount(L, 1);
        IM.Vector3 obj = (IM.Vector3)LuaScriptMgr.GetNetObjectSelf(L, 1, "IM.Vector3");
        string     o   = obj.ToString();

        LuaScriptMgr.Push(L, o);
        return(1);
    }
Example #2
0
    private static void ParseTransformToXML(Transform trans, XmlDocument doc, XmlNode parent)
    {
        XmlElement item         = doc.CreateElement(trans.name);
        XmlElement pointNode    = doc.CreateElement("Point");
        XmlElement rotationNode = doc.CreateElement("Rotation");

        IM.Vector3 point = IM.Editor.Tools.Convert(trans.localPosition);
        pointNode.InnerText = point.ToString();
        IM.Quaternion rotation = IM.Editor.Tools.Convert(trans.localRotation);
        rotationNode.InnerText = rotation.ToString();
        item.AppendChild(pointNode);
        item.AppendChild(rotationNode);
        parent.AppendChild(item);
    }