[Released] Ultimate DLC Toolkit - The complete downloadable content management tool

ULTIMATE DLC TOOLKIT

Ultimate DLC Toolkit is coming soon to the Unity asset store.
An initial release discount will be available for the first 2 weeks of sales!

Support | Suggestions | Feedback | Bug Report | Discord
Documentation | Scripting Reference | Samples | Asset Store


Ultimate DLC Toolkit is designed to be a complete DLC authoring, creation, management and runtime tool making it trivial to add extra downloadable content, add-ons, expansion packs or similar to your game. DLC Toolkit implements a complete and fully featured build pipeline for creating a custom DLC content with full support for Unity assets, scenes and scripts (On some platforms). On top of that, there also a complete runtime system available for loading DLC content, DRM verification, content evaluation and so much more.

Asset bundles are the usual go to when you want to implement DLC in to your game, and they have their uses but are not a complete system in our opinion. Our toolkit takes the asset bundle approach as a base and expands on it greatly to offer a true DLC toolkit to cover both the editor and runtime features that are a must. Some of these features include but are not limited to:

  • Support proper versioning for the DLC content version, Unity version and Toolkit version to ensure that the DLC is compatible with the current version of your game.
  • Per DLC and per platform build options when creating the DLC means that the content can be optimized in many ways for different platforms from build size, to load time and more.
  • Extensive metadata both general and per asset including global values such as name, unique key, developer publisher, and then on a per asset basis information such as name, path, extension, type information and much more.
  • DLC signing means that the content will only be loadable by your game project despite DLC toolkit being a generic solution for all use cases.
  • DRM (Digital Rights Management) implementations provided for common services such as Steamworks and Google Play Asset Delivery so you can quickly and easily check user ownership status, install DLC on demand and more.
  • One click build means that the entire project DLC’s can be built as a batch in one operation for all enabled platforms with per DLC and per platform options respectivley.
  • Complete runtime analysis, evaluation, management and loading API’s available to make managing and using your DLC content in game as simple as possible.
  • Additional scripting support for Desktop Mono platforms means that DLC content can now include new scripts that were not part of the base game and they will just work. That includes full serialization support when adding scripts to game objects and prefabs for example, no hassle.
  • Platform specific folders allow you to include assets in the DLC only for certain platforms. Works like a Unity special folder where for example any content placed inside the Windows folder will only be included on windows versions of the DLC.
  • Many more impressive features to be covered later.

Complete Build Pipeline
DLC Toolkit implements a complete and fully featured custom build pipeline to convert your source assets into a single DLC file that can be loaded into you game at runtime on any platform. Asset bundles are used internally for some aspects, but we also build so much more on top to make sure that all the hard work is already done, and you can just focus on the content rather than making custom tools.

9419372--1319858--CreateDLCWindow.png

DLC profiles allow you to quickly and easily setup new DLC content to be built, and all DLC assets should simply be placed in their own folder to distinguish them from normal game assets. All asset collection, management and depdencencies are handled automatically by our build pipeline so it really is just a case of create your assets and go.

One click build allows you to build all DLC profiles in your project for all supported platforms, and incremental build support means that it will usually take only a few seconds per DLC platform (Depending upon content size) to build the DLC file.

9419372--1319819--OneClickBuildMenu.png

Build Pipeline API
For those more advanced users who need finer control or need to run Unity in batch/headless mode as part of a build pipeline: Don’t fear, we have exposed the full DLC build API for you to use from editor code so you can easily integrate it into your custom build pipeline with no worries. That also includes a number of build events for you to hook into during the build process. Plus full C# source code for all runtime and editor code (Including the build tools) means that you can always quickly check out what is happening or make changes if needed.
DLC Build Code Example

public void BuildDLC()
{
    // Select platforms or null for all
    BuildTarget[] platforms =
    {
        BuildTarget.StandaloneWindows64,
        BuildTarget.Android,
    };

    // Select options
    DLCBuildOptions options = DLCBuildOptions.ForceRebuild;

    options |= DLCBuildOptions.DebugScripting;

    // Build all content
    DLCBuildPipeline.BuildAllDLCContent("Build/DLC Content", platforms, options);
}

