I am having an issue where a few people who are playing our games music is stopping. I have not been able to replicate it on my computer. What happens is they play the game, save it and exit out. When they load there is no music running, I thought I had forgotten to hit loop, but that doesn't seem to be the case. I am pretty sure that there shouldn't need to be something in the OnLoad, as long as when the music starts it is set to loop, but I might just be missing something obvious.
Best,
R
Comments
Are you using the Sound: Play music Action to play your music? I too am not able to replicate it - are they are any other details you can share about the circumstances under which music failed to load again?
We are using AC 1.5b and Unity 5.5.1f1. I am awaiting responses as to more details about when it occurs for them.
If they're running on the same platform as yourself, have you tried loading their save game files for yourself? If we have access to a save file that replicates the issue, that will be a big help. The location of save files are stored in your system's Application.persistentDataPath directory.
Yes I have used one of their save files and attempted replication, however that did not help me replicate it! I will look to get their log files as well.I can also get you a copy of their save file, you might be able to replicate it where I have not been able to. Are you going to need a copy of the game as well to check the save file? If so, where should I send a key to the game for Steam, and the save file?
Best,
R
Are you able to load in the save file from within the Editor? PM the file to me and I'll see if anything's obviously wrong.
In your last post you said that the save file did not help you replicate it. What does that mean exactly? Did the music play correctly upon loading, or were you not able to load it?
There's a possibility that if your game in the Editor has been updated since the build you and your testers are using, then the data is now out-of-date. What's the result of testing in a fresh build?
This may be a platform-specific issue, which'll compound the difficulty in solving something that can't be reliably reproduced. Can you confirm all other data types are loading succesfully?
I don't know if you have the time for further testing, but one thing that may help is to switch to XML-serialization so that the raw save data can be viewed without the need to deserialize it (which may be the source of the issue).
By default, desktop platforms rely on Binary serialization, but you can enforce XML by placing the following script in your starting scene:
http://pasteall.org/939002/csharp
That should result in save files being given the .savx extension. If you can get similar situation where the music is not loading from such a save file, it may help to uncover the problem.
I am working on getting the player to shoot a save over from a build with XML serialization. And in regards to your question about testing in a fresh build. I have tested that, and it gave the same result. And so far there have been no issues in regards to any other data. All graphics, and variables seem to be fine, and they are not having issues in any respect asides from music not carrying over.
- And in regards to your question about testing in a fresh build. I have tested that, and it gave the same result.
Sorry, but to be really clear: the result is that music is correctly loading for you, or that it's the same as with the tester (i.e. not loading)?