public override void SerializeSettings(GraphSerializationContext ctx)
 {
     base.SerializeSettings(ctx);
     ctx.SerializeUnityObject(this.sourceMesh);
     ctx.SerializeVector3(this.offset);
     ctx.SerializeVector3(this.rotation);
     ctx.writer.Write(this.scale);
     ctx.writer.Write(this.accurateNearestNode);
 }
Exemple #2
0
		internal static void SerializeReferences(GraphSerializationContext ctx)
		{
			List<NodeLink2> modifiersOfType = GraphModifier.GetModifiersOfType<NodeLink2>();
			ctx.writer.Write(modifiersOfType.Count);
			foreach (NodeLink2 nodeLink in modifiersOfType)
			{
				ctx.writer.Write(nodeLink.uniqueID);
				ctx.SerializeNodeReference(nodeLink.startNode);
				ctx.SerializeNodeReference(nodeLink.endNode);
				ctx.SerializeNodeReference(nodeLink.connectedNode1);
				ctx.SerializeNodeReference(nodeLink.connectedNode2);
				ctx.SerializeVector3(nodeLink.clamped1);
				ctx.SerializeVector3(nodeLink.clamped2);
				ctx.writer.Write(nodeLink.postScanCalled);
			}
		}
Exemple #3
0
        internal static void SerializeReferences(GraphSerializationContext ctx)
        {
            var links = GetModifiersOfType <NodeLink2>();

            ctx.writer.Write(links.Count);
            foreach (var link in links)
            {
                ctx.writer.Write(link.uniqueID);
                ctx.SerializeNodeReference(link.startNode);
                ctx.SerializeNodeReference(link.endNode);
                ctx.SerializeNodeReference(link.connectedNode1);
                ctx.SerializeNodeReference(link.connectedNode2);
                ctx.SerializeVector3(link.clamped1);
                ctx.SerializeVector3(link.clamped2);
                ctx.writer.Write(link.postScanCalled);
            }
        }
Exemple #4
0
        public override void SerializeSettings(GraphSerializationContext ctx)
        {
            base.SerializeSettings(ctx);

            ctx.SerializeUnityObject(root);
            ctx.writer.Write(searchTag ?? "");
            ctx.writer.Write(maxDistance);
            ctx.SerializeVector3(limits);
            ctx.writer.Write(raycast);
            ctx.writer.Write(use2DPhysics);
            ctx.writer.Write(thickRaycast);
            ctx.writer.Write(thickRaycastRadius);
            ctx.writer.Write(recursive);
            ctx.writer.Write(autoLinkNodes);
            ctx.writer.Write((int)mask);
        }
Exemple #5
0
 public override void SerializeExtraInfo(GraphSerializationContext ctx)
 {
     if (this.nodes == null || this.originalVertices == null || this._vertices == null || this.originalVertices.Length != this._vertices.Length)
     {
         ctx.writer.Write(-1);
         ctx.writer.Write(-1);
         return;
     }
     ctx.writer.Write(this.nodes.Length);
     ctx.writer.Write(this._vertices.Length);
     for (int i = 0; i < this._vertices.Length; i++)
     {
         ctx.SerializeInt3(this._vertices[i]);
         ctx.SerializeVector3(this.originalVertices[i]);
     }
     for (int j = 0; j < this.nodes.Length; j++)
     {
         this.nodes[j].SerializeNode(ctx);
     }
 }
Exemple #6
0
        public override void SerializeExtraInfo(GraphSerializationContext ctx)
        {
            if (nodes == null || originalVertices == null || _vertices == null || originalVertices.Length != _vertices.Length)
            {
                ctx.writer.Write(-1);
                ctx.writer.Write(-1);
                return;
            }
            ctx.writer.Write(nodes.Length);
            ctx.writer.Write(_vertices.Length);

            for (int i = 0; i < _vertices.Length; i++)
            {
                ctx.SerializeInt3(_vertices[i]);
                ctx.SerializeVector3(originalVertices[i]);
            }

            for (int i = 0; i < nodes.Length; i++)
            {
                nodes[i].SerializeNode(ctx);
            }
        }
        public override void SerializeSettings (GraphSerializationContext ctx) {
            base.SerializeSettings(ctx);

            ctx.SerializeUnityObject(root);
            ctx.writer.Write(searchTag ?? "");
            ctx.writer.Write(maxDistance);
            ctx.SerializeVector3(limits);
            ctx.writer.Write(raycast);
            ctx.writer.Write(use2DPhysics);
            ctx.writer.Write(thickRaycast);
            ctx.writer.Write(thickRaycastRadius);
            ctx.writer.Write(recursive);
            ctx.writer.Write(autoLinkNodes);
            ctx.writer.Write((int)mask);
            ctx.writer.Write(optimizeForSparseGraph);
            ctx.writer.Write(optimizeFor2D);
        }