Skip to content

Commit

Permalink
Merge pull request #26 from brunomikoski/feature/editor-data-serializ…
Browse files Browse the repository at this point in the history
…ation

fix: not serializing editor fields.
  • Loading branch information
brunomikoski authored Aug 20, 2020
2 parents edfd051 + c4493e7 commit 5d70f27
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.MD
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [1.2.3]
## Changed
- Not serializing editor fields
- Fix read only list not storing caching

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

[1.2.3]: https://github.com/badawe/ScriptableObjectCollection/releases/tag/v1.2.3
[1.2.2]: https://github.com/badawe/ScriptableObjectCollection/releases/tag/v1.2.2
[1.2.1]: https://github.com/badawe/ScriptableObjectCollection/releases/tag/v1.2.1
[1.2.0]: https://github.com/badawe/ScriptableObjectCollection/releases/tag/v1.2.0
Expand Down
8 changes: 7 additions & 1 deletion Scripts/Runtime/ScriptableObjectCollection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public string GUID
}
}

[SerializeField]
[NonSerialized]
private List<CollectableScriptableObject> editorSerializedItems;

[SerializeField]
Expand All @@ -33,7 +33,10 @@ public IReadOnlyList<CollectableScriptableObject> Items
get
{
if (isReadyListDirty)
{
readOnlyList = items.AsReadOnly();
isReadyListDirty = false;
}
return readOnlyList;
}
}
Expand Down Expand Up @@ -374,7 +377,10 @@ public class ScriptableObjectCollection<ObjectType> : ScriptableObjectCollection
get
{
if (isReadyListDirty)
{
readOnlyList = items.Cast<ObjectType>().ToList().AsReadOnly();
isReadyListDirty = false;
}
return readOnlyList;
}
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "com.brunomikoski.scriptableobjectcollection",
"displayName": "Scriptable Object Collection",
"version": "1.2.2",
"version": "1.2.3",
"unity": "2018.4",
"description": "Scriptable Object Collection",
"keywords": [
Expand Down

0 comments on commit 5d70f27

Please sign in to comment.