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
1
Question by Rajivdev · Jun 06, 2013 at 03:06 PM · sceneruntimedownload

How to download and load a scene during runtime?

Hi,

The title already explains the question. I want to download a scene from a server and then load it while the game is playing. Do I just store a .scene file on the server and download it? Aren't there any other required files that also need to be downloaded? I can't use assetbundles because I don't have Unity pro.

Thanks in advance

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 solly576 · Jun 06, 2013 at 04:00 PM 0
Share

I would like to know this too, and I am using Unity Free too :D

4 Replies

· Add your reply
  • Sort: 
avatar image
2

Answer by PommPoirAbricot · Jun 06, 2013 at 04:26 PM

Hi this is not so evident You have to negociate with assetbundles (cf unity script reference)

You have 2 types of AssetBundles (one containing scenes, and the other containing any objects you want excluding scenes).

The first one can contain a complete scene (and so configurations) and keep reference on script attached to gameobject and its public values but will be missing after loading, because streamed scene doesn't include script, only reference and values. So the tips is to include the script in your main application and your streamed scene will recognize this script and script won't be missing. (see about Angry Ants solution: mono runtime to precompiled script into dll and load it dynamically)

The last one, can just contain prefabs (script included) and assets which are not in a scene. But there is the same problem : script included in the bundle will be missing, but here you can get the name of missing scripts contrary to streamed scene in which you can't see the contents before loading. Unfortunately your assets doesn't have any space configuration as in a streamed scene.

Hope my informations are understandable

http://docs.unity3d.com/Documentation/Manual/scriptsinassetbundles.html

http://answers.unity3d.com/questions/9688/dynamically-loading-scripts.html

http://docs.unity3d.com/Documentation/ScriptReference/BuildPipeline.html

The problem i found

http://answers.unity3d.com/questions/468762/need-to-get-the-name-of-missing-scripts-via-warnin.html

Against duplicated loaded assets

http://answers.unity3d.com/questions/241158/problem-with-loadall-it-duplicate-the-objects.html

http://answers.unity3d.com/questions/343578/get-variables-from-a-null-component.html

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 Graham-Dunnett · Jun 06, 2013 at 03:11 PM

Read these docs:

http://docs.unity3d.com/Documentation/ScriptReference/WWW.LoadUnityWeb.html

Comment
Add comment · Show 1 · 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 Rajivdev · Jun 06, 2013 at 03:13 PM 0
Share

I'm not developing a web player game. Sorry for not mentioning it,

avatar image
1

Answer by DaveA · Jun 06, 2013 at 04:31 PM

AssetBundles are the preferred method. For $1500USD you'll save yourself the trouble of the alternative: find/write a scene importer. I would recommend X3D as it includes all aspects of a scene (not just geometry and textures like Collada or worse, OBJ). Strike that. I would recommend saving up to get Pro as scene import is hard. That is, until I release my X3D importer!

Comment
Add comment · Show 1 · 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 PommPoirAbricot · Jun 06, 2013 at 08:16 PM 0
Share

Great !! I didn't know that option ! Since 2009 ! So I will see that more in detail !

Can you export import at runtime scenes and when loading it keeping track of attached scripts ?

Or simply get name of missing script after or before loading ?

Can you use it on android and iOS ?

In what this differe from asset bundles ?

avatar image
0

Answer by pRoFlT · Dec 29, 2015 at 07:38 AM

My thought. create scene with basic information and objects need for each level. Then create the level under an empty game object at 0,0,0. Save game object as prefab.

When you start a new level load empty scene and then instantiate empty game object prefab from asset folder at location 0,0,0, done, level loaded. All levels saved as prefabs.

Anyone think this will work? or is a good idea?

Hate not being able to load from file!!!! i want level structure like \asset\1\1\scene for world 1 level 1. and then you can have icons in the same folder for overlays etc. and maybe music.mp3 files to load for each level. or anything you want for each level. would make it easy to modify the game layout. like remove level 4 or move 4 to 6 and 6 to 4 etc... in case 6 is easier then 4.

Guess ill do the same but load each scene into build settings in the correct order.

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

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

Not download/load from cache for second time 0 Answers

how can i load different videos using one scene 1 Answer

Cannot download obj file from server and save to Assets correctly (runtime) 0 Answers

Create new scene at runtime 1 Answer

Load data from file, if scene changed, fails to load location 0 Answers


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