Welcome,
Guest
. Please
login
or
register
.
October 03, 2024, 09:36:08 AM
Home
Help
Search
Login
Register
Tasharen Entertainment Forum
»
Support
»
Other Packages
»
StarLink GameWebRequest
« previous
next »
Print
Pages: [
1
]
Author
Topic: StarLink GameWebRequest (Read 2620 times)
schellenberghq
Newbie
Thank You
-Given: 0
-Receive: 0
Posts: 31
Game Programmer
StarLink GameWebRequest
«
on:
August 22, 2013, 11:00:07 AM »
Could someone give me a good example of how to use the GameWebRequest script. I've tried quite a few different ways to get it working.
I'm trying to use it to download a .png and assign it to a Texture2D variable.
Thanks
-Jacob S
Logged
---------------------------
Jacob S.
Game Programmer
---------------------------
ArenMook
Administrator
Hero Member
Thank You
-Given: 337
-Receive: 1171
Posts: 22,128
Toronto, Canada
Re: StarLink GameWebRequest
«
Reply #1 on:
August 22, 2013, 11:44:22 AM »
WebRequest.Create(url, callback);
where "url" is your image such as
http://somewebsite.com/abc.png
, and "callback" is the function to call when it finishes downloading it.
Logged
schellenberghq
Newbie
Thank You
-Given: 0
-Receive: 0
Posts: 31
Game Programmer
Re: StarLink GameWebRequest
«
Reply #2 on:
August 22, 2013, 12:57:13 PM »
Could you give me an example on how to retrieve the item that was downloaded?
The method is void, so I'm not sure on how I would assign the downloaded object (texture in my case) to a Texture2D variable.
Logged
---------------------------
Jacob S.
Game Programmer
---------------------------
ArenMook
Administrator
Hero Member
Thank You
-Given: 337
-Receive: 1171
Posts: 22,128
Toronto, Canada
Re: StarLink GameWebRequest
«
Reply #3 on:
August 22, 2013, 01:19:24 PM »
Hmm, I just had a second look at that file... it's not going to help you download images. It's meant for data files. Just use the regular WWW download method to download images. DownloadTexture script comes with NGUI.
Logged
Print
Pages: [
1
]
« previous
next »
Tasharen Entertainment Forum
»
Support
»
Other Packages
»
StarLink GameWebRequest