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.
What Array Type to use with "Get Files" Playmaker Action?
-
- Posts: 28
- Joined: Tue May 10, 2016 4:00 pm
What Array Type to use with "Get Files" Playmaker Action?
- Attachments
-
- gamedev es2 array2.PNG (59.55 KiB) Viewed 8701 times
-
- gamedev es2 array.PNG (50.51 KiB) Viewed 8701 times
Last edited by westingtyler on Mon Oct 01, 2018 6:12 pm, edited 1 time in total.
Re: What Array Type to use with "Get Files" Playmaker Action
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
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
-
- Posts: 28
- Joined: Tue May 10, 2016 4:00 pm
Re: What Array Type to use with "Get Files" Playmaker Action
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.
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.
- Attachments
-
- arr2.PNG (79.73 KiB) Viewed 8699 times
-
- arr1.PNG (83.01 KiB) Viewed 8699 times
-
- Posts: 28
- Joined: Tue May 10, 2016 4:00 pm
Re: What Array Type to use with "Get Files" Playmaker Action
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?
What is the best way to make a small project to send?
- Attachments
-
- arr3.PNG (98.62 KiB) Viewed 8699 times
Re: What Array Type to use with "Get Files" Playmaker Action
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
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
-
- Posts: 28
- Joined: Tue May 10, 2016 4:00 pm
Re: What Array Type to use with "Get Files" Playmaker Action
Hi.
Its possible the action does not have SaveChanges on the end of the script.
theArray.SaveChanges();
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
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.djaydino wrote:Hi.
Its possible the action does not have SaveChanges on the end of the script.
theArray.SaveChanges();
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