- Home /
loading object @ runtime in webplayer....
Hello Unityrs,
I have my unity 3D environment in a webpage... and I need to load object at runtime. Now, I know that if I would have a local project I could use the "Resource" directory but what happens if I am on the webplayer!?
As I don't have the PRO version the solution I think would be the AssetBundles...but the are not available in the non-PRO.
Any suggestion?
Cheers, Giancarlo
Answer by Daniel-Brauer · Aug 31, 2010 at 03:40 PM
Without Pro (and thus without AssetBundles), your best option is probably the WWW class. It will let you load text and images, from which you can build the objects you need. Of course, this requires that you create/find a format and a parser, but for many types of objects this solution will be adequate.
And if I save my prefabs on the webserver and somehow I find the way to upload that prefab on clientside, do you think it is possible to load prefabs dynamically in my 3D scene?
What I am trying to do is uploading in my game Prefabs saved on my webserver. To get the data I call
var www = new WWW("http://localhost/prefabs/myroom.prefab"); yield www;
but what it's not clear to me is ...once yield is done, what www contains? where is my Prefab? is there a default client-side directory where I can upload my prefab?
Answer by Gianca · Sep 02, 2010 at 08:59 AM
Well actually I've found a parser for OBJ data objects so I can transform my objects in OBJ format and upload them at runtime. So, at least for now I can avoid AssetBundles.
Many thanks. Giancarlo
Ok, so if it's just models then all you need is a model format and parser, which you've found.
Answer by Aurelio Tapia · Oct 26, 2010 at 01:04 AM
i need to do same. Can u please tell me what is the link of this obj parser. Ill be glad to know.
That i need is to load an object and change position, rotation, textures, colors, etc once it is loaded. If somebody want to help me it could be grat.
Sorry for my english, i try to do my best.
Answer by rahuxx · Jan 08, 2013 at 11:16 AM
how can we load sequence of objects? Like one loaded, then deleted and then second loaded and then deleted and then third loaded and deleted and so on.
Any help will be great for newbie.
Hi There.
Please don't post comments as answers. Post comments by clicking the [add new comment] button, a window then open for you to type in. Answer fields are for answers only, as this is a knowledge base.
You can convert this answer to a comment (or just edit your original question), you'll also get a better chance of getting an actual answer if the main list shows none or one answer in blue =]
Under the answer where it says edit | delete | more , click on more , then convert to comment
Also you don't have to wait for a moderator to approve a comment.
Your answer
Follow this Question
Related Questions
PlayerPrefs: force *Load*? 2 Answers
How to load a script at runtime? 0 Answers
Save and share from Web Player 1 Answer