Complete Runtime Management
DLC Toolkit inclues a complete runtime aspect for loading and managing DLC content as part of your games lifecycle. This includes things as trivial as checking if a given file is a valid DLC file, accessing metadata or icons, to much more advanced feratures like providing full async loading support or on demand async installation all while your game continues to run normally.
DLC Load Example

public IEnumerator LoadDLC(List<Material> alternateSkins)
{
    // Get first listed DLC key
    string dlcKey = DLC.DRMProvider.DLCUniqueKeys[0];

    // Try to load and install if necessary
    DLCAsync<DLCContent> async = DLC.LoadDLCAsync(dlcKey, installOnDemand: true);

    // Wait for installed/loaded
    yield return async;

    // Check for success
    if(async.IsSuccessful == true)
    {
        // Get the content - the main API for working with an individual DLC content
        DLCContent content = async.Result;

        foreach(DLCSharedAsset asset in content.SharedAssets.EnumerateAllOfType<ScriptableInfo>())
        {
            // Load some game scriptable object type
            ScriptableInfo info = asset.Load();

            // Get alternate skin materials for example
            alternateSkins.Add(info.alternateSkinMaterial);
        }
    }
    else
    {
        Debug.LogError(async.Status);
    }
}

Digital Rights Management
DLC Toolkit provides a DRM interface to perform common DLC operations such as check for ownership of the content, request install the content on demand, check if the content is available and more. Currently the supported DRM services are Steamworks for desktop (Steamworks.Net and Facepunch.Steamworks are both implemented) and Google Play Asset Delivery for Android. Additional or custom DRM providers can be easily added for other services and platforms in the future simply by implementing a small C# interface.
DRM Check Example

public IEnumerator CheckDRM()
{
    // Get a list of DLC unique keys that are listed by the DRM provider (Steamworks store for example).
    // Note that this can list dlc contents that the game is not aware of so it is possible to load new dlc content without requiring any game update.
    string[] dlcKeys = DLC.DRMProvider.DLCUniqueKeys;

    // Check for available (Owned and installed)
    // Async because some providers may need to make a web request
    DLCAsync<bool> availableAsync = DLC.IsAvailable(dlcKeys[0]);

    // Wait for completed
    yield return availableAsync;

    // Check for available
    if(availableAsync.IsSuccessful == true && availableAsync.Result == true)
    {
        Debug.Log("DLC is available: " + dlcKeys[0]);
    }
    else
    {
        // Request that the DLC is installed if we own it
        // For platforms like Android that support install on demand. Steamworks for example will install DLC automatically
        DLCAsync installAsync = DLC.RequestInstall(dlcKeys[0]);

        // Wait for installed
        yield return installAsync;

        // Check for available now
        if(installAsync.IsSuccessful == true)
        {
            Debug.Log("DLC is now installed: " + dlcKeys[0]);
        }
        else
        {
            Debug.Log("Could not install DLC: " + installAsync.Status);
        }
    }
}

Platforms
Windows | Mac | Linux | Android | IOS | WebGL | Console

Console - Theoretical support only (No access to dev kits). The asset contains no platform/architecture specific code or plugins, and does not use any features not available on consoles. Testers with access to console dev kits are welcome to get in touch.

Scripting - Including new script content (Not available in base game) is supported on desktop platforms (Windows, Mac, Linux) requiring Mono backend (IL2CPP not supported).

Additional Details
:ballot_box_with_check: Fully commented C# source code included for both runtime and editor, including build pipeline.
:ballot_box_with_check: Script debugging support for windows platform (Mono).
:ballot_box_with_check: Long term support from a trusted publisher.
:ballot_box_with_check: Render pipeline independant - DLC content will be build using materials from your installed pipeline.
:ballot_box_with_check: Supports Unity 2022 LTS and newer.

Work has begun on the documentation and samples now as we are nearing completion on the asset. The user guide will be posted once completed but there is now a samples repo available which will be updated and expanded as we add code and other examples to demonstrate how to use the asset. The API is now fully documented so we will provide a scripting reference too in the near future.

Any feedback/questions are welcome or if you would like to see a feature added, just let me know :wink:

Sounds great! Looking forward to trying it once it’s released!

1 Like

:partying_face: Ultimate DLC Toolkit is now in closed beta where we will aim to address any remaining issues or concerns before release :partying_face:

