Skip to content

Commit 8443ffc

Browse files
committed
add: fixes
1 parent f2f273c commit 8443ffc

5 files changed

Lines changed: 14 additions & 6 deletions

File tree

CHANGELOG.MD

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ 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.3.1]
8+
### Changed
9+
- Removed multiple `AssetDatabase.SaveAssets();` to improve general performance when adding / removing objects
10+
- Fixed indirect reference issues with the new Advanced Dropdown search
11+
- Removed static `.Values` from the Colletion, was redundant and error prone
12+
713
## [1.3.0]
814
### Added
915
- Advanced dropdown for better searching on big collections;
@@ -157,7 +163,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
157163
- First initial working version
158164

159165
### [Unreleased]
166+
- Added ability to copy/paste collectable data
160167

168+
[1.3.1]: https://github.com/badawe/ScriptableObjectCollection/releases/tag/v1.3.1
161169
[1.3.0]: https://github.com/badawe/ScriptableObjectCollection/releases/tag/v1.3.0
162170
[1.2.9]: https://github.com/badawe/ScriptableObjectCollection/releases/tag/v1.2.9
163171
[1.2.8]: https://github.com/badawe/ScriptableObjectCollection/releases/tag/v1.2.8

Scripts/Editor/CollectableScriptableObjectPropertyDrawer.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ private void Initialize(SerializedProperty property)
148148
else
149149
collectableType = fieldInfo.FieldType;
150150

151-
if (!CollectionsRegistry.Instance.TryGetCollectionForType(collectableType,
151+
if (!CollectionsRegistry.Instance.TryGetCollectionFromCollectableType(collectableType,
152152
out ScriptableObjectCollection resultCollection))
153153
{
154154
optionsAttribute.DrawType = DrawType.AsReference;

Scripts/Editor/CreateNewCollectableType.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ private void OnGUI()
7676
}
7777
else
7878
{
79-
if (CollectionsRegistry.Instance.TryGetCollectionForType(targetType,
79+
if (CollectionsRegistry.Instance.TryGetCollectionFromCollectableType(targetType,
8080
out ScriptableObjectCollection collection))
8181
{
8282
MonoScript scriptObj = MonoScript.FromScriptableObject(collection);

Scripts/Editor/ScriptableObjectCollectionCustomEditor.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ public static void AfterStaticAssemblyReload()
282282

283283
Type targetType = Type.GetType($"{lastCollectionFullName}, {assemblyName}");
284284

285-
if (CollectionsRegistry.Instance.TryGetCollectionForType(targetType,
285+
if (CollectionsRegistry.Instance.TryGetCollectionFromCollectableType(targetType,
286286
out ScriptableObjectCollection collection))
287287
{
288288
Selection.activeObject = null;

Scripts/Runtime/CollectionsRegistry.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ public bool TryGetCollectionOfType<T>(out T resultCollection) where T: Scriptabl
115115
}
116116

117117

118-
public bool TryGetCollectionForType(Type targetType,
118+
public bool TryGetCollectionFromCollectableType(Type targetType,
119119
out ScriptableObjectCollection scriptableObjectCollection)
120120
{
121121
for (int i = 0; i < collections.Count; i++)
@@ -133,9 +133,9 @@ public bool TryGetCollectionForType(Type targetType,
133133
return false;
134134
}
135135

136-
public bool TryGetCollectionForType<TargetType>(out ScriptableObjectCollection<TargetType> scriptableObjectCollection) where TargetType : CollectableScriptableObject
136+
public bool TryGetCollectionFromCollectableType<TargetType>(out ScriptableObjectCollection<TargetType> scriptableObjectCollection) where TargetType : CollectableScriptableObject
137137
{
138-
if (TryGetCollectionForType(typeof(TargetType), out ScriptableObjectCollection resultCollection))
138+
if (TryGetCollectionFromCollectableType(typeof(TargetType), out ScriptableObjectCollection resultCollection))
139139
{
140140
scriptableObjectCollection = (ScriptableObjectCollection<TargetType>) resultCollection;
141141
return true;

0 commit comments

Comments
 (0)