Introduction to Modding Unity Games With Addressables
Use Unity Addressables to make it easy to let users create mods, enhancing the user experience and expressing their creativity through your game. By Ajay Venkat.
Sign up/Sign in
With a free Kodeco account you can download source code, track your progress, bookmark, personalise your learner profile and more!
Create accountAlready a member of Kodeco? Sign in
Sign up/Sign in
With a free Kodeco account you can download source code, track your progress, bookmark, personalise your learner profile and more!
Create accountAlready a member of Kodeco? Sign in
Contents
Introduction to Modding Unity Games With Addressables
35 mins
- Getting Started
- Understanding Addressables
- Advantages of Addressables
- Looking Under Addressables’ Hood
- Exploring the Project
- Understanding the Addressables’ Settings
- Setting up the Mod
- Renaming and Building Addressable Assets
- Loading Mods Using Addressables
- Creating the Reference Lookup Manager
- Setting up the Reference Lookup Manager
- Instantiating Assets Into the Scene
- Removing Assets From Memory
- Modifying Player Scripts
- Handling Bullet Spawning
- Handling Debris Spawning
- Creating the Mod Manager
- Loading Mods From the Mod Directory
- Loading New Catalogs Into Addressables
- Loading Mods With a Button
- Changing the Currently Loaded Mod
- Finding Assets Within the Mod
- Creating the Default Mod
- Testing and Profiling the Game
- Using the Addressables Event Viewer
- Where to Go From Here?
Testing and Profiling the Game
The time has come at last — press Play and test your own moddable game!
Isn't that mod just beautiful? With only a few small changes, you can already create a Randy Savage-inspired fish throwing simulator, complete with realistic sound effects! This shows you the true power of Addressables. Note how quickly the mods load in and out of memory. Usually, you'd need a loading screen to do this.
Using the Addressables Event Viewer
Using the Addressables Event Viewer, you can see the lifetime of Addressable Assets within the project. Open Window ▸ Asset Management ▸ Addressables ▸ Settings and select Send Profiler Events under General. Tthen open Window ▸ Asset Management ▸ Addressables ▸ Event Viewer.
You can see the moment where the resources stop being allocated to the old mod and are redirected to the new one. The asynchronous nature of Addressables really supports this type of use case.
Where to Go From Here?
You can download the complete project using the Download Materials button at the top or bottom of this tutorial.
In this Introduction to Modding with Addressables tutorial, you learned how to use Addressables to:
- Create mods.
- Setup a modding pipeline.
- Find and load mods.
This project is only the beginning — there's so much more you can add. I'm interested to see what you come up with!
Did you enjoy this tutorial? Want to learn more? Check out our book, Unity Games by Tutorials, which has more info on making games with Unity.
If you want to learn more about other use cases for Addressables, check out this GitHub repository by Unity.
You'll also find some useful information in the official Addressables Developer Guide.
If you have any suggestions, questions or just want to show off what you did to improve this project, join the discussion below.