Any user who has purchased our uMod 2.0 or Ultimate Replay 3.0 assets we would like to invite to try out the asset as part of the beta period. To participate simply join the discord server and send me (Scott - Trivial Interactive) a DM including your invoice number for any of those assets, and you will be allowed access to beta versions.

We aim to gain feedback at this stage to improve any workflow issues, fix any bugs, or redesign any features which are not suitable or require further development to become useful.

More updates to come as we more closer to release!

Documentation | Scripting Reference | Samples

Ultimate DLC Toolkit will be coming to the Unity asset store on October 10th

We have had a good few weeks of valuable testing and feedback from beta testers while we improved and stabilized the asset, and I am now pleased to announce that Ultimate DLC Toolkit will be releasing on the asset store in just 2 days :slight_smile: .

I am happy to answer any questions or inquiry’s about the asset in the meantime.

:partying_face: I am pleased to announce that Ultimate DLC Toolkit is now released on the asset store,
and on top of that we are offering a 30% launch discount lasting for 2 weeks!
:partying_face:

Check it out on the asset store and feel free to get in touch with any pre-sale questions, either here or via one of the other support channels (See original post):

Ultimate DLC Toolkit - Unity Asset Store

Feedback and review much appreciated to help us make the asset as good as it can be.

1 Like

Ultimate DLC Toolkit version 1.1.0 has been released on the asset store.
This version includes the following bug fixes and changes:

  • Add better exception handling and error reporting when working with DRM providers.
  • Refactor a couple of aspects of the public API to avoid user confusion and misuse.
  • The DLC manifest (Available on all platforms) is now the only source of information about DLC content that has been shipped with the game or created before the game was built.
  • Fixes to local DRM provider when using build and run where the DLC source directory path could be incorrect due to being launched by the Unity editor executable.
  • Meta files for generated assets will now be properly cleaned up after building DLC.
  • Fix a bug in some Unity versions where building DLC could cause the DLC profile asset to become unloaded from memory in the editor on some rare occasions, causing exceptions that appear at random times.
  • Rebuild demo DLC content with version 1.1.
  • Minor bug fixes.

:warning: Breaking Changes: :warning:

This update contains breaking changes leading to compiler errors due to API changes! You should only update if you are able to manually resolve these issues by following the upgrade guide, and a backup is always recommended before any update.

Please check out the upgrade guide if you are updating from version 1.0.0 to resolve the resulting compiler errors caused by API changes. Breaking changes are a last resort that we try to avoid at all costs, however on this occasion it was clear that the API could be unclear and misused in some cases, so we decided to address that now where the impact would be low.
We will not be integrating any more breaking changes moving forward

Ultimate DLC Toolkit version 1.1.1 has been released on the asset store!
This version fixes some bugs that were brought to our attention regarding DLC caching, which could cause second load attempts to fail:

  1. Fix a caching bug where using any load or availability check twice could result in a NotLoaded exception being thrown in some cases.
  2. Caching of loaded DLC will now be cleaned up properly when dealing with non-dlc file formats (When checking if a random file is a valid DLC file for example).
  3. Minor bug fixes.
  4. Update documentation.

Ultimate DLC Toolkit version 1.1.2 has been released on the asset store!

This version includes the following additions and improvements:

  • Add support for C# async/await for all DLC async operations, by exposing a ‘.Task’ property for use in such contexts in a similar way as Unity addressables.
  • The display name of a DLCContent gameObject will now update when DLC content is loaded with the name and version for quick reference.
  • Support unloading DLC content in the editor via the context menu for quick testing.
  • Override ToString methods for many DLC types for better debugger browsing.
  • Minor bug fixes.

C# async/await
With the additions above, it is now much easier to use C# async/await feature when working with any async DLC operation. You can now use the Task property of any DLCAsync object to await for completion:

private async void Start()
{
    // Load the DLC using await
    // The .Task is important here otherwise there will be compiler errors
    DLCContent content = await DLC.LoadDLCFromAsync("DLC/Windows/Racer Bonus Pack.dlc").Task;

    // Continue when the async load has completed
    Debug.Log("Loaded DLC: " + content.Metadata.NameInfo.Name);
}

As you can see, it can make the code much more readable and easier to follow when compared to coroutines.

:partying_face: I am pleased to announce that Ultimate DLC Toolkit is now included the asset store New Year Sale at a discount of 50%!!! :partying_face:

Grab yourself a bargain: Ultimate DLC Toolkit - 50% Off

