• Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
4
Question by s4ge · Mar 17, 2015 at 03:55 PM · assetbundle

AssetBundles created without file extension

I use the following script to create my asset bundles (from the official docs):

 [MenuItem ("Assets/Build AssetBundles")]
 static void BuildAllAssetBundles()
 {
      BuildPipeline.BuildAssetBundles( "AssetBundles" );
 }

If I create them this way, the bundle files are created without any file extension which leads to the issue that no asset is reckognized. As soon as I add the .unity3d extension manually and load the asset bundle, everything is fine. No I have no idea whats going wrong and I have also no interests in fixing the bundles everytime I create them.

Any ideas?

Comment
Add comment · Show 8
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Graham-Dunnett ♦♦ · Mar 17, 2015 at 03:56 PM 0
Share

What do you mean by "no asset is recognised"? Normally the asset bundle file can be called anything, and includes the assets you write into it.

avatar image s4ge · Mar 17, 2015 at 07:22 PM 0
Share

What I mean is, that bundle.LoadAsset( "someExistingAsset" ) returns null if the asset bundle file has no .unity3d extension. On the other hand, it returns the asset if the extension is present. But BuildAssetBundles() creates the asset bundle files without any extension for a reason which I don't know.

avatar image playbarbados · Sep 09, 2015 at 10:20 AM 0
Share

I'm having the same problem.... Did you manage to get this resolved?

avatar image Scribe playbarbados · Sep 09, 2015 at 10:25 AM 0
Share

Could you not just do:

 BuildPipeline.BuildAssetBundles( "AssetBundles.unity3d" ); ?
avatar image playbarbados Scribe · Sep 09, 2015 at 12:19 PM 0
Share

No, It needs to be a path BuildPipeline.BuildAssetBundles( "AssetBundles" ); ?

Assetbundles is the path to the folder (inside Assets folder)

avatar image BramHeijmink playbarbados · Oct 19, 2015 at 11:40 AM 0
Share

I'm also having the same problem. Did you find a solution?

avatar image hmertk · Nov 24, 2015 at 07:30 PM 0
Share

Any progress on this issue?

avatar image AshyB · Jan 07, 2016 at 11:47 AM 0
Share

Having the same problem. Files are built without an extension. I really don't want to have to manually rename them to .unity3d everytime I build. I'll try making a script.,having the same problem

3 Replies

· Add your reply
  • Sort: 
avatar image
2

Answer by Forrest-Trepte · Aug 31, 2016 at 07:27 AM

I included the .unity file extension for the AssetBundle name in the Inspector. For example: alt text

Now, BuildAssetBundles generates my asset bundle with the file extension and this seems to be working well for me so far.


assetbundleextension.png (3.8 kB)
Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
1

Answer by MikeAtIcejam · Jan 07, 2017 at 08:27 PM

I'm new to asset bundles so .unity3d might be a community convention, but that extension is not required, see this post: https://forum.unity3d.com/threads/unity-5-3-bundles-unable-to-open-archive-file.372799/#post-2586219

Just a reminder, we don't have an official file extension ".unity3d" for asset bundle, it's not mandatory. You can use whatever file extension as you want, or without file extension.

But usually people use ".unity3d" as the file extension just because we used it in the official sample code at first time...

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by AshyB · Jan 07, 2016 at 10:24 PM

I made an editor script. I would prefer to put this in the same script as the build stuff but I don't know how to check if the bundle building process has completed. Put this in a new editor script and name it ash_RenameAssetBundles.cs then just call it after your finished building;

 using UnityEditor;
 using System.IO;
 using UnityEngine;
 
 public class ash_RenameAssetBundles
 {
     [MenuItem("Assets/Rename AssetBundles")]
     static void RenameAssetBundles()
     {
         string[] files = Directory.GetFiles("AssetBundles");
 
         foreach (var a in files)
         {
             if (!a.Contains("."))
             {
                 File.Move(a, a + ".unity3d");
             }
         }
     }
 }
Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Welcome to Unity Answers

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

Follow this Question

Answers Answers and Comments

9 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

How to import the object from server to unity 2 Answers

shader missing from materials when assets bundle is load 0 Answers

Why do iOS web requests stop working after a few hours? 0 Answers

UI image rendering on some devices but not others 0 Answers

Using CachedXMLHttpRequest 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges