WWW Class Data Retrieval

I have an Art Gallery that is being displayed as a 3D enivronment using the Unity Web plugin. I want to allow the user to change out the images that are displayed on the walls though. I only have an alloted amount of spots for images to appear in the Gallery, so I am thinking perhaps XML or even more simply a list.

  1. Would it make any difference if I have the “canvas” the images are displayed on as an actual model or just a cube? I am assuming I can project the Texture2D on to either making it not a big deal.

  2. The gallery has 3 rooms with 4 “canvas” spots in each. What would be the best way for me to check with the WWW class to see what images to display on what Canvas? Something like the following would be exceptional but I am not sure if it is doable…

[GalleryRoom1]
[Canvas1]
images/painting-cat.png
[/Canvas1]
[Canvas2]
images/painting-dog.png
[/Canvas2]

  1. Naw not really from technical point of view. But you might want to seek a specific look, feel and experience and the object you show it on should be tailored to it. The most easy thing naturally is a simple quad mesh fbx you imported (plane is 10x10 quads and thus much heavier for no gain often)

  2. I would go with XML, then you can just have

<rooms>
  <room>
    <canvas url="..." index="1"/>
    <canvas url="..." index="2"/>
    <canvas url="..." index="3"/>
  </room>
  <room>
    <canvas url="..." index="1"/>
    <canvas url="..." index="2"/>
    <canvas url="..." index="3"/>
  </room>
  <room>
    <canvas url="..." index="1"/>
    <canvas url="..." index="2"/>
    <canvas url="..." index="3"/>
  </room>
</rooms>

and that basically without any kind of limitation on rooms and canvases :slight_smile:

alternative to the index I would use objectName so you can use the string in there to directly find the game object to paint. that gives you a rather powerfull tool for dynamic texturing and frees you from hard bound objects

Thank you so much, those were both fantastic answers. This forum needs some kind of Kudos system for answers like these :slight_smile: