Skip to content

V2.0#10

Merged
Brian-Jiang merged 18 commits into
mainfrom
v2.0
Dec 24, 2025
Merged

V2.0#10
Brian-Jiang merged 18 commits into
mainfrom
v2.0

Conversation

@Brian-Jiang
Copy link
Copy Markdown
Owner

No description provided.

@Brian-Jiang Brian-Jiang requested a review from Copilot December 23, 2025 09:59
@Brian-Jiang Brian-Jiang self-assigned this Dec 23, 2025
@Brian-Jiang Brian-Jiang linked an issue Dec 23, 2025 that may be closed by this pull request
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request introduces version 2.0.0 of Smart Reference, a significant update that adds asset lifecycle management, expanded async support, and improved documentation. The update transforms Smart Reference from a simple lazy-loading solution into a more complete asset management system with release capabilities and multiple async patterns.

Key Changes:

  • Added asset release API with Cancel support for managing asset lifecycle and memory
  • Implemented UniTask support alongside existing Task-based async for performance-critical scenarios
  • Introduced handle-based architecture (ISmartReferenceHandle, ResourcesHandle, AddressablesHandle) to track loading operations
  • Added comprehensive test suites (PlayModeTests and EditModeTests) with 400+ lines of test coverage
  • Expanded documentation with dedicated manual pages for initialization, loading patterns, releasing, and custom loaders

Reviewed changes

Copilot reviewed 57 out of 57 changed files in this pull request and generated 20 comments.

Show a summary per file
File Description
package.json Version bump to 2.0.0, updated description emphasizing memory optimization, added author URL and new keywords
Runtime/SmartReference.cs Core implementation with new async methods (LoadAsyncTask, LoadAsyncUniTask), Release/Cancel logic, event-based callbacks, and handle management
Runtime/SmartReference.Runtime.asmdef Updated assembly references to use package names instead of GUIDs, added UniTask reference and version defines
Runtime/Loaders/ISmartReferenceLoader.cs Extended interface with Release and Cancel methods, added comprehensive documentation for each method
Runtime/Loaders/ResourcesLoader.cs Implemented Release/Cancel methods, improved path parsing with better edge case handling
Runtime/Loaders/AddressablesLoader.cs Added Release/Cancel implementations, WebGL synchronous load error handling
Runtime/Loaders/CustomLoader.cs Removed deprecated delegate-based custom loader in favor of ISmartReferenceLoader interface
Runtime/Handles/*.cs New handle system files (ISmartReferenceHandle, ResourcesHandle, AddressablesHandle) for tracking load operations
Editor/SmartReferenceEditor.cs Refactored to use SmartReferenceTool for cleaner separation of concerns
Editor/SmartReferenceTool.cs New utility for programmatically setting/clearing references with validation
Tests/Runtime/PlayModeTests.cs Comprehensive runtime tests covering sync/async loading, in-flight sharing, release semantics, and performance
Tests/Runtime/EditModeTests.cs Editor-focused tests for SmartReferenceTool validation and serialization behavior
Tests/Runtime/AssetSetup.cs Test infrastructure for creating temporary test assets in Resources folders
Tools~/DocFx/docs/*.md New manual documentation pages explaining initialization, synchronous/asynchronous loading, releasing assets, and custom loaders
Tools~/DocFx/index.md Updated quick start guide with modern async patterns and version badges
Tools~/DocFx/docfx.json Updated build configuration for .NET 8, added docs folder, commented out PDF generation
.github/workflows/docfx-build-publish.yml Updated to GitHub Actions v6/v7, .NET 8, added test deployment workflow
README.md Rewritten with clearer structure showing initialization options and multiple loading patterns
CHANGELOG.md Added 2.0.0 release notes documenting new features

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread Runtime/SmartReference.cs Outdated
Comment thread Runtime/Loaders/ISmartReferenceLoader.cs Outdated
Comment thread Tools~/DocFx/docs/loading_sync.md
Comment thread Runtime/Loaders/ResourcesLoader.cs
Comment thread Runtime/SmartReference.cs
Comment thread Runtime/SmartReference.cs
Comment thread Runtime/Loaders/ResourcesLoader.cs
Comment thread Runtime/SmartReference.cs
Comment thread Runtime/Loaders/AddressablesLoader.cs
Comment thread Tests/Runtime/PlayModeTests.cs
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 57 out of 57 changed files in this pull request and generated 13 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread Tests/Runtime/PlayModeTests.cs
Comment thread Runtime/SmartReference.cs Outdated
Comment thread Runtime/Handles/ISmartReferenceHandle.cs Outdated
Comment thread Runtime/SmartReference.cs
Comment thread Runtime/Loaders/ResourcesLoader.cs Outdated
Comment thread Tests/Runtime/AssetSetup.cs
Comment thread Runtime/SmartReference.cs
Comment thread Runtime/Loaders/AddressablesLoader.cs
Comment thread Tools~/DocFx/docs/loading_sync.md
Comment thread Runtime/Loaders/AddressablesLoader.cs
@Brian-Jiang Brian-Jiang merged commit 8691e73 into main Dec 24, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

How to set reference with script?

2 participants