Skip to content

Commit 7a173a9

Browse files
Merge pull request #24 from CoderGamester/develop
Release 1.0.0
2 parents 0585f78 + adaa05d commit 7a173a9

File tree

63 files changed

+6197
-902
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+6197
-902
lines changed

.gitignore

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,13 @@ ExportedObj/
4646
# Rider Generated
4747
.idea
4848

49-
# Unity3D generated meta files
49+
# Unity3D files
5050
*.pidb.meta
5151
*.pdb.meta
5252
*.mdb.meta
53-
54-
# Unity3D generated file on crash reports
5553
sysinfo.txt
54+
!Samples~/
55+
!**/Samples~/**
5656

5757
# Builds
5858
*.apk
@@ -61,7 +61,7 @@ sysinfo.txt
6161
# Crashlytics generated file
6262
crashlytics-build.properties
6363

64-
#OS generated
64+
# OS generated
6565
**/.DS_Store
6666
**/DS_Store
6767
**/DS_Store?*
@@ -71,11 +71,10 @@ crashlytics-build.properties
7171
**/ehthumbs.db
7272
**/Thumbs.db
7373

74-
#Windows generated
74+
# Windows generated
7575
*Thumbs*
7676
*.orig
7777
*.orig.meta
7878
*.uxf
7979

8080

81-

CHANGELOG.md

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

7+
## [1.0.0] - 2025-11-04
8+
9+
**New**:
10+
- Added `IUiAnalytics` interface and `UiAnalytics` implementation for performance tracking
11+
- Added three editor windows: `UiAnalyticsWindow`, `UiServiceHierarchyWindow`
12+
- Added new "UI Layer Hierarchy Visualizer" section to the `UiConfigsEditor` inspector
13+
- Added `UiPresenterSceneGizmos` for visual debugging in Scene view
14+
- Added `UiPresenterEditor` custom inspector with quick open/close buttons
15+
- Added multi-instance support for UI presenters via `UiInstanceId` struct and instance addresses
16+
- Added `UiInstance` struct to encapsulate presenter metadata (type, address, presenter reference)
17+
- Added feature-based presenter composition architecture with `IPresenterFeature` interface
18+
- Added `PresenterFeatureBase` base class for composable presenter features
19+
- Added `AnimationDelayFeature` and `TimeDelayFeature` components for delayed UI operations
20+
- Added `UiToolkitPresenterFeature` for UI Toolkit integration
21+
- Added `DefaultUiConfigsEditor` for out-of-the-box UI configuration (no custom implementation required)
22+
23+
**Changed**:
24+
- Replaced `Task.Delay` with `UniTask.Delay` throughout for better performance and WebGL compatibility
25+
- Updated `CloseAllUi` to avoid modifying collection during iteration
26+
- Enhanced `UiService.Dispose()` with proper cleanup of all presenters, layers, and asset loader
27+
- `LoadUiAsync`, `OpenUiAsync` methods now accept optional `CancellationToken` parameter
28+
- Updated the README with a complete information of the project
29+
- Replaced `LoadedPresenters` property with `GetLoadedPresenters()` method for better encapsulation
30+
- Migrated all delay functionality from `PresenterDelayerBase` to feature-based system (`AnimationDelayFeature`, `TimeDelayFeature`)
31+
- Converted all editor scripts to use UI Toolkit for better performance and modern UI
32+
- Refactored `UiConfigsEditor` to use UI Toolkit with improved visuals and drag-and-drop support
33+
- Optimized collection types (`Dictionary`, `List`) for better performance in `UiService`
34+
- Removed loading spinner from `UiService` (simplified initialization)
35+
36+
**Fixed**:
37+
- **CRITICAL**: Fixed `GetOrLoadUiAsync` returning null when loading new UI (now properly assigns return value)
38+
- Fixed exception handling in `UnloadUi` with proper `TryGetValue` checks
39+
- Fixed exception handling in `RemoveUiSet` with proper `TryGetValue` checks
40+
- Fixed redundant operations in `CloseAllUi` logic
41+
- Fixed initial value handling for UI sets in editor
42+
- Fixed serialization updates before property binding in editor
43+
- Fixed script indentation issues in delay presenter implementations
44+
745
## [0.13.1] - 2025-09-28
846

947
**New**:

Editor/DefaultUiConfigsEditor.cs

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
using GameLovers.UiService;
2+
using UnityEditor;
3+
4+
namespace GameLoversEditor.UiService
5+
{
6+
/// <summary>
7+
/// Default UI Set identifiers for out-of-the-box usage.
8+
/// Users can create their own enum and custom editor to override these defaults.
9+
/// </summary>
10+
public enum DefaultUiSetId
11+
{
12+
InitialLoading = 0,
13+
MainMenu = 1,
14+
Gameplay = 2,
15+
Settings = 3,
16+
Overlays = 4,
17+
Popups = 5
18+
}
19+
20+
/// <summary>
21+
/// Default implementation of the UiConfigs editor.
22+
/// This allows the library to work out-of-the-box without requiring user implementation.
23+
/// Users can override by creating their own CustomEditor implementation for UiConfigs.
24+
/// </summary>
25+
[CustomEditor(typeof(UiConfigs))]
26+
public class DefaultUiConfigsEditor : UiConfigsEditor<DefaultUiSetId>
27+
{
28+
// No additional implementation needed - uses base class functionality
29+
}
30+
}

Editor/DefaultUiConfigsEditor.cs.meta

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Editor/NonDrawingViewEditor.cs

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
using GameLovers.UiService.Views;
22
using UnityEditor;
33
using UnityEditor.UI;
4-
using UnityEngine;
4+
using UnityEditor.UIElements;
5+
using UnityEngine.UIElements;
56

67
// ReSharper disable once CheckNamespace
78

@@ -13,14 +14,25 @@ namespace GameLoversEditor.UiService
1314
[CanEditMultipleObjects, CustomEditor(typeof(NonDrawingView), false)]
1415
public class NonDrawingViewEditor : GraphicEditor
1516
{
16-
public override void OnInspectorGUI ()
17+
public override VisualElement CreateInspectorGUI()
1718
{
18-
serializedObject.Update();
19-
EditorGUILayout.PropertyField(m_Script, new GUILayoutOption[0]);
20-
21-
// skipping AppearanceControlsGUI
22-
RaycastControlsGUI();
23-
serializedObject.ApplyModifiedProperties();
19+
var root = new VisualElement();
20+
21+
// Add script field
22+
var scriptField = new PropertyField(serializedObject.FindProperty("m_Script"));
23+
scriptField.SetEnabled(false);
24+
root.Add(scriptField);
25+
26+
// Add raycast controls using IMGUI container since it's from base class
27+
var raycastContainer = new IMGUIContainer(() =>
28+
{
29+
serializedObject.Update();
30+
RaycastControlsGUI();
31+
serializedObject.ApplyModifiedProperties();
32+
});
33+
root.Add(raycastContainer);
34+
35+
return root;
2436
}
2537
}
2638
}

0 commit comments

Comments
 (0)