Merge pull request #31191 from aaronfranke/serializable

[Mono] Make all structs seralizable
This commit is contained in:
Ignacio Roldán Etcheverry 2019-08-08 05:36:18 +02:00 committed by GitHub
commit e37e71d961
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 16 additions and 0 deletions

View File

@ -5,6 +5,7 @@
// file: core/variant_call.cpp
// commit: 5ad9be4c24e9d7dc5672fdc42cea896622fe5685
using System;
using System.Runtime.InteropServices;
#if REAL_T_IS_DOUBLE
using real_t = System.Double;
#else
@ -13,6 +14,8 @@ using real_t = System.Single;
namespace Godot
{
[Serializable]
[StructLayout(LayoutKind.Sequential)]
public struct AABB : IEquatable<AABB>
{
private Vector3 _position;

View File

@ -8,6 +8,7 @@ using real_t = System.Single;
namespace Godot
{
[Serializable]
[StructLayout(LayoutKind.Sequential)]
public struct Basis : IEquatable<Basis>
{

View File

@ -1,7 +1,10 @@
using System;
using System.Runtime.InteropServices;
namespace Godot
{
[Serializable]
[StructLayout(LayoutKind.Sequential)]
public struct Color : IEquatable<Color>
{
public float r;

View File

@ -1,4 +1,5 @@
using System;
using System.Runtime.InteropServices;
#if REAL_T_IS_DOUBLE
using real_t = System.Double;
#else
@ -7,6 +8,8 @@ using real_t = System.Single;
namespace Godot
{
[Serializable]
[StructLayout(LayoutKind.Sequential)]
public struct Plane : IEquatable<Plane>
{
private Vector3 _normal;

View File

@ -8,6 +8,7 @@ using real_t = System.Single;
namespace Godot
{
[Serializable]
[StructLayout(LayoutKind.Sequential)]
public struct Quat : IEquatable<Quat>
{

View File

@ -8,6 +8,7 @@ using real_t = System.Single;
namespace Godot
{
[Serializable]
[StructLayout(LayoutKind.Sequential)]
public struct Rect2 : IEquatable<Rect2>
{

View File

@ -8,6 +8,7 @@ using real_t = System.Single;
namespace Godot
{
[Serializable]
[StructLayout(LayoutKind.Sequential)]
public struct Transform : IEquatable<Transform>
{

View File

@ -8,6 +8,7 @@ using real_t = System.Single;
namespace Godot
{
[Serializable]
[StructLayout(LayoutKind.Sequential)]
public struct Transform2D : IEquatable<Transform2D>
{

View File

@ -14,6 +14,7 @@ using real_t = System.Single;
namespace Godot
{
[Serializable]
[StructLayout(LayoutKind.Sequential)]
public struct Vector2 : IEquatable<Vector2>
{

View File

@ -14,6 +14,7 @@ using real_t = System.Single;
namespace Godot
{
[Serializable]
[StructLayout(LayoutKind.Sequential)]
public struct Vector3 : IEquatable<Vector3>
{