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 tydygunn · Mar 06, 2013 at 08:02 PM · playgoogle

Creating/Using a Google Play OBB with Unity 3.5

Hello! This question is already half-answered as I ask it, so I hope that this will become a resource for others to use after we're all done here today! I'm needing to package an OBB with my APK file (it's still hovering at 80MB even after intense asset crunching). I'm starting to feel comfortable with the ideas of packaging and using an OBB with Unity 3 (the version we're using), and having been drawing heavily upon these forums:

http://forum.unity3d.com/threads/135224-More-Google-OBB-drama

http://forum.unity3d.com/threads/150095-Split-APK-amp-Google-Play-OBB-Downloader-Question

http://forum.unity3d.com/threads/150806-How-to-create-an-OBB-data

At this point, I:

  • Have the Google Play OBB Downloader from the Asset Store and have merged the Android Manifest file with my pre-existing one.

  • Know that I need to create OBB from a series of Asset Bundles.

  • Know that I need a Loader Scene which calls GooglePlayDownloader.FetchOBB() and then loads my first scene

So my questions are: How should I organize the asset bundles? Is there a way for me to simply package everything so my current structure of accessing levels through the Resources folder doesn't need to be changed? Can I just package textures and sounds into an asset bundle and will it re-associate with the prefabs correctly at runtime after unpacking?

How do I exclude the assets that I've packaged into an Asset Bundle from the initial APK file?

How does updating the application work? Do we re-upload a new APK and OBB on each update?

Thanks a million guys. I hope that these questions get answered and that the result is useful for more than just me!

Comment
Add comment
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

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by Arkasis · Mar 26, 2013 at 11:04 AM

Hi,

if you are using unity 4 and the 'Split apk' option, you don't have to take care of your asset bundles.

Just create your project like a normal project and then, create a loader scene using the GooglePlay Obb downloader package. (Don't forget to complete the manifest).

The split apk option will cut your project in two pieces. One main .apk with your first scene downloading the second .obb part (if it is not) and using it like if it was a part of your .apk.

The .obb and .apk are totally linked. So if you have to do an update, build your application using 'Split apk' again and upload the two files again. (You could create your own update manager if you just add content and don't modify current content using asset bundles).

If you are using Unity3, you have to regroup all assets used in your game and make an assets bundle with. Then zip it in a .obb ($> zip -0 main.obb assetbundles). Load your .obb file with GooglePlay Obb downloader package example and then use WWW.LoadFromCacheOrDownload(jar:file://" + obbPath + "!/" + originalAssetBundleName); to load your assetsBundle from your obb file.

To organize your assetsBundle, only exclude all objects used in your first scene (Loader_scene) from your assetsBundle. When you build your application, only select your downloader scene and Unity will only include assets used on this scene to your .apk. All the other scenes could be loaded from an assetsBundle in runtime.

I hope I help you.

Good luck !

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.

Follow this Question

Answers Answers and Comments

11 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

Related Questions

The name 'Joystick' does not denote a valid type ('not found') 2 Answers

Script Errors 1 Answer

Unity and android, APK's and Play, blacklisting certain devices? 1 Answer

problem not playing animation on keyDown 2 Answers

Simple animation on game object doesn't play via animation.Play 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