playMaker

Author Topic: Creating an album with pictures[SOLVED]  (Read 542 times)

Alatriste

  • Full Member
  • ***
  • Posts: 182
    • View Profile
Creating an album with pictures[SOLVED]
« on: December 14, 2018, 04:21:39 AM »
Hi,

For my next project, I'd like to add an achievement album that unlocks big images. Think something like a card album where you have different football teams. Then, clicking on the different football team badge, you access to the football players of that team and clicking on any of them, you see a big image full screen of the player.

I'm trying to think about the easiest way to accomplish this, but all the options seem complicated in my head.

Any help about how should I tackle this system?
« Last Edit: December 20, 2018, 10:40:58 PM by jeanfabre »

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 4613
    • View Profile
    • jinxtergames
Re: Creating an album with pictures
« Reply #1 on: December 14, 2018, 08:17:40 AM »
Hi,
if you setup the card album in the ui, you can use the images as buttons.
Then you can use 'ui button array' and maybe an array and use the index for the big picture.

what ideas did you have?

Alatriste

  • Full Member
  • ***
  • Posts: 182
    • View Profile
Re: Creating an album with pictures
« Reply #2 on: December 14, 2018, 09:13:52 AM »
Hi,

I didn't know about the UI button array. That sounds like something I should explore.

I was considering about creating an array with the pictures and assign them to the album slots when they become unlocked, but I wasn't very sure about how to assign each picture to the corresponding slot... I guess I could do it through the index.  ???

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 4613
    • View Profile
    • jinxtergames
Re: Creating an album with pictures
« Reply #3 on: December 15, 2018, 08:13:57 AM »
Hi, yes, you can use multiple array (1 for the slots, 1 for the picture, 1 for the big picture and 1 for the button array)

For the button array, i just recently made an action for it (see attachment below)

But there seems to be an issue when using on 2018.3 as PlayMaker is not yet supporting 2018.3 (but will support soon)

Alatriste

  • Full Member
  • ***
  • Posts: 182
    • View Profile
Re: Creating an album with pictures
« Reply #4 on: December 16, 2018, 03:41:21 AM »
Thanks! Let see how it goes. :)

Alatriste

  • Full Member
  • ***
  • Posts: 182
    • View Profile
Re: Creating an album with pictures
« Reply #5 on: December 20, 2018, 06:42:14 AM »
Ok, just for anyone interested I found a way easier to do this, without arrays.
 Basically, the album and the pictures are different prefabs. There is always an "Album Master" that keeps tracking of the album active so it knows which prefab to spawn into the scene. That's it.

The only extra work is that you have to be familiar with creating Scrolling UI elements and know how to work with the Grid Layout script, so the content added, can fit the canvas.

In the end, this solution works better for me than working with arrays.
« Last Edit: December 20, 2018, 06:44:34 AM by Alatriste »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 14684
  • Official Playmaker Support
    • View Profile
Re: Creating an album with pictures
« Reply #6 on: December 20, 2018, 10:40:48 PM »
Hi,

 yes, this is a very good strategy too, as you can also consider children of a gameobject as an array, which is totally valid in itself and brings a lot of benefits on the table.

 Bye,

 Jean