Search found 16 matches

by caleidon
Sat Jun 26, 2021 3:48 pm
Forum: General Discussion
Topic: Difference between fields and properties?
Replies: 2
Views: 715

Re: Difference between fields and properties?

Thanks. I know the difference between the two, I just thought there was something ES3-specific that makes a difference between them. I suppose I'll stick with properties, it seems to be working as intended for now. :)
by caleidon
Sat Jun 26, 2021 2:31 pm
Forum: General Discussion
Topic: Difference between fields and properties?
Replies: 2
Views: 715

Difference between fields and properties?

When creating a custom ES3 type through the Types menu in ES3 settings, I am seeing effectively the same things manifested as fields and properties, like so: Screenshot_1.png Until now, I've never given it much thought, and always selected properties instead of fields. Is there any difference betwee...
by caleidon
Thu Feb 04, 2021 2:35 pm
Forum: General Discussion
Topic: Trouble saving a custom datatype
Replies: 7
Views: 1653

Re: Trouble saving a custom datatype

I have resolved some of the issues by implementing GUIDs as Region's IDs.

However, upon loading a HashSet<Guid> and Debug.Logging them, it just says 00000000-0000-0000-0000-000000000000, like they've all been wiped out.

Does ES3 not support GUID saving/loading? Am I doing something wrong?
by caleidon
Thu Feb 04, 2021 1:28 pm
Forum: General Discussion
Topic: Trouble saving a custom datatype
Replies: 7
Views: 1653

Re: Trouble saving a custom datatype

The regions can get added and removed at any time, any of them. If I have regions: Region0 at index 0 Region1 at index 1 Region2 at index 2 Region3 at index 3 and lets say some of them area each others neighbors. For an example: Region1 gets assigned a neighbor at index 2 (which is region 2). If I t...
by caleidon
Thu Feb 04, 2021 11:38 am
Forum: General Discussion
Topic: Trouble saving a custom datatype
Replies: 7
Views: 1653

Re: Trouble saving a custom datatype

A region can never save itself as it's own neighbor, so that wouldn't be the issue.

However, I did not know the regions are saved by value. Isn't it possible then to save the original HashSet<Region> by value, but when storing their neighbors, they can just store a reference to them?
by caleidon
Thu Feb 04, 2021 11:27 am
Forum: General Discussion
Topic: Trouble saving a custom datatype
Replies: 7
Views: 1653

Trouble saving a custom datatype

In my game, I am saving a class Map which has a HashSet<Region> Regions A Region has the following information: - RegionID (int) - RegionPositions (HashSet<Vector3Int) - RegionRect (Rect) I can save, load and use this without any problems. The problem occurs when a Region needs to save one more piec...
by caleidon
Wed Feb 03, 2021 12:50 pm
Forum: General Discussion
Topic: Is it possible to remove empty constructors?
Replies: 3
Views: 931

Re: Is it possible to remove empty constructors?

Could you give me an example? Any super simple case will do. What exactly do I need to modify? I find the documentation lacking in that part so I am unsure.
by caleidon
Wed Feb 03, 2021 12:28 pm
Forum: General Discussion
Topic: Is it possible to remove empty constructors?
Replies: 3
Views: 931

Is it possible to remove empty constructors?

Currently, to every class that I have to save and has a constructor that takes parameters, I have to add an empty constructor so that ES3 knows how to save it. The documentation says: If the class you’re saving does not have a parameterless constructor, you will also need to modify the ReadObject<T>...
by caleidon
Thu Jan 14, 2021 12:10 pm
Forum: General Discussion
Topic: Custom type constructor confusion
Replies: 1
Views: 778

Custom type constructor confusion

Hello! I am confused as to what the protected override object ReadObject<T> is supposed to do and how it is used when creating custom supported types through the Types menu in the Editor. As an example, I have a Region class, and I am only interested in saving the data it contains: RegionID, RegionR...
by caleidon
Tue Dec 29, 2020 5:35 pm
Forum: General Discussion
Topic: Reference can not be found error when loading
Replies: 13
Views: 2632

Re: Reference can not be found error when loading

Is there any detailed tutorial about how to use the Types tab? It looks like it magically turns any class into a save-ready class, but I don't know what anything does.