Serialization patch

This commit is contained in:
wrenge 2024-02-27 17:21:32 +03:00
parent b81a5923a3
commit 838064f3b6
8 changed files with 26 additions and 9 deletions

View File

@ -18,6 +18,8 @@ freely, subject to the following restrictions:
3. This notice may not be removed or altered from any source distribution. 3. This notice may not be removed or altered from any source distribution.
*/ */
using System;
namespace DotRecast.Detour namespace DotRecast.Detour
{ {
/** /**
@ -26,6 +28,7 @@ namespace DotRecast.Detour
* @note This structure is rarely if ever used by the end user. * @note This structure is rarely if ever used by the end user.
* @see MeshTile * @see MeshTile
*/ */
[Serializable]
public class DtBVNode public class DtBVNode
{ {
/** Minimum bounds of the node's AABB. [(x, y, z)] */ /** Minimum bounds of the node's AABB. [(x, y, z)] */

View File

@ -18,8 +18,11 @@ freely, subject to the following restrictions:
3. This notice may not be removed or altered from any source distribution. 3. This notice may not be removed or altered from any source distribution.
*/ */
using System;
namespace DotRecast.Detour namespace DotRecast.Detour
{ {
[Serializable]
public class DtMeshData public class DtMeshData
{ {
/** The tile header. */ /** The tile header. */

View File

@ -18,11 +18,13 @@ freely, subject to the following restrictions:
3. This notice may not be removed or altered from any source distribution. 3. This notice may not be removed or altered from any source distribution.
*/ */
using System;
using DotRecast.Core.Numerics; using DotRecast.Core.Numerics;
namespace DotRecast.Detour namespace DotRecast.Detour
{ {
/** Provides high level information related to a dtMeshTile object. */ /** Provides high level information related to a dtMeshTile object. */
[Serializable]
public class DtMeshHeader public class DtMeshHeader
{ {
/** Tile magic number. (Used to identify the data format.) */ /** Tile magic number. (Used to identify the data format.) */

View File

@ -18,6 +18,7 @@ freely, subject to the following restrictions:
3. This notice may not be removed or altered from any source distribution. 3. This notice may not be removed or altered from any source distribution.
*/ */
using System;
using DotRecast.Core.Numerics; using DotRecast.Core.Numerics;
namespace DotRecast.Detour namespace DotRecast.Detour

View File

@ -18,12 +18,14 @@ freely, subject to the following restrictions:
3. This notice may not be removed or altered from any source distribution. 3. This notice may not be removed or altered from any source distribution.
*/ */
using System;
using DotRecast.Core.Numerics; using DotRecast.Core.Numerics;
namespace DotRecast.Detour namespace DotRecast.Detour
{ {
/// Defines an navigation mesh off-mesh connection within a dtMeshTile object. /// Defines an navigation mesh off-mesh connection within a dtMeshTile object.
/// An off-mesh connection is a user defined traversable connection made up to two vertices. /// An off-mesh connection is a user defined traversable connection made up to two vertices.
[Serializable]
public class DtOffMeshConnection public class DtOffMeshConnection
{ {
/// The endpoints of the connection. [(ax, ay, az, bx, by, bz)] /// The endpoints of the connection. [(ax, ay, az, bx, by, bz)]

View File

@ -18,18 +18,21 @@ freely, subject to the following restrictions:
3. This notice may not be removed or altered from any source distribution. 3. This notice may not be removed or altered from any source distribution.
*/ */
using System;
namespace DotRecast.Detour namespace DotRecast.Detour
{ {
/** Defines a polygon within a MeshTile object. */ /** Defines a polygon within a MeshTile object. */
[Serializable]
public class DtPoly public class DtPoly
{ {
public readonly int index; public int index;
/** The indices of the polygon's vertices. The actual vertices are located in MeshTile::verts. */ /** The indices of the polygon's vertices. The actual vertices are located in MeshTile::verts. */
public readonly int[] verts; public int[] verts;
/** Packed data representing neighbor polygons references and flags for each edge. */ /** Packed data representing neighbor polygons references and flags for each edge. */
public readonly int[] neis; public int[] neis;
/** The user defined polygon flags. */ /** The user defined polygon flags. */
public int flags; public int flags;

View File

@ -21,19 +21,19 @@ freely, subject to the following restrictions:
namespace DotRecast.Detour namespace DotRecast.Detour
{ {
/** Defines the location of detail sub-mesh data within a dtMeshTile. */ /** Defines the location of detail sub-mesh data within a dtMeshTile. */
public readonly struct DtPolyDetail public struct DtPolyDetail
{ {
/** The offset of the vertices in the MeshTile::detailVerts array. */ /** The offset of the vertices in the MeshTile::detailVerts array. */
public readonly int vertBase; public int vertBase;
/** The offset of the triangles in the MeshTile::detailTris array. */ /** The offset of the triangles in the MeshTile::detailTris array. */
public readonly int triBase; public int triBase;
/** The number of vertices in the sub-mesh. */ /** The number of vertices in the sub-mesh. */
public readonly int vertCount; public int vertCount;
/** The number of triangles in the sub-mesh. */ /** The number of triangles in the sub-mesh. */
public readonly int triCount; public int triCount;
public DtPolyDetail(int vertBase, int triBase, int vertCount, int triCount) public DtPolyDetail(int vertBase, int triBase, int vertCount, int triCount)
{ {

View File

@ -1,5 +1,8 @@
namespace DotRecast.Recast.Toolset using System;
namespace DotRecast.Recast.Toolset
{ {
[Serializable]
public class RcNavMeshBuildSettings public class RcNavMeshBuildSettings
{ {
public float cellSize = 0.3f; public float cellSize = 0.3f;