Playmaker Forum

PlayMaker Feedback => Action Requests => Topic started by: fish on November 01, 2018, 08:09:23 PM

Title: Array Changed Action!
Post by: fish on November 01, 2018, 08:09:23 PM
I believe it would be very beneficial to have an array changed action, especially if it can monitor the array based on the change of a specific index or the whole array. Just like the other changed action, it will call an event if the array is changed and store the results. Maybe add a call event if the specified index doesn't exist?

Is this something possible?
Title: Re: Array Changed Action!
Post by: djaydino on November 02, 2018, 05:03:56 PM
Hi.
That would not be very performance efficient to do every frame i think.

It think it would be better to send an event when you change something in the array.

Then have 2 copies from the array (old / new) and compare using get next and the index value (to get the old value on the same index)

If a value has changed copy the new array to the old array and then do what you need to do when something has changed.
Title: Re: Array Changed Action!
Post by: fish on November 02, 2018, 06:31:11 PM
I originally though of doing it the way you mentioned but I noticed assets that allow you to bind variables to gui and thought that would be a lot less work and headache. Then I noticed the changed actions and thought having this with arrays would be perfect.

Is using the changed actions too inefficient for managing the display of gui data?
Title: Re: Array Changed Action!
Post by: djaydino on November 04, 2018, 04:20:53 PM
Hi.
On single variables its fine,
But if you would do this on large arrays and doing it every frame it would not be good for performance.