Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • 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
0
Question by kumarc123 · Feb 26, 2015 at 07:43 AM · assetbundlemetafiles

AssetBundle.LoadMainAssetAtPath not loading .meta files

Hi friends,

I am currently building an asset bundle. The list of files is retrieved from Directory.GetFiles method. This is also returning .meta files.

So I am trying to load all assets in a directory. When a meta file is encountered it giving an exception that Unable to load the asset at .

Based on the errors I have these questions.

  1. When I export an asset as a bundle do I need to export .meta files also?

  2. Or will Unity automatically include those?

Comment
Add comment · Show 1
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 kumarc123 · Feb 26, 2015 at 07:58 AM 0
Share

It is also not loading .prefab files.@

1 Reply

· Add your reply
  • Sort: 
avatar image
0
Best Answer

Answer by dorpeleg · Feb 26, 2015 at 09:46 AM

You are not meant to load .meta files. There is no reason to put the meta files in the bundle.

What you need to do is:

Once you have the array of file paths, loop them and remove any path that contains "meta".

Then use the cleaned array to create the bundles.

Comment
Add comment · Show 2 · 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 kumarc123 · Feb 27, 2015 at 05:21 AM 0
Share

I already did. But I was not sure whether I need to cnclude .meta files also in the bundle. Thanks.

avatar image Tudor · Aug 20, 2015 at 10:52 AM 0
Share

"There is no reason to put the meta files in the bundle." - Yes there is. Some version control systems write identifiers in meta files. And maybe you are also making manual changes to the meta files like setting useFileScale: 0 which is the only way to get around faulty mesh scaling co$$anonymous$$g from 3D modelling software. (since useFileScale is a bool not accessible through code through the AssetPostProcessor (or pre-processor)). Of course if you're downloading the bundles at runtime, unity would not have bothered to read those meta files even if they were somehow included.

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.

Follow this Question

Answers Answers and Comments

20 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image 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

BuildOptions.BuildAdditionalStreamedScenes work with players other than webplayer? 1 Answer

how can i put components in external dlls and store dlls in asset bundles 4 Answers

Are AssetBundles a solid solution for providing in-app purchasses in my app ? 1 Answer

Memory leak using bundles. 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