Unite Europe 2017 - ResourceManager Feedback

Unity Europe 2017 - Asset Bundles current and future

Unity Europe 2017 - Roadmap

I just saw the AssetBundle talk at Unite Europe and the roadmap discussion where the new resourcing system was mentioned. I’m really excited that you are looking into this problem in Unity as this has been a pain point since the beginning. Where are these assets stored and how do we best store and load assets in our game. The Resources folder always was the go to use for this problem, but obviously that doesn’t give a great compatibility with AssetBundles moving forward or storing assets in different storage formats or locations. The other option is that the current direct references are loaded on object creation system works great if you don’t mind load times and runtime memory spikes. So I’m really happy that you’re considering using something else and looking into a different mentality for managing these resources.

However, after watching the talks I have some concerns, and maybe those are topics problems that are not going to be solved initially by the system, but just wanted to provide some feedback.

Strings are Fragile
As the 2D system found out with their atlasing system, making a string for an asset is not maintainable and it is just a poor user workflow. Trying to keep the name of the asset in two places named the same is a headache. Naming everything from the “Group Name” and the individual assets just sounds like a difficult workflow to manage.

Managers Aren’t Connected to Assets
When I see the current asset manager, I think it’s great to access these resources at a high level, but if I have hundreds of assets packaged into dozens of asset bundles, I could see the editor becoming very unruly finding the necessary asset that I made addressable. There is just a management concern with the UI that was displayed.

My recommendation:
I think this would make much more sense at a another layer of abstraction of an asset that we could call a “resource asset”. Let’s say you have defined with data, 3 levels of quality in the game but a Low/Med/High preset for mesh and texture. Now lets say that you have a shrub manager that places shrubs throughout the world. Wouldn’t it make sense that the shrub manager had a reference to a resource asset that referenced the GameObject asset as the game’s data is currently setup for? The shrub prefab’s mesh renderer and material would also have resource asset references to both a mesh resource asset and a texture resource asset respectively. These resource assets would act as intermediaries between a direct assets and would be usable in all places where that asset type can be referenced in Unity serialized field. These resource assets would also define their asset bundle (via an editor window picker) and other loading properties. This asset inspector would also include, would this asset be loaded/instantiated at deserialization, OnEnable, or manual loading (via a simple script API) in addition to which asset bundle assets are loaded from!

I feel this type of approach could solve both of the problems I mentioned above. SerializedFields would still be referencing GUID links to the resource asset thus allowing for more desirable drag and drop Unity behavior. It would also allow users to work more closely with the setup of the data closer to asset level.

You could still have direct asset links that would instantiate after deserialization. However, if you wanted to have more control, these resource assets could be used instead and a lot of the loading behavior could have common implementations done for the user automatically.

1 Like

Great points.

What is the timing of the New Unity ResourceManager? (repo, beta, docs, etc…)

What is the timing of the New Addressable System? (repo, beta, docs, etc…)

Will these become accessible to us as developers together or separately?

We’ve heard this concern quite a bit and have responded to that by adding a new type called an AssetReference, which essentially a weak reference to an addressable.

[AssetReferenceTypeRestriction(typeof(GameObject))]
public AssetReference player;

void Start()
{
    player.InstantiateAsync<GameObject>();
}

This is a fair concern and we’re keeping this in mind as we evolve the UI/UX. We want this system to scale to tens or hundreds of thousands of Addressable assets.

2 Likes

This post is kind of a zombie because this originally was right after Unite Europe and before Unite Austin where the addressable system was displayed in more detail. I agree that the addressable system is definitely more what I had in mind and that UI you showed is there is looking like a great first step.

For a second step, I’m trying to think of having designers and artists pick the right asset out of thousands of prefabs and not realize the requirements for that asset. Picking the wrong blue box out of thousands is kind of easy to do even with the name. Are there thoughts on adding restrictions with user-defined components/tags that we can also apply to these asset references? With tags, you might be back to the same strings are fragile problem mentioned above, but with components you couldn’t add to certain assets (like Texture2D) to be accepted in the field or not. Maybe some sort of addressable tag manager scriptable object that we could centralize all of the strings into and add/remove/rename the tags types en-masse if needed? Then you apply the reference to the tag type to each of the assets via the addressable system? Regardless, not a problem that necessarily needs to be solved day 1, but something to think about.

I’m really looking forward to the addressable system in my day-to-day Unity life so thanks for working on it!

We do in fact have a labeling system for addressables, and a way to restrict AssetReference types to specific labels:

[AssetReferenceLabelRestriction("characters")]
public AssetReference player;

Addressables can have any number of labels.

2 Likes

Are addressables available now? If not is there a rough timetable? It’s difficult to find information on them besides the Unite Austin talk.

Yes, it’s still on track for a 2018.2 release. We’ll have more info as we get closer to that.

3 Likes

Hey @Reichert , I see the documentation live for the resourcemanager, but it seems the package has been pulled. Interested in test-driving this feature–any idea when the git project will be made available?

Also sending a PM with some additional questions. Thanks!

I second this. If you need testers please let us know, we have many usecases for this.

I ady see 2018.2b1 has been released. ETA which beta build will be available?

Bump ^ Really looking forward to the AssetReference type - this is going to open so many possibilities - when can we test this out!!!

is ResourceManager available now?

It will be made publicly available via Packman closer to the 2018.2 release date. Thank you for your patience :slight_smile:

1 Like

If you are really curious, you can modify the manifest.json in 2018.2 and add the references to the addressables asset system and resourcemanager manually - Unity's Staging Packages
However, ofc these are in development and are previews, not guaranteed to work, don’t use in production etc.

Hi @Reichert , I have the use case that first time user downloads asset bundles from web server to the mobile phone and store them into the phone storage then second time it will load asset bundles directly from phone. Each time when you run the game, it will check for new updates then download or update asset bundles automatically if there is new or new version of asset bundle found aka differential patching. Do addressable and resources manager able to handle this use case out of the box currently?

Yes, is designed to make this particularly scenario very easy. You’ll be able to delete a lot of code :slight_smile:

2 Likes

@Reichert , thanks for replying. Btw will you guys open unity forum more frequently after releasing addressable package etc? I would like to give feedback.

We’ll definitely be responsive to forum support for Addressables - we want to make sure we’re really solving your problems. And because it is delivered via Package Manager, we should be able to roll out updates on a regular basis, without depending on full new Editor releases.

1 Like

@Reichert , awesome. Btw have u guys get the permission from Android and IOS platform to support game code differential patching without going through their respective app stores so not only art asset can have differential patching directly but also for game code?

I can’t really speak to dynamic code/patching - my team is squarely focused on content building and delivery. I know other people are thinking about that, but I don’t know the latest.

2 Likes