Page 1 of 1

What Array Type to use with "Get Files" Playmaker Action?

Posted: Mon Oct 01, 2018 3:54 pm
by westingtyler
using a string array appears to store nothing even though I thought I was getting filename strings, and even though it seems to be the type the action will "accept".

I use the Get Files action to load all the files in a path into an Array variable. The problem is, at runtime when this happens, the filename strings don't appear to be saved to the designated string array. The Get Files action seems weird in general, like it's missing where you save it to, as you can see in the screenshot. If I select an existing array, that string array, then that seems appropriate but does nothing at runtime, and the string array remains as it was before.

What type of array is needed to save files to it, since 'string' type does not work?

I couldn't find this action in the playmaker reference area.

The tool tips on the action aren't very detailed.

Re: What Array Type to use with "Get Files" Playmaker Action

Posted: Mon Oct 01, 2018 4:47 pm
by Joel
Hi there,

I've tried it with a string array at my end and it appears to work fine for me. Have you ensured that theres a slash at the end of the path? i.e. C:/Users/.../myFolder/ rather than C:/Users/.../myFolder.

If this is not the issue, please could you send me a basic project which replicates this?

All the best,
Joel

Re: What Array Type to use with "Get Files" Playmaker Action

Posted: Mon Oct 01, 2018 5:25 pm
by westingtyler
okay I'll try to put together a project to replicate it. in the meantime, here are two images of what happens at runtime.

The debug line shows a list of files below the array in the action, but when checking the variables tab the array itself is unchanged from what I set it to before runtime.

I found the ES3 version of Get Files, but it still does the same thing.

Re: What Array Type to use with "Get Files" Playmaker Action

Posted: Mon Oct 01, 2018 5:45 pm
by westingtyler
I used Get Array to get various indices from the array, and it works. i got index 0, 1, and 2, and they show the correct file names. For some reason it's just not showing the updated array entries on the variables page or in the inspector, and if you notice in this image it GOT the correct array index string, but the debug above, shows the un-updated array entries: "should be file name not this.,,,"

What is the best way to make a small project to send?

Re: What Array Type to use with "Get Files" Playmaker Action

Posted: Mon Oct 01, 2018 5:53 pm
by Joel
Hi there,

If the values are there but it's not showing them in the Editor, this is likely a bug at PlayMaker's end so you might want to make them aware of this. The Editor GUI is handled at their end.

Also I noticed that your array is initialised with a size of 5. You might want to initialise the array with a size of 0 incase this makes a difference.

Easiest way to PM me a project is to export it as an AssetPackage, upload it to something like Dropbox and then PM me the link.

All the best,
Joel

Re: What Array Type to use with "Get Files" Playmaker Action

Posted: Mon Oct 01, 2018 5:57 pm
by westingtyler
okay, thanks!

Re: What Array Type to use with "Get Files" Playmaker Action

Posted: Tue Oct 02, 2018 6:28 am
by djaydino
Hi.
Its possible the action does not have SaveChanges on the end of the script.

theArray.SaveChanges();

Re: What Array Type to use with "Get Files" Playmaker Action

Posted: Tue Oct 02, 2018 10:37 am
by Joel
djaydino wrote:Hi.
Its possible the action does not have SaveChanges on the end of the script.

theArray.SaveChanges();
Thank-you. I can't seem to be able to find anything in the PlayMaker documentation which says this is required, but it sounds like this is likely the issue.

If you PM me your invoice number, I'll send over an update which includes this. This will also be included in the next update, though this is not due until towards the end of the month.

All the best,
Joel