Skip to content

Commit f136ff2

Browse files
authored
Merge pull request #106 from brunomikoski/feature/fixes
Feature/fixes
2 parents 0555c95 + 4dc96e4 commit f136ff2

5 files changed

Lines changed: 14 additions & 5 deletions

File tree

CHANGELOG.MD

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
66

77
## [Unreleased]
88

9+
# [1.9.4]
10+
### Changed
11+
- Fixed namespace settings not been stored properly after changing once on the Wizard
12+
- Fixed `NullReference` on GetItemHeight()
13+
914
# [1.9.3]
1015
### Add
1116
- Automatically define namespace for static collection generated file based on `CollectionItem`
@@ -356,6 +361,7 @@ public bool IsValidConsumable(Consumable consumable)
356361
- First initial working version
357362

358363

364+
[1.9.4]: https://github.com/badawe/ScriptableObjectCollection/releases/tag/v1.9.4
359365
[1.9.3]: https://github.com/badawe/ScriptableObjectCollection/releases/tag/v1.9.3
360366
[1.9.2]: https://github.com/badawe/ScriptableObjectCollection/releases/tag/v1.9.2
361367
[1.9.1]: https://github.com/badawe/ScriptableObjectCollection/releases/tag/v1.9.1

Scripts/Editor/Core/CollectionCustomEditor.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -116,9 +116,9 @@ private void OnClickToAddNewItem(Rect buttonRect, ReorderableList list)
116116

117117
private float GetCollectionItemHeight(int index)
118118
{
119-
if (itemHidden == null || itemHidden[index])
120-
return 0;
121-
119+
if (itemHidden == null || itemHidden[index] || index > itemHidden.Length - 1)
120+
return EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
121+
122122
return Mathf.Max(
123123
heights[index],
124124
EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing

Scripts/Editor/Core/ScriptableObjectCollectionSettings.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ public class ScriptableObjectCollectionSettings : ScriptableObjectForPreferences
1414
public string DefaultGeneratedScriptsPath => defaultGeneratedScriptsPath;
1515

1616
[FormerlySerializedAs("defaultNamespace")] [SerializeField]
17-
private string namespacePrefix = "CompanyName";
17+
private string namespacePrefix;
1818
public string NamespacePrefix => namespacePrefix;
1919

2020
[SerializeField]

Scripts/Editor/Wizzard/CreateCollectionWizard.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -327,6 +327,9 @@ private static CreateCollectionWizard GetWindowInstance()
327327
private void OnEnable()
328328
{
329329
windowInstance = this;
330+
331+
if (string.IsNullOrEmpty(NamespacePrefix))
332+
NamespacePrefix = Application.companyName;
330333
}
331334

332335
public static void Show(string targetPath)

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.9.3",
4+
"version": "1.9.4",
55
"unity": "2018.4",
66
"description": "A library to help improve the usability of Unity3D Scriptable Objects by grouping then into a collection and exposing then by code or nice inspectors!",
77
"keywords": [

0 commit comments

Comments
 (0)