:tada: Happy new year!!! :tada:
Ultimate DLC Toolkit version 1.2.0 is now released on the asset store with many fixes, improvements and additions:

  • Add API’s for loading assets in a single call without needing to load the DLC beforehand, similar to how addressables work (DLC.LoadAssetAsync and associated API’s). See below.
  • Add API’s for loading assets from any loaded DLC without needing to know which DLC the asset belongs to (DLC.LoadAsset and associated API’s). See below.
  • Improvements to shared assets and scenes API’s.
  • Add better support for enter play mode options.
  • Refactor demo game to support enter play mode options.
  • Fix an error regarding don’t destroy on load usage in edit mode.
  • It is now possible to create a new DLC in an existing folder, as a warning is now shown in the create wizard rather than a hard error (Creating a DLC profile with the same name will still fail with an error dialog).
  • Fix some bugs with editor DRM emulation that could cause errors or exceptions in a few cases with newly created DLC’s.
  • The DLC Profile Assets section will now not display any assets that are placed inside an Exclude folder, for consistency with the build engine.
  • The DLC profile Assets section will now place an info tooltip icon next to assets that are only included on on a subset of platforms. Hovering over will show which platforms the asset will be included for in the case of assets placed inside platform specific folders such as Windows.
  • The DLC manifest generated at build will now contain the names of included assets and scenes, in order to support loading assets via a single call.
  • Add missing xml comments to public API.
  • Fix some typos in existing xml comments.
  • Minor bug fixes.

Feature - One call asset load
This update adds support for loading assets from DLC content in a single call, much like addressables. It was added due to user requests and can be used as shown below. Note that all asset paths are relative to the DLC content folder (Where the DLC Profile asset exists):

Non-Async:

// Load some DLC first
DLC.LoadDLC("MyDLCKey");

// The optional unique key of the containing DLC, can be null in which case all DLC known at build time will be scanned.
string dlcUniqueKey = null;

// Load the asset in a single call if the DLC is already in memory.
// IMPORTANT - The non-async variant requires that the DLC already be loaded beforehand. Use the async variant to also load the DLC on demand.
GameObject asset = DLC.LoadAsset<GameObject>("Prefabs/Truck.prefab", dlcUniqueKey);

Async - allows true one call loading
Of course, all DRM and ownership checks run as normal to ensure that the user has access to the DLC content if it is not free, and the request will fail if the user has no access.

// The optional unique key of the containing DLC, can be null in which case all DLC known at build time will be scanned.
string dlcUniqueKey = null;

// Load the asset in a single call even if the containing DLC is not loaded yet.
// The async variants will in turn load the DLC content if it is not already loaded as part of the same call
DLCAsync<GameObject> request = DLC.LoadAssetAsync<GameObject>("Prefabs/Truck.prefab", dlcUniqueKey);

// Wait for loaded
yield return request;

// Get result
GameObject asset = request.Result;

For more info and more details samples, check out the following links for assets and scenes respectively:

Feedback
As a relatively new asset we welcome any feedback both positive and criticism to help improve the asset further. Feel free to reach out via any of the support channels listed on the first post, or simply reply here if you have any feedback or questions about the asset.

Ultimate DLC Toolkit version 1.2.1 has now been released on the asset store. This version contains the following changes and bug fixes:

  • Update minimum supported version to 2022.3.44 LTS.
  • Deprecate all non-async versions of DLC load calls that accept a DLC Unique Key parameter, and they will be removed in a future version. Due to changes in how the DLC Manifest is retrieved at runtime, blocking the main thread to wait for such a request would cause a timeout exception, hence any methods accepting a DLC Unique Key are now only available in async form.
  • Fix a bug where script compilation could fail on some platforms where 3rd party managed plugins are referenced.
  • Change the behaviour of DLCContent.Dispose. The method will now cause the host game object to also be destroyed which seems more intuitive.
  • DLC Content object name is now updated properly when DLC content is unloaded but the host game object is not destroyed.
  • Minor codebase cleanup and remove unused code.
  • Minor bug fixes.

If you would like to see any features added or improve the usage of the asset in any way then we are open to all feedback to improve the asset further :slightly_smiling_face:

