Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,13 @@ ExportedObj/
# Rider Generated
.idea

# Unity3D generated meta files
# Unity3D files
*.pidb.meta
*.pdb.meta
*.mdb.meta

# Unity3D generated file on crash reports
sysinfo.txt
!Samples~/
!**/Samples~/**

# Builds
*.apk
Expand All @@ -61,7 +61,7 @@ sysinfo.txt
# Crashlytics generated file
crashlytics-build.properties

#OS generated
# OS generated
**/.DS_Store
**/DS_Store
**/DS_Store?*
Expand All @@ -71,11 +71,10 @@ crashlytics-build.properties
**/ehthumbs.db
**/Thumbs.db

#Windows generated
# Windows generated
*Thumbs*
*.orig
*.orig.meta
*.uxf



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

## [1.0.0] - 2025-11-04

**New**:
- Added `IUiAnalytics` interface and `UiAnalytics` implementation for performance tracking
- Added three editor windows: `UiAnalyticsWindow`, `UiServiceHierarchyWindow`
- Added new "UI Layer Hierarchy Visualizer" section to the `UiConfigsEditor` inspector
- Added `UiPresenterSceneGizmos` for visual debugging in Scene view
- Added `UiPresenterEditor` custom inspector with quick open/close buttons
- Added multi-instance support for UI presenters via `UiInstanceId` struct and instance addresses
- Added `UiInstance` struct to encapsulate presenter metadata (type, address, presenter reference)
- Added feature-based presenter composition architecture with `IPresenterFeature` interface
- Added `PresenterFeatureBase` base class for composable presenter features
- Added `AnimationDelayFeature` and `TimeDelayFeature` components for delayed UI operations
- Added `UiToolkitPresenterFeature` for UI Toolkit integration
- Added `DefaultUiConfigsEditor` for out-of-the-box UI configuration (no custom implementation required)

**Changed**:
- Replaced `Task.Delay` with `UniTask.Delay` throughout for better performance and WebGL compatibility
- Updated `CloseAllUi` to avoid modifying collection during iteration
- Enhanced `UiService.Dispose()` with proper cleanup of all presenters, layers, and asset loader
- `LoadUiAsync`, `OpenUiAsync` methods now accept optional `CancellationToken` parameter
- Updated the README with a complete information of the project
- Replaced `LoadedPresenters` property with `GetLoadedPresenters()` method for better encapsulation
- Migrated all delay functionality from `PresenterDelayerBase` to feature-based system (`AnimationDelayFeature`, `TimeDelayFeature`)
- Converted all editor scripts to use UI Toolkit for better performance and modern UI
- Refactored `UiConfigsEditor` to use UI Toolkit with improved visuals and drag-and-drop support
- Optimized collection types (`Dictionary`, `List`) for better performance in `UiService`
- Removed loading spinner from `UiService` (simplified initialization)

**Fixed**:
- **CRITICAL**: Fixed `GetOrLoadUiAsync` returning null when loading new UI (now properly assigns return value)
- Fixed exception handling in `UnloadUi` with proper `TryGetValue` checks
- Fixed exception handling in `RemoveUiSet` with proper `TryGetValue` checks
- Fixed redundant operations in `CloseAllUi` logic
- Fixed initial value handling for UI sets in editor
- Fixed serialization updates before property binding in editor
- Fixed script indentation issues in delay presenter implementations

## [0.13.1] - 2025-09-28

**New**:
Expand Down
30 changes: 30 additions & 0 deletions Editor/DefaultUiConfigsEditor.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
using GameLovers.UiService;
using UnityEditor;

namespace GameLoversEditor.UiService
{
/// <summary>
/// Default UI Set identifiers for out-of-the-box usage.
/// Users can create their own enum and custom editor to override these defaults.
/// </summary>
public enum DefaultUiSetId
{
InitialLoading = 0,
MainMenu = 1,
Gameplay = 2,
Settings = 3,
Overlays = 4,
Popups = 5
}

/// <summary>
/// Default implementation of the UiConfigs editor.
/// This allows the library to work out-of-the-box without requiring user implementation.
/// Users can override by creating their own CustomEditor implementation for UiConfigs.
/// </summary>
[CustomEditor(typeof(UiConfigs))]
public class DefaultUiConfigsEditor : UiConfigsEditor<DefaultUiSetId>
{
// No additional implementation needed - uses base class functionality
}
}
3 changes: 3 additions & 0 deletions Editor/DefaultUiConfigsEditor.cs.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 20 additions & 8 deletions Editor/NonDrawingViewEditor.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
using GameLovers.UiService.Views;
using UnityEditor;
using UnityEditor.UI;
using UnityEngine;
using UnityEditor.UIElements;
using UnityEngine.UIElements;

// ReSharper disable once CheckNamespace

Expand All @@ -13,14 +14,25 @@ namespace GameLoversEditor.UiService
[CanEditMultipleObjects, CustomEditor(typeof(NonDrawingView), false)]
public class NonDrawingViewEditor : GraphicEditor
{
public override void OnInspectorGUI ()
public override VisualElement CreateInspectorGUI()
{
serializedObject.Update();
EditorGUILayout.PropertyField(m_Script, new GUILayoutOption[0]);

// skipping AppearanceControlsGUI
RaycastControlsGUI();
serializedObject.ApplyModifiedProperties();
var root = new VisualElement();

// Add script field
var scriptField = new PropertyField(serializedObject.FindProperty("m_Script"));
scriptField.SetEnabled(false);
root.Add(scriptField);

// Add raycast controls using IMGUI container since it's from base class
var raycastContainer = new IMGUIContainer(() =>
{
serializedObject.Update();
RaycastControlsGUI();
serializedObject.ApplyModifiedProperties();
});
root.Add(raycastContainer);

return root;
}
}
}
Loading