Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started by: blackant on June 01, 2022, 10:57:50 AM
-
Hello,
I'm trying to make a system of Auto-Arranging files from Resources folder to create an interface menu with a specific setup:
In the resources folder,
- I created 3 subfolders with artist name,
- inside each folder are the audio clips they made for the game.
So I started with many tests to get file infos, Directory, Names etc.
And finally got a way to get results, but the thing is that the first file fund in the Resources folder, is the name of the first directory.meta.
So I tried to hide them, but they are still fund by the action.
So I can split the string and do what I want this way... but after ?
When the build is done, the .meta will not be there anymore…
And the other problem I'm thinking about is that the main objective to this setup is to let the players the ability to add their on musics available in the game.
And the resources folder doesn't really to be easily accessible once the game as been build.
So I'm pretty sure there is a better way to do this, like for example using the folder Users/Document/Musics or something like that.
So asking the community if someone as a solution would be a wiser approach at this step.
-
I encountered a big problem here:
I have set up a complete FSM to refresh list of songs available inside resources Folder/Name of the Artist.
The concept is working, but only if the array of song is only containing 1 song.
Let me explain more in detail with screens:
Thirst of all, when the breakpoint stops Unity, I can clearly see that there are many songs listed in the Array. So it's working somewhere...
(https://i.pinimg.com/originals/70/c0/28/70c0289eb6a0865e46557d6a688944fb.jpg)
Then, when I check the variables, it says that the Array is Empty... So of course the next step in the logic to send it to another FSM will goes wrong...
(https://i.pinimg.com/564x/44/e3/0a/44e30a606fce1d74bb7014340eb14cb4.jpg)
So I checked where the Action is listing files, and discovered that now it looks empty.
(https://i.pinimg.com/originals/d6/19/d5/d619d579996be990ae1eb367af72b79a.jpg)
SO I continue with others folders, and got the same behavior each time...
(https://i.pinimg.com/564x/6a/56/30/6a5630c8fc9e5fff6d402eed476b5e2d.jpg)
(https://i.pinimg.com/564x/ee/84/c7/ee84c750eb0fe1a31793d3739b6be97a.jpg)
Then I checked all instances who should get this array and only one has been set correctly because it only has one file, but it doesn't really explain anything.
So, I know that the concept can work less than partially, but the approach is certainly not good
(https://i.pinimg.com/564x/7b/cc/7c/7bcc7c1bdaf1da75d7404990ce0dfef1.jpg)
I need a rest, I'll come back later :(
-
Like I was fearing, working this way is only good in the Editor.
After building the project and send it to Steam, when I open the Library menu, there is no Music listed.
I Have to fund another way to make this, but I think the easiest one is to simply put the files directly in static variables, which also means, no loading time, but no possibility to drop files into the folder and automatically get them listed