Skip to content

Commit 5d70f27

Browse files
authored
Merge pull request #26 from brunomikoski/feature/editor-data-serialization
fix: not serializing editor fields.
2 parents edfd051 + c4493e7 commit 5d70f27

3 files changed

Lines changed: 13 additions & 2 deletions

File tree

CHANGELOG.MD

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7+
## [1.2.3]
8+
## Changed
9+
- Not serializing editor fields
10+
- Fix read only list not storing caching
711

812
## [1.2.2]
913
## Changed
@@ -121,6 +125,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
121125
## [Unreleased]
122126
- Add a setup wizzard for first time settings creation
123127

128+
[1.2.3]: https://github.com/badawe/ScriptableObjectCollection/releases/tag/v1.2.3
124129
[1.2.2]: https://github.com/badawe/ScriptableObjectCollection/releases/tag/v1.2.2
125130
[1.2.1]: https://github.com/badawe/ScriptableObjectCollection/releases/tag/v1.2.1
126131
[1.2.0]: https://github.com/badawe/ScriptableObjectCollection/releases/tag/v1.2.0

Scripts/Runtime/ScriptableObjectCollection.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public string GUID
2020
}
2121
}
2222

23-
[SerializeField]
23+
[NonSerialized]
2424
private List<CollectableScriptableObject> editorSerializedItems;
2525

2626
[SerializeField]
@@ -33,7 +33,10 @@ public IReadOnlyList<CollectableScriptableObject> Items
3333
get
3434
{
3535
if (isReadyListDirty)
36+
{
3637
readOnlyList = items.AsReadOnly();
38+
isReadyListDirty = false;
39+
}
3740
return readOnlyList;
3841
}
3942
}
@@ -374,7 +377,10 @@ public class ScriptableObjectCollection<ObjectType> : ScriptableObjectCollection
374377
get
375378
{
376379
if (isReadyListDirty)
380+
{
377381
readOnlyList = items.Cast<ObjectType>().ToList().AsReadOnly();
382+
isReadyListDirty = false;
383+
}
378384
return readOnlyList;
379385
}
380386
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "com.brunomikoski.scriptableobjectcollection",
33
"displayName": "Scriptable Object Collection",
4-
"version": "1.2.2",
4+
"version": "1.2.3",
55
"unity": "2018.4",
66
"description": "Scriptable Object Collection",
77
"keywords": [

0 commit comments

Comments
 (0)