Strength Package: Unity Pack Assetbundle (external)

Source: Internet
Author: User

Previously summary: The second way to package.

Custom assetbundle Package Extension

In the previous tutorial, we have mentioned the extension several times and have explained how to set the custom Assetbundle extension. As for why it is necessary to take it out alone, it is natural that there is a reason for it, because there is a huge hole in it ...

Look, there's a hole in the front.

According to the previous plot, we have three ways to set the custom assetbundle package extension, the following one by one to explain:

First, set the extension in the Inspector panel

This setting assertbundle package extension is probably the simplest way, and here I put the picture again ↓↓

Use this way to set the extension there is also a pit, as far as I try, nor any extension can, if the extension is set in this way, but after the package does not see the extension, then a different extension and then try again.

Second, set the extension by Assetbundlename

What does that mean? is when we set the name of the Assetbundle package and add the extension.

If we say, we give assetbundle name called "Myassetbundle", then this time, we change the name to "Myassetbundle,assetbundle", no longer set the extension, direct packaging, We'll see the Assetbundle pack with the extension.

In fact, this is a kind of flattering way. In this way, you can set any extension, no problem, and it can be loaded correctly.

Third, set the extension through Assetbundlebuild.assetbundlevariant

Perhaps in my heart this way to set the extension is Orthodox, do not know why there is such a strange idea.

We can add such a sentence based on the code of the previous tutorial ↓↓

"assetbundle";
Then click on the menu, run the packager, although the final package succeeds, the editor will error, the wrong message is this ↓↓

    1. Error:variant folder path cannot be empty
This is a dead and alive can not find out the cause of the mistake, clearly packaged successfully, where the wrong?? Are you kidding me?

Just let a person collapse, ask degree Niang, degree Niang said: I do not know ...

Ah, helpless under had to ask Gu brother, fortunately Google to force a ↓↓

Finally is to find the reason, according to the method to add these lines of code, run the package again, will no longer error, the heart is very tired ...

But you think it's over?? Then you are too young ...

After adding the above code, each time you run, the information you set will be stored in the Inspector panel here ↓↓ and here ↓↓

(with a mosaic of drawing, will see it)

You can't remove them by removing Unused names, if it's Virgo ...

In summary, the most convenient and safest of the most secure and most * * assetbundle suffix is the second way to set the name.

Finally very very very very thank this call Wangsi Yuan of the package to give the positive solution, its blog has a lot of knowledge about Assetbundle pack and packaging, as well as a variety of error resolution solutions, I just intercepted one of them, welcome to see his blog →→ blog links ←←

I'll see you next time.

Strength Package: Unity Pack Assetbundle (external)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.