MackySoft.Navigathena.Unity.Addressables 2.0.0-preview.1

This is a prerelease version of MackySoft.Navigathena.Unity.Addressables.
There is a newer prerelease version of this package available.
See the version list below for details.
dotnet add package MackySoft.Navigathena.Unity.Addressables --version 2.0.0-preview.1
                    
NuGet\Install-Package MackySoft.Navigathena.Unity.Addressables -Version 2.0.0-preview.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="MackySoft.Navigathena.Unity.Addressables" Version="2.0.0-preview.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="MackySoft.Navigathena.Unity.Addressables" Version="2.0.0-preview.1" />
                    
Directory.Packages.props
<PackageReference Include="MackySoft.Navigathena.Unity.Addressables" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add MackySoft.Navigathena.Unity.Addressables --version 2.0.0-preview.1
                    
#r "nuget: MackySoft.Navigathena.Unity.Addressables, 2.0.0-preview.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package MackySoft.Navigathena.Unity.Addressables@2.0.0-preview.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=MackySoft.Navigathena.Unity.Addressables&version=2.0.0-preview.1&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=MackySoft.Navigathena.Unity.Addressables&version=2.0.0-preview.1&prerelease
                    
Install as a Cake Tool

MackySoft.Navigathena.Unity.Addressables

Addressables acquisition and release of scenes and prefab assets.

Install this NuGet package through NuGetForUnity. Keep all Navigathena packages at the same version. NuGet dependencies provide the common Runtime and, where required, the base Unity adapter.

Install Addressables from Unity Package Manager before importing this package.

This package contains Unity source files, assembly definitions, and asset metadata. NuGetForUnity restores them under the package's Sources directory for Unity to compile. It does not embed Unity, third-party assemblies, or another copy of the Navigathena Runtime. Do not install a Navigathena UPM package alongside it.

Load a screen scene

Keep the AssetReference in application configuration, normally a serialized field on a Unity setup component. The screen's lifecycle handler does not load or unload its own scene.

using MackySoft.Navigathena;
using MackySoft.Navigathena.Samples.Campaign;
using MackySoft.Navigathena.Unity;
using MackySoft.Navigathena.Unity.Addressables;

// campaignScene and campaign are supplied by application setup.
ScreenDefinition<CampaignMapRoute> screen = new(async (creation, token) =>
{
    CampaignMapView view = await creation.AcquireScreenAsync<CampaignMapView>(
        new AddressablesSceneAcquisition(campaignScene), token);
    return creation.Lifetime.CreateOwned(() => new CampaignMapPresenter(view, campaign));
});

The application types above are available in the campaign example. Configure ScreenPresentation alongside the requested view as described in the Unity guide.

AddressablesSceneAcquisition loads additively and activates the scene. When the screen no longer needs it, the runtime stops dependent users and awaits its managed unload. Do not separately unload or release the same handle.

Instantiate a screen prefab

AddressablesAssetAcquisition acquires a prefab asset. The Unity helper then instantiates the configured screen and registers both lifetimes:

CampaignMapView view = await creation.AcquireScreenAsync<CampaignMapView>(
    new AddressablesAssetAcquisition(campaignPrefab), token);
return creation.Lifetime.CreateOwned(() => new CampaignMapPresenter(view, campaign));

Here campaignPrefab is the prefab's AssetReference. The prefab must have exactly one requested view component, on its root, with ScreenPresentation on that same object.

The created instance is destroyed before the acquired asset is released. Create a new acquisition object for each factory invocation; it stores the handles for that acquisition and must not be shared between independent screen instances.

Cancellation and custom loading

Acquisitions report through AddressablesProgress.Acquisition, a ProgressInput<AddressablesAcquisitionProgress>. Each snapshot retains the asset GUID, the operation fraction, and DownloadStatus from Unity's ResourceManagement API. OperationFraction measures Addressables sub-operations, not bytes downloaded or the entire screen transition. Download completion therefore does not imply screen preparation has completed. AddressablesProgress.Release reports a nullable release fraction through the ending operation's reporter.

Use these inputs in a ProgressDefinition<TState> and pass the definition to NavigationTransition.Create. The factory receives the current operation's ProgressSource<TState>; connect its state to the loading view with preparation.ObserveProgress(progress, view.Render). For concurrent loads, retain each ProgressUpdate<T>.WorkId separately in the display state. No progress receiver interfaces or per-navigation display wiring are required. Set endTiming to TransitionEndTiming.AfterResourceRelease to keep an independent overlay active until screen cleanup completes, and fade it out in SettleAsync. See loading progress for the full typed connection.

Cancellation does not forcibly stop an Addressables operation. The acquisition waits for its result, checks cancellation, and lets managed cleanup release anything acquired. Do not release a still-used asset manually when a navigation token is cancelled.

For supporting objects that are not separate screen presentations, use creation.Lifetime, initialization.Lifetime, or preparation.Lifetime with AcquireAsync or the lower-level InstantiatePrefabAsync / AcquireSceneAsync helpers, according to their required lifetime. To support another asset system, implement IResourceAcquisition<T> and use the same common ownership contract. Do not acquire resources in its constructor; ReleaseAsync(progress) must also handle partial acquisition and report using the supplied release reporter.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
.NET Core netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.1 is compatible. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2.0.0-preview.5 110 10/23/2026
2.0.0-preview.4 107 10/13/2026
2.0.0-preview.3 152 10/8/2026
2.0.0-preview.2 131 10/7/2026
2.0.0-preview.1 136 9/30/2026