playMaker

Author Topic: Generate GameObjects and set their image from an Array of Textures when a button  (Read 1250 times)

kenmarold

  • Playmaker Newbie
  • *
  • Posts: 14
I'm having a lot of trouble trying to develop a loader that when a button gets clicked it takes an array of textures, attaches them to new gameobjects and populates them into a grid layout (and when another button is clicked it removes the current gameobjects and replaces them with a new array of textured gameobjects). I have the grid layout portion of the UI fully sorted and the Texture arrays are getting generated in PlayMaker, I just need help with:

1. Generating GameObjects based on the number of textures in an Array
2. Populating a grid layout it with those GameObjects.
3. Assigning each texture to the Image component of each individually generated GameObjects.

I've also attached a screenshot (buttons and scrollable grid layout objects are on the right of the screen.)

Could anyone share some insight or a snippet that might do the trick?