x


Can I pass in the base path / asset path when embedding Unity content in a webpage?

I am embedding a Unity game in a web page and the path to the game is different than the path to the html file of the web page. The game loads assets at run-time and is looking for these assets in the directory of the web page. Is there a way to pass in or set the base path of the game so that it will look in the proper place for its assets?

Basically, I am looking for the Unity equivalent of the Flash technique of creating the param "base" and passing it into swfobject.embedSWF.

more ▼

asked Mar 04 '10 at 07:59 PM

Amy Nelson gravatar image

Amy Nelson
15 5 5 9

why don't you test if it works out of the box or not.

Mar 04 '10 at 08:25 PM Ashkan_gc

@s00tsprt, did you ever determine if it works out-of-the-box?

Mar 08 '10 at 08:44 PM Cyclops
(comments are locked)
10|3000 characters needed characters left

1 answer: sort voted first

See the "src=foo.unity3d" and the src PARAM tag in the generated HTML. Change those.

more ▼

answered May 20 '10 at 06:20 PM

Waz gravatar image

Waz
6.4k 22 33 71

(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:

x812
x72
x40
x3

asked: Mar 04 '10 at 07:59 PM

Seen: 1619 times

Last Updated: Jul 19 '11 at 01:51 AM