Ejemplo n.º 1
0
        protected override YAMLMappingNode ExportYAMLRoot(IExportContainer container)
        {
            YAMLMappingNode node = base.ExportYAMLRoot(container);

            node.InsertSerializedVersion(ToSerializedVersion(container.ExportVersion));
            node.Add(NavMeshTilesName, NavMeshTiles.ExportYAML(container));
            node.Add(NavMeshBuildSettingsName, GetExportNavMeshBuildSettings(container.Version).ExportYAML(container));
            node.Add(HeightmapsName, Heightmaps.ExportYAML(container));
            node.Add(HeightMeshesName, HeightMeshes.ExportYAML(container));
            node.Add(OffMeshLinksName, OffMeshLinks.ExportYAML(container));
            node.Add(SourceBoundsName, SourceBounds.ExportYAML(container));
            node.Add(RotationName, GetExportRotation(container.Version).ExportYAML(container));
            node.Add(PositionName, Position.ExportYAML(container));
            node.Add(AgentTypeIDName, AgentTypeID);
            return(node);
        }
Ejemplo n.º 2
0
        protected override YAMLMappingNode ExportYAMLRoot(IExportContainer container)
        {
            YAMLMappingNode node = base.ExportYAMLRoot(container);

            node.InsertSerializedVersion(GetSerializedVersion(container.Version));
            node.Add("m_NavMeshTiles", NavMeshTiles.ExportYAML(container));
            node.Add("m_NavMeshBuildSettings", GetExportNavMeshBuildSettings(container.Version).ExportYAML(container));
            node.Add("m_Heightmaps", Heightmaps.ExportYAML(container));
            node.Add("m_HeightMeshes", HeightMeshes.ExportYAML(container));
            node.Add("m_OffMeshLinks", OffMeshLinks.ExportYAML(container));
            node.Add("m_SourceBounds", SourceBounds.ExportYAML(container));
            node.Add("m_Rotation", GetExportRotation(container.Version).ExportYAML(container));
            node.Add("m_Position", Position.ExportYAML(container));
            node.Add("m_AgentTypeID", AgentTypeID);
            return(node);
        }
Ejemplo n.º 3
0
        protected override YAMLMappingNode ExportYAMLRoot(IAssetsExporter exporter)
        {
#warning TODO: values acording to read version (current 2017.3.0f3)
            YAMLMappingNode node = base.ExportYAMLRoot(exporter);
            node.InsertSerializedVersion(GetSerializedVersion(exporter.Version));
            node.Add("m_NavMeshTiles", NavMeshTiles.ExportYAML(exporter));
            node.Add("m_NavMeshBuildSettings", NavMeshBuildSettings.ExportYAML(exporter));
            node.Add("m_Heightmaps", Heightmaps.ExportYAML(exporter));
            node.Add("m_HeightMeshes", HeightMeshes.ExportYAML(exporter));
            node.Add("m_OffMeshLinks", OffMeshLinks.ExportYAML(exporter));
            node.Add("m_SourceBounds", SourceBounds.ExportYAML(exporter));
            node.Add("m_Rotation", Rotation.ExportYAML(exporter));
            node.Add("m_Position", Position.ExportYAML(exporter));
            node.Add("m_AgentTypeID", AgentTypeID);
            return(node);
        }
Ejemplo n.º 4
0
        public override void Read(AssetReader reader)
        {
            base.Read(reader);

            NavMeshTiles = reader.ReadAssetArray <NavMeshTileData>();
            if (HasNavMeshParams(reader.Version))
            {
                NavMeshParams.Read(reader);
            }
            else
            {
                NavMeshBuildSettings.Read(reader);
            }
            Heightmaps   = reader.ReadAssetArray <HeightmapData>();
            HeightMeshes = reader.ReadAssetArray <HeightMeshData>();
            OffMeshLinks = reader.ReadAssetArray <AutoOffMeshLinkData>();
            if (HasSourceBounds(reader.Version))
            {
                SourceBounds.Read(reader);
                Rotation.Read(reader);
                Position.Read(reader);
                AgentTypeID = reader.ReadInt32();
            }
        }
Ejemplo n.º 5
0
        public override void Read(AssetStream stream)
        {
            base.Read(stream);

            m_navMeshTiles = stream.ReadArray <NavMeshTileData>();
            if (IsReadNavMeshParams(stream.Version))
            {
                NavMeshParams.Read(stream);
            }
            else
            {
                NavMeshBuildSettings.Read(stream);
            }
            m_heightmaps   = stream.ReadArray <HeightmapData>();
            m_heightMeshes = stream.ReadArray <HeightMeshData>();
            m_offMeshLinks = stream.ReadArray <AutoOffMeshLinkData>();
            if (IsReadSourceBounds(stream.Version))
            {
                SourceBounds.Read(stream);
                Rotation.Read(stream);
                Position.Read(stream);
                AgentTypeID = stream.ReadInt32();
            }
        }