• 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
Question by asaco0629 · Nov 17, 2020 at 10:03 AM · assetbundleloadgoogledrive

I want to load object from my computer or google drive.

Hi, I just succeeded load an object with asset bundle.

However, this method can only load objects that I have previously designated.

I want to load the desired object from the computer or Google Drive with one Load button.

I do not know how to solve this problem. Give me some advice.

Thanx.

Comment

People who like this

0 Show 0
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

Answer by xxmariofer · Nov 17, 2020 at 11:59 AM

take a look into the System.IO class https://docs.microsoft.com/es-es/dotnet/api/system.io.file?view=net-5.0 and UnityWebRequest https://docs.unity3d.com/ScriptReference/Networking.UnityWebRequest.html classes for achieving that

Comment
asaco0629
Hellium

People who like this

0 Show 9 · 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 asaco0629 · Nov 18, 2020 at 05:19 AM 0
Share

Thanx. I am trying to solve this problem with UnityWebRequest.

But I have 2 errors now. but I can not find why...

Here are my script and errors. (I do not know much about C#..that is why)

My final goal is loading object what I want during play a game. For that, I need public tap 'Asset Name' to choose what I want. (I will make asset bundles with some objects and upload to my google drive first)

Give some advice. Thanx.alt text

c.jpg (84.2 kB)
avatar image xxmariofer asaco0629 · Nov 18, 2020 at 09:05 AM 0
Share

First, can you share with me the errors? i cant see them in your script, only a deprectaed alert (WWW is the old version of UnityWebRequest) second, I once worked with google drive myself and i know that drive url is not right, you need the final url, not the share link the url should be something like this change the allthenumbers text to your file id (the one in your url):

"https://drive.google.com/uc?id=ALLTHENUMBERSANDLETERSYOUSEEBETWEEN/d/AND/view/&export=download&authuser=0"

avatar image asaco0629 · Nov 18, 2020 at 12:15 PM 0
Share

Thank you for your commnet xxmariofer.

It seems difficult to give advice because it shows only a part sorry. Explaining the purpose would be a little more efficient, so I will explain. I am trying to make an Asset Bundle called 'Tree'. The 'Tree' contains various 3D obj file trees; Firtree, Oaktree, Palmtree, etc. I want to upload that asset bundle to my google drive and select and load it while playing the game. I set it so that it can be loaded by clicking the button called ‘Load’. Further, we want to load the selected obj file by entering the desired tree (ex. Firtree) in the game.

So I included assetName (=File name like Firtree) and bundleURL (= my Google Drive address) as public. As I went around YouTube and forums and tried to match the sources little by little, I was getting an error I didn't understand.

In summary, I want to know how to load the desired object into the game within the Asset Bundle uploaded to Google Drive.

There are still many things that are still lacking, so I would like you to explain in detail. Thank you very much.

alt text

error1.jpg (51.8 kB)
error2.jpg (57.1 kB)
avatar image xxmariofer asaco0629 · Nov 18, 2020 at 12:30 PM 0
Share

as i said, you are not using the right url, you are using the share url, but notice, that after you click on that share url a second page will open, it will be fast but that second url is the one you need to use and it will end with somewthing like "&export=download&authuser=0" try to get that url and try again, or easier create a webserver in your personal pc and access the file from the server, will be a lot easier

avatar image asaco0629 xxmariofer · Nov 18, 2020 at 12:47 PM 0
Share

'create a webserver in your personal pc and access the file from the server, will be a lot easier' means use like 'XAMPP Control panel'??

Thank you so much

Show more comments

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

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

Related Questions

AssetBundle - How to load older version unity asset bundle in latest version asset bundle 0 Answers

Google Drive Plugin - full access from android device 1 Answer

assets bundle download persistance on iOS 1 Answer

AssetBundle Load 0 Answers

problems getting text string from assetbundle 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