banner



How To Add Assets To Unity

This tutorial assumes the reader has previous knowledge in loading their assets [How to create assets]. As well as well as uploading them to a cloud service. If this is not the case kick up your feet and take this time to check out my tutorials for hosting your services on AWS, Azure or Google Cloud.

Updating assets without having to create a new build prevents a lot of pain and wasted time. You may be used to updating or adding assets, then building your game and subsequentially updating to your new build wherever the game is published. Stop! save yourself time by only updating your addressable catalog and remote, that's it!

Pro-Tip: If you are unfamiliar with cloud services AWS will be the easiest to set up. Google tends to be the most finiky in paring to Unity. If you run into problems, join the team on Discord.

Let's begin by looking at the AddressableTutorial's build with its solitary square.

Here I open a built Unity project for Android. The square is currently the only asset being hosted. For this example, I'm using AWS. Keep in mind this process is generally the same for all three services.

The very first step to take is making sure y our addressable group is set to accept updated content. Allowing for updated content is the default setting, so no need to change or update anything. This a good first place to look when troubleshooting potential hiccups.

Please, If you have not added your assets into your groups that will be updated, do so now.

I am adding the Circle asset from my prefabs group into my Remote group and changing its label to remote.

Time to update your addressables build.

To do from your Addressables Groups window goto build → Update a Previous Build → Assets →AddressableAssetsData → Build Folder → Select .Bin file and choose open

Now that your addressables have been updated on Unitys Side it's time to update your remote service. Go to the container or bucket within your storage, you should be within your build folder. Go ahead and erase the three files contained within. The reason I do this to prevent unwanted data from being called and loaded from.

To get the files you need for the bucket go back into Unity. Right-click within your project window and choose Show in Explorer. In the projects Assets folder should be another folder named ServerData containing another folder named based on your build. This last folder will hold the addressables remote data files.

Within this folder will be copies of the files you just erased on the remote as well as an additional bundle file. For this example go ahead and keep only the Hash, Json, and bundle file just created. [Look at the date modified if unsure which is newest]

Now, copy your files into your remote folder. If you are using Azure I believe you have to upload the entire folder. What is important about this step is ensuring your files are able to be publicly read. Please take caution, If this is not set correctly you will run into trouble as your remote is preventing Unity from talking to it.

That's it! That was all there is to it. As long as your files are publicly readable you are good to go as seen in the updated gif. Once the app is opened the updated content is live!

Find the post helpful? Please share it wherever it would be helpful. Anything unclear? Leave a comment or join us on Discord and I'll respond as thoroughly as possible.

How To Add Assets To Unity

Source: https://medium.com/@badgerdox/update-assets-without-creating-a-new-build-d82eb26e5790

Posted by: johnwasion.blogspot.com

0 Response to "How To Add Assets To Unity"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel