Pathfinding.GridGraph.DeSerializeSettings C# (CSharp) Method

DeSerializeSettings() public method

public DeSerializeSettings ( AstarSerializer serializer ) : void
serializer AstarSerializer
return void
        public void DeSerializeSettings(AstarSerializer serializer)
        {
            //width = (int)serializer.GetValue ("Width",typeof(int));
            //depth = (int)serializer.GetValue ("Depth",typeof(int));
            //height = (float)serializer.GetValue ("Height",typeof(float));

            unclampedSize = (Vector2)serializer.GetValue ("unclampedSize",typeof(Vector2));

            cutCorners = (bool)serializer.GetValue ("cutCorners",typeof(bool));
            neighbours = (NumNeighbours)serializer.GetValue ("neighbours",typeof(int));

            rotation = (Vector3)serializer.GetValue ("rotation",typeof(Vector3));

            nodeSize = (float)serializer.GetValue ("nodeSize",typeof(float));

            collision = (GraphCollision)serializer.GetValue ("collision",typeof(GraphCollision));

            center = (Vector3)serializer.GetValue ("center",typeof(Vector3));

            maxClimb = (float)serializer.GetValue ("maxClimb",typeof(float));
            maxClimbAxis = (int)serializer.GetValue ("maxClimbAxis",typeof(int),1);
            maxSlope = (float)serializer.GetValue ("maxSlope",typeof(float),90.0F);

            erodeIterations = (int)serializer.GetValue ("erodeIterations",typeof(int));

            penaltyAngle = 			(bool)serializer.GetValue ("penaltyAngle",typeof(bool));
            penaltyAngleFactor = 	(float)serializer.GetValue ("penaltyAngleFactor",typeof(float));
            penaltyPosition = 		(bool)serializer.GetValue ("penaltyPosition",typeof(bool));
            penaltyPositionOffset = (float)serializer.GetValue ("penaltyPositionOffset",typeof(float));
            penaltyPositionFactor = (float)serializer.GetValue ("penaltyPositionFactor",typeof(float));

            aspectRatio = (float)serializer.GetValue ("aspectRatio",typeof(float),1F);

            #if UNITY_EDITOR
            Matrix4x4 oldMatrix = matrix;
            #endif

            GenerateMatrix ();
            SetUpOffsetsAndCosts ();

            #if UNITY_EDITOR
            if (serializer.onlySaveSettings) {
                if (oldMatrix != matrix && nodes != null) {
                    AstarPath.active.AutoScan ();
                }
            }
            #endif

            //Debug.Log ((string)serializer.GetValue ("SomeString",typeof(string)));
            //Debug.Log ((Bounds)serializer.GetValue ("SomeBounds",typeof(Bounds)));
        }