com.amanotes.prefabpool 1.2.0 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,18 @@
1
1
  # Changelog
2
2
 
3
+ ## [1.3.0] - 2026-06-12
4
+
5
+ ### Added
6
+ - `MaterialPool` static class — material instance pooling with borrow/return pattern by `borrowId` (`MaterialPool.cs`)
7
+ - `MaterialExtensions.SetAlpha(Material, float)` — convenience method for cloned material alpha modification (`MaterialPool.cs`)
8
+ - `PoolEntryDrawer` — custom `PropertyDrawer` for compact `PoolEntry` inspector display with inline id, prefab, and prewarm count (`PoolEntryDrawer.cs`)
9
+ - `AssemblyInfo.cs` — `InternalsVisibleTo` for test assembly (`AssemblyInfo.cs`)
10
+ - Unit test suite: `PrefabPoolLifecycleTests`, `PrefabPoolGroupTests`, `PrefabPoolPerformanceTests` (`Tests/Runtime/`)
11
+
12
+ ### Changed
13
+ - README.md rewritten with accurate API reference and quick start guide
14
+ - `Docs/PrefabPool-API.md` — complete technical API reference
15
+
3
16
  ## [1.2.0] - 2026-05-20
4
17
 
5
18
  ### Added
package/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # PrefabPool
2
2
 
3
3
  **Package:** `com.amanotes.prefabpool`
4
- **Version:** 1.2.0
4
+ **Version:** 1.3.0
5
5
 
6
6
  Generic object pooling system for Unity with lifecycle callbacks and material pooling support.
7
7
 
@@ -30,7 +30,7 @@ Add the package to your Unity project via `Packages/manifest.json`:
30
30
  ```json
31
31
  {
32
32
  "dependencies": {
33
- "com.amanotes.prefabpool": "1.0.3"
33
+ "com.amanotes.prefabpool": "1.3.0"
34
34
  },
35
35
  "scopedRegistries": [
36
36
  {
@@ -16,19 +16,24 @@ namespace Amanotes.Core
16
16
  var tilePrefabProp = property.FindPropertyRelative(nameof(PoolEntry.prefab));
17
17
  var prewarmProp = property.FindPropertyRelative(nameof(PoolEntry.prewarmCount));
18
18
 
19
- var thirdWidth = position.width / 3f - 2f;
20
- var nameRect = new Rect(position.x, position.y, thirdWidth, EditorGUIUtility.singleLineHeight);
21
- var prefabRect = new Rect(position.x + thirdWidth + 3f, position.y, thirdWidth, EditorGUIUtility.singleLineHeight);
22
- var sliderRect = new Rect(position.x + (thirdWidth + 3f) * 2, position.y, thirdWidth, EditorGUIUtility.singleLineHeight);
19
+ const float gap = 2f;
20
+ const float prewarmWidth = 80f;
21
+ var remaining = position.width - prewarmWidth - gap * 2;
22
+ var nameWidth = remaining * 0.35f;
23
+ var prefabWidth = remaining * 0.65f;
24
+
25
+ var nameRect = new Rect(position.x, position.y, nameWidth, EditorGUIUtility.singleLineHeight);
26
+ var prefabRect = new Rect(nameRect.xMax + gap, position.y, prefabWidth, EditorGUIUtility.singleLineHeight);
27
+ var sliderRect = new Rect(prefabRect.xMax + gap, position.y, prewarmWidth, EditorGUIUtility.singleLineHeight);
23
28
 
24
29
  EditorGUI.PropertyField(nameRect, tileNameProp, GUIContent.none);
25
30
  EditorGUI.PropertyField(prefabRect, tilePrefabProp, GUIContent.none);
26
31
 
27
32
  EditorGUI.BeginChangeCheck();
28
- var sliderValue = EditorGUI.IntSlider(sliderRect, prewarmProp.intValue, 0, 10);
33
+ var newValue = EditorGUI.IntField(sliderRect, prewarmProp.intValue);
29
34
  if (EditorGUI.EndChangeCheck())
30
35
  {
31
- prewarmProp.intValue = sliderValue;
36
+ prewarmProp.intValue = Mathf.Max(0, newValue);
32
37
  }
33
38
 
34
39
  EditorGUI.EndProperty();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "com.amanotes.prefabpool",
3
- "version": "1.2.0",
3
+ "version": "1.3.0",
4
4
  "displayName": "[Ama] Prefab Pool",
5
5
  "description": "Generic object pooling system for Unity",
6
6
  "unity": "2022.3",