Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started by: jrock84 on December 31, 2016, 12:04:33 AM
-
Hello!
I hope everyone is doing well! A loaded question, if you will entertain me.
So, I am using ORK Framework as my RPG backend and have ORK Playmaker actions. I am attempting to completely use a custom UI. My problem at the moment is populating lists of items, I guess either from an array or hashtable, to UI elements such as individual buttons per item or just a plain list. What's the most straightforward way of accomplishing this? Right now I have ORK items from it's database being dumped to a string, which is then converted to an array, which will display the correct count (for testing purposes) when using array length. Now I'm a little stuck as to where to go from here. The ultimate goal is to have these lists/buttons and have them interact-able with ORK in regards to equipping, dropping, etc. Any help or guidance is appreciated!
-
Anyone have an idea on this? I'm a little stumped.
-
Hi, I don’t have the ORK Framework, but maybe this can help.
There is an example for lists for Unity UI+Playmaker. There are no arrays, but when an UI item is spawned Add it to a list. Or on it’s creation put values in title and other text objects.
On Ecosystem search “list” and look for “u Gui Dynamic List” sample.
Maybe there are more examples with you can combine, or tutorials.
-
Ah, I had not seen that one! Thank you! I'll check it out and report back.
-
Ok, I had success implementing the example into my UI, but feeding my array data into the events is proving a bit more difficult.
I'm still using the add button for testing, but I'm calling my FSM that has an array for each action calling the ListItem FSM as a template. My ORKUIBridge FSM is gathering the data for the items. Please see screenshots. Thanks!
(https://s30.postimg.org/adx3j6azl/error.png)
Array for each:
(https://s29.postimg.org/54eicm8fr/arrayforeach.png)
List Controller:
(https://s29.postimg.org/4g5nto9pz/list1.png)
(https://s29.postimg.org/vf9iotw6v/list2.png)
(https://s29.postimg.org/ue99zpf7b/list3.png)
List Controller GameObject:
(https://s29.postimg.org/pgvpeld87/Listcontroller_GO.png)
List Item Prefab:
(https://s29.postimg.org/eikfweomv/listitem1.png)
(https://s29.postimg.org/oh9zwmng7/listitem2.png)
(https://s29.postimg.org/h2ko491kn/listitem3.png)
ORK UI Bridge:
(https://s29.postimg.org/xeuptzfw7/ork1.png)
(https://s29.postimg.org/6v24rufcn/ork2.png)
-
Still haven't made any headway on this.
-
Shameless bump. Haha
-
Hi,
Can you try not to use ArrayForEach? and do this manually, do that work?
Bye,
Jean
-
Hey Jean,
Right now I'm just testing the feasibility of using Playmaker for this purpose so I'm trying to see if this can be done using Playmaker. There's really nothing else to do manually right now.
-
Hi,
I mean not using ArrayforEach. Maybe this is the issue here.
There is a sample on the Ecosystem showing how to work with UI listing, have you checked it?
Bye,
Jean
-
Yeah, that's what I started with. If you're talking about the UGUI Dynamic List sample. I had success using it manually, but trying to feed data to it was a no go. How else would I dynamically add the buttons from array data if not by array for each? Maybe I'm just using the wrong logic here. Thanks Jean!
-
Hi,
there are many options, you can manually iterate ( using iterate action from the ecosystem).
Can you give a sample of the array content?
Bye,
Jean
-
Hi Jean,
Let me check that out and I'll report back. I had not considered that yet. Thanks!