How to add objects with set variables to object array in Game Instance Event Graph and access each object's variables in a widget?
So I am using the Varest plugin by Vladimir Alyamkin to get data from my local database. I have a custom event called GetTeachersStudentList in my Game Instance GI_EAGC. The first part of this event pulls out a json object with the correct results that I want. Once I get the data of a student I have a StudentClassProfile Object in my Game Instance to which I do this:
I construct a Student Class Object with reference to itself and set it to the Student Class Profile object variable. I then proceed to set all the variables in this object with the result values and finally add this object to my StudentProfileArray variable like so:
Now when I do this in my StudentListUI widget and I try to print the studentFirstName, e.t.c of each object to test it out I do not get any result. Note when I tried printing the arrays size it did not print a value either:
But when I print the strings on the Game Instance before setting them to the objects and after they do exist and do print so i'm getting the data but somehow i am loosing the references that i try to store in my StudentProfileArray object. Any idea what I am missing?
Follow this question
Once you sign in you will be able to subscribe for any updates here