Skip to content
This repository has been archived by the owner on Jan 18, 2022. It is now read-only.

BlittableBool is not Serializable #935

Closed
david-rzepa opened this issue May 3, 2019 · 3 comments
Closed

BlittableBool is not Serializable #935

david-rzepa opened this issue May 3, 2019 · 3 comments
Labels
A: core Area: Core GDK S: accepted Status: This issue has been accepted. T: enhancement Type: This is an improvement to an existing feature

Comments

@david-rzepa
Copy link

We are accepting issues and we want your feedback.


Description

BlittableBool is not serializable. This means I cannot serialize any generated code data in a prefab for ease of configuring templates using the editor.

Expected behaviour

Doing something like

[SerializeField]
BlittableBool Foo;

Should appear in the editor and be editable.

Current behaviour

The field does not appear in the editor.

Possible solution

Adding [Serializable] attribute and making the value field public and non-readonly allows the type to be serialized.

Steps to reproduce

public class CouplingPointsSnapshot : MonoBehaviour {
        [SerializeField]
        private BlittableBool Foo;
    }

Or any type that uses BlittableBool

Environment

Generically serialize component snapshots in MonoBehaviours so I can use prefabs as entity templates.

n/a

GDK v0.2.1, Unity 2018.3.11f1

@jessicafalk
Copy link
Contributor

Thanks for raising this issue! We are tracking it internally as UTY-2024

@jessicafalk jessicafalk added A: core Area: Core GDK S: accepted Status: This issue has been accepted. T: enhancement Type: This is an improvement to an existing feature labels May 14, 2019
@jamiebrynes7 jamiebrynes7 added this to the Release v0.2.3 milestone May 24, 2019
@jamiebrynes7
Copy link
Contributor

As it turns out, the Entities preview.33 upgrade in #963 means that bool is now blittable and the there is no longer a requirement for BlittableBool.

We are removing it in #965 and all code generated schema types will use the standard bool type!

@jamiebrynes7
Copy link
Contributor

v0.2.3 has been released which contains the change mentioned above!

https://github.com/spatialos/gdk-for-unity/releases/tag/0.2.3

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A: core Area: Core GDK S: accepted Status: This issue has been accepted. T: enhancement Type: This is an improvement to an existing feature
Projects
None yet
Development

No branches or pull requests

3 participants