Forum rules - please read before posting.

Music Stops, Loop ticked

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

  • edited April 2018
    AC and Unity versions, please.

    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?
  • Yes that is how we are running the music. The only other thing that they have mentioned is the fact that they have taken a long time to get through the game. I have tested whether after a certain amount of looping it stops by letting it run for about a day but that hasn't resulted in anything so far. I am going to get information about their game settings to see if that has anything different from what I am doing!
  • My apologies I can't believe I missed the first part of your response!
    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.
  • No problem.  It would also be worth having them check their log files.

    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.
  • Hello!
    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
  • Replicating in the build would only demonstrate the issue - not the cause of it.  The issue needs to be reproducable from within the Unity Editor so that debug checks can be made.

    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.
  • The save file suggests that no music data was saved.  While it's possible differing machines/projects resulted in data loss when reading, a lack of saved data would cause the experienced behaviour since music playback is reset upon loading regardless.

    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?
  • When I loaded it in the build version they were using it worked fine. However since that post I loaded it in my editor and the music was not playing. What would cause the data to not be saved?
  • If they do indeed load correctly in the build, then the data must be saved - and the problem is that in some cases it's somehow not being succesfully de-serialized.

    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.

  • Hello Chris,
    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)?
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.