playMaker

Author Topic: Resources Load All from external folder  (Read 674 times)

Retrokat

  • Playmaker Newbie
  • *
  • Posts: 5
Resources Load All from external folder
« on: October 22, 2021, 04:02:53 AM »
Hi

I have an action that loads textures from the resource folder using the "Resources Load All" action and then selects one at random with "Array Get Random" then applies the texture via "Set Material Texture", this all works really well and is super straightforward :)

The issue is that I need to load the textures dynamically from a folder after the build is made so more can be easily added at a later date.

Is there an action like the "Resources Load All" but for an external folder?

I was thinking of doing it via an array and XML to set the files texture paths but that would mean they would not be dynamic.

Any help or recommendations would be much appreciated :)

Retrokat

  • Playmaker Newbie
  • *
  • Posts: 5
Re: Resources Load All from external folder
« Reply #1 on: October 25, 2021, 03:50:47 AM »
Well I think I have worked out a way to do it though a hidden thumbnail.db did put a bit of a spanner in the works :P

If anyone else needs to load files like this try:

Get File Count + Int add with a -2 value (to remove thumbs and something else?? to make it work) > Random > Get File info by Index (Name) > Build String (folder address + File Name) > WWW Object (URL is from Build string) > Set Material Texture

It is a lot more steps then I had before so if people do have other ideas it would still be great to hear them :)