x


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

more ▼

asked Aug 31 '10 at 03:36 PM

Gianca gravatar image

Gianca
48 18 19 23

(comments are locked)
10|3000 characters needed characters left

4 answers: sort voted first

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.

more ▼

answered Aug 31 '10 at 03:40 PM

Daniel Brauer gravatar image

Daniel Brauer
1.4k 12 19 38

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?

Sep 01 '10 at 09:08 AM Gianca

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?

Sep 01 '10 at 10:02 AM Gianca
(comments are locked)
10|3000 characters needed characters left

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

more ▼

answered Sep 02 '10 at 08:59 AM

Gianca gravatar image

Gianca
48 18 19 23

Ok, so if it's just models then all you need is a model format and parser, which you've found.

Sep 02 '10 at 02:34 PM Daniel Brauer
(comments are locked)
10|3000 characters needed characters left

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.

more ▼

answered Jan 08 at 11:16 AM

rahuxx gravatar image

rahuxx
1

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.

Jan 08 at 11:16 AM alucardj
(comments are locked)
10|3000 characters needed characters left

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.

more ▼

answered Oct 26 '10 at 01:04 AM

Aurelio Tapia gravatar image

Aurelio Tapia
1

Tks a lot, it really help me so much.

Oct 28 '10 at 08:30 PM Aurelio Tapia
(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

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

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x815
x437
x374
x323

asked: Aug 31 '10 at 03:36 PM

Seen: 1914 times

Last Updated: Jan 08 at 11:16 AM