Example #1
0
    public override string ToXML()
    {
        StringBuilder sb = new StringBuilder();

        sb.Append(base.ToXML());
        sb.AppendLine("<time>" + time + "</time>");
        sb.AppendLine("<introStartEasePercentage>" + introStartEasePercentage + "</introStartEasePercentage>");
        sb.AppendLine("<outroEndEasePercentage>" + outroEndEasePercentage + "</outroEndEasePercentage>");
        sb.AppendLine(XMLVariableConverter.ToXML(introCurve, "introCurve"));
        sb.AppendLine(XMLVariableConverter.ToXML(outroCurve, "outroCurve"));
        return(sb.ToString());
    }
Example #2
0
    public virtual string ToXML()
    {
        StringBuilder sb = new StringBuilder();

        sb.AppendLine("<trackpoint>");
        sb.AppendLine("<pointName>" + pointName + "</pointName>");
        sb.AppendLine("<baseTransform>" + baseTransform.name + "</baseTransform>");
        sb.AppendLine(XMLVariableConverter.ToXML(_position, "position"));//  "<RENAME>" + _position + "<RENAME>");
        sb.AppendLine("<_width>" + _width + "</_width>");
        sb.AppendLine("<_crownAngle>" + _crownAngle + "</_crownAngle>");
        sb.AppendLine("<_splitControlPoints>" + _splitControlPoints + "</_splitControlPoints>");
        sb.AppendLine(XMLVariableConverter.ToXML(_forwardControlPoint, "_forwardControlPoint"));             // + _forwardControlPoint + "<RENAME>");
        sb.AppendLine(XMLVariableConverter.ToXML(_backwardControlPoint, "_backwardControlPoint"));           // + _backwardControlPoint + "<RENAME>");
        sb.AppendLine(XMLVariableConverter.ToXML(_leftTrackBoundary, "_leftTrackBoundary"));                 // _leftTrackBoundary + "<RENAME>");
        sb.AppendLine(XMLVariableConverter.ToXML(_leftForwardControlPoint, "_leftForwardControlPoint"));     // _leftForwardControlPoint + "<RENAME>");
        sb.AppendLine(XMLVariableConverter.ToXML(_leftBackwardControlPoint, "_leftBackwardControlPoint"));   // _leftBackwardControlPoint + "<RENAME>");
        sb.AppendLine("<_leftSplitControlPoints>" + _leftSplitControlPoints + "</_leftSplitControlPoints>");
        sb.AppendLine(XMLVariableConverter.ToXML(_rightTrackBoundary, "_rightTrackBoundary"));               // _rightTrackBoundary + "<RENAME>");
        sb.AppendLine(XMLVariableConverter.ToXML(_rightForwardControlPoint, "_rightForwardControlPoint"));   // _rightForwardControlPoint + "<RENAME>");
        sb.AppendLine(XMLVariableConverter.ToXML(_rightBackwardControlPoint, "_rightBackwardControlPoint")); // _rightBackwardControlPoint + "<RENAME>");
        sb.AppendLine("<_rightSplitControlPoints>" + _rightSplitControlPoints + "</_rightSplitControlPoints>");
        sb.AppendLine(XMLVariableConverter.ToXML(_trackDirection, "_trackDirection"));                       // _trackDirection + "<RENAME>");
        sb.AppendLine(XMLVariableConverter.ToXML(_trackUpQ, "_trackUpQ"));                                   //+ _trackUpQ + "<RENAME>");
        sb.AppendLine(XMLVariableConverter.ToXML(_trackCross, "_trackCross"));                               // _trackCross + "<RENAME>");
        sb.AppendLine("<shouldReRender>" + shouldReRender + "</shouldReRender>");
        //Curve Variables
        sb.AppendLine("<lastPoint>" + lastPoint.pointName + "</lastPoint>");
        sb.AppendLine("<nextPoint>" + nextPoint.pointName + "</nextPoint>");
        sb.AppendLine("<arcLength>" + arcLength + "</arcLength>");
        sb.AppendLine("<_render>" + _render + "</_render>");
        sb.AppendLine("<_renderBounds>" + _renderBounds + "</_renderBounds>");
        sb.AppendLine("<_trackCollider>" + _trackCollider + "</_trackCollider>");
        sb.AppendLine("<_extrudeTrack>" + _extrudeTrack + "</_extrudeTrack>");
        sb.AppendLine("<_extrudeLength>" + _extrudeLength + "</_extrudeLength>");
        sb.AppendLine("<_extrudeTrackBottom>" + _extrudeTrackBottom + "</_extrudeTrackBottom>");
        sb.AppendLine("<_extrudeCurveEnd>" + _extrudeCurveEnd + "</_extrudeCurveEnd>");
        sb.AppendLine("<_extrudeBevel>" + _extrudeBevel + "</_extrudeBevel>");
        sb.AppendLine("<generateBumpers>" + generateBumpers + "</generateBumpers>");
        sb.AppendLine("<boundaryHeight>" + _boundaryHeight + "</boundaryHeight>");
        sb.AppendLine("<trackTextureStyleIndex>" + trackTextureStyleIndex + "</trackTextureStyleIndex>");
        sb.AppendLine("<offroadTextureStyleIndex>" + offroadTextureStyleIndex + "</offroadTextureStyleIndex>");
        sb.AppendLine("<boundaryTextureStyleIndex>" + boundaryTextureStyleIndex + "</boundaryTextureStyleIndex>");
        sb.AppendLine("<bumperTextureStyleIndex>" + bumperTextureStyleIndex + "</bumperTextureStyleIndex>");
        sb.AppendLine("<bottomTextureStyleIndex>" + bottomTextureStyleIndex + "</bottomTextureStyleIndex>");
        sb.AppendLine("</trackpoint>");
        return(sb.ToString());
    }
Example #3
0
    public virtual string ToXML()
    {
        StringBuilder sb = new StringBuilder();

        sb.AppendLine("<texture>");
        sb.AppendLine("<customName>" + customName + "</customName>");
        sb.AppendLine("<tiled>" + tiled + "</tiled>");
        sb.AppendLine("<patterned>" + patterned + "</patterned>");
        sb.AppendLine("<flipped>" + flipped + "</flipped>");
        sb.AppendLine("<type>" + type + "</type>");
        sb.AppendLine(XMLVariableConverter.ToXML(_tileUnitUV, "_tileUnitUV"));
        sb.AppendLine(XMLVariableConverter.ToXML(_textureUnitSize, "_textureUnitSize"));
        sb.AppendLine("<tiledX>" + tiledX + "</tiledX>");
        sb.AppendLine("<tiledY>" + tiledY + "</tiledY>");
        sb.AppendLine(XMLVariableConverter.ToXML(maxUVTile, "maxUVTile"));
        sb.AppendLine(XMLVariableConverter.ToXML(minWorldUnits, "minWorldUnits"));
        sb.AppendLine(XMLVariableConverter.ToXML(maxWorldUnits, "maxWorldUnits"));
        sb.AppendLine("<_proceduralMaterial>" + AssetDatabase.GetAssetPath(_proceduralMaterial) + "</_proceduralMaterial>");
        sb.AppendLine("<_userMaterial>" + AssetDatabase.GetAssetPath(_userMaterial) + "</_userMaterial>");
        sb.AppendLine("<texture>" + AssetDatabase.GetAssetPath(material.mainTexture) + "</texture>");
        sb.AppendLine(XMLVariableConverter.ToXML(material.color, "color"));
        sb.AppendLine("</texture>");
        return(sb.ToString());
    }