Ultimate DLC Toolkit version 1.3.0 has now been released on the asset store! This version contains the following changes and bug fixes:

  • Breaking Change (May introduce compile time errors) – Remove depreciated Api’s: DLC.Load(uniqueKey) and variants. Solution – Use the equivalent async variant DLC.LoadAsync(uniqueKey) to avoid blocking the main thread and to support all platforms.
  • Refactor and optimize some aspects of DLC loading.
  • Update demo game and associated DLC profiles for version 1.3.
  • Update docs and samples.
  • Minor bug fixes.
  • Minor tweaks and improvements to code base.

Ultimate DLC Toolkit version 1.4.0 has now been released on the asset store! This version includes the following new features, fixes and improvements:

  • Add new feature: DLC asset reference - Represents a weak reference to a specific asset type that can now be assigned in the inspector with the traditional Unity workflow, but internally will serialize the necessary information to load the asset from the DLC behind the scenes.
  • Add new feature: Realtime editing - Modifying the DLC assets in the project folder will now reflect the changes instantly in editor play mode (Requires editor test mode to be enabled).
  • Fix some issues where changing DLC extension or output folder could result in incorrect behaivour in some cases.
  • Add a few new DLC build pipeline methods relating to finding assets that are part of a DLC.
  • Update demo assets.
  • Change incremental build location to the library folder rather than temp to avoid full rebuilds when reopening the project.
  • DLC metadata now includes the source asset guid so that the asset can be mapped in the case of realtime editing mode.
  • Minor bug fixes.
  • Minor tweaks and improvements to code base.

DLC Asset Reference

A DLC asset reference makes it easier to reference DLC assets in the inspector as you would in a traditional Unity workflow, but will automatically handle finding, associating and loading the containing DLC for you.

First define a serialized field in your behaviour script, and include your intended asset type as a generic argument:

public DLCAssetReference<GameObject> modelReference;

Now the inspector will show an object field where you can assign a game object (Any other Unity Object type can be used):
image
Now you can assign a prefab or model from any DLC content, in this case I will use the truck prefab from the demo DLC:
image

Note that it only works with DLC assets though! Assigning any asset that is not associated with a DLC profile will display the following error and will not be serialized:

Once a suitable DLC asset is assigned, we can access it from code like so:

public class LoadAssetReference : MonoBehaviour
{
    public DLCAssetReference<GameObject> modelReference;

    IEnumerator Start()
    {
        DLCAsync<GameObject> async = modelReference.LoadAsync();

        // Wait for completed
        yield return async;

        // Check for success
        if(async.IsSuccessful == false)
        {
            Debug.LogError(async.Status);
            yield break;
        }

        Instantiate(async.Result);
    }
}

Of course if the DLC is paid then it may not be available to the user if they have not purchased or installed it, in which case the load request will fail with a suitable error. Alternatively you can check explicitly if the content is available to the user which uses DRM checks via Steam etc or whatever is setup to check for ownership and installation:

// Check the availability of the containing DLC
DLCAsync available = modelReference.IsAvailableAsync();

// Wait for completed
yield return available;

// Check if we can access
Debug.Log("Can use DLC model: " + available.IsSuccessful);

Realtime Editing Mode

This new feature allows you to modify DLC assets in the project/inspector window while the game is running in editor, and changes to such assets will be reflected immediately in the game. In previous versions the assets would be loaded from the DLC as unique objects or clones, meaning that it was not easy to see changes in realtime and could impact the workflow when developing DLC content.

This new feature is enabled by default, but can be disabled to get true runtime behaviour via the menu Tools -> DLC Toolkit -> Test Mode -> Disabled.

Before - No Realtime Editing

In previous versions modifying the source asset has no effect, and for the changes to be seen requires rebuilding and reloading the DLC. Rebuilding also requires exiting play mode so that has quite a negative impact on workflow.
OriginalAssetEditing

V1.4.0 - Now With Realtime Editing

Observe that any changes made to the source material (and any other type of asset) are now immediately reflected in the game view as you would expect in the normal Unity workflow.
It allows for much faster iteration for changes that would otherwise require a whole rebuild cycle.
RealtimeAssetEditing

This feature works by loading the mapped asset from the project rather than from the built DLC which then pulls in it’s own unique copy of such assets in a similar way to asset bundles.

Of course this can be disabled in the editor if you want to get 1:1 behaviour with the runtime by simply disabling editor test mode as mentioned above.

1 Like