Forum rules - please read before posting.

Sound not present on test start

When I run the scene in the editor, there is no sound. However, sound will kick in when I pause and un-pause the menu. This is not a problem if I build and run the scene. Is this a bug with the editor or am I missing some kind of component?

Comments

  • If builkd works, sounds like a unity issue, unless its a windows issue with the pc sound playback, and unity has been muted there.
  • Are you using any other assets in your scene, for example UFPS?  What version of AC and Unity are you using?
  • edited February 2016
    I have no other assets and I've recently updated the package. This problem doesn't seem to occur if dialogue scroll sound is initiated.

    EDIT: Updating the package seems to have fixed the bug.
  • Actually no, it didn't. And I can't edit my previous posts for some reason.
  • Check your MainCamera object in the scene.  It should have an AudioListener component - is it enabled, and stays enabled when the scene begins?
  • Yeah, the main camera has an audio listener and the bug still happens. Another weird effect is if you engage dialogue, no sound plays. However, if you pause and un-pause during the dialgoue, all of the previous chars of sound play back over each other at once.
  • But is the AudioListener enabled when the bug occurs?  It's either that or your volume levels - what are the sound levels like when you go into the in-game Options menu?
  • The Audio Listener is enabled and the volume levels are at their default values.
  • what about the game window?? have you hit the mute button? xD


  • I'm assuming this is only happening in the Editor and not builds, correct?

    We'll need to determine if this is a general problem with audio, or unique to AC.  Try playing a regular AudioSource component in your problematic scene without involving AC or it's own Sound system.
  • Just tested the scene with an audio source playing a looping sound. The game is mute on starting the test, and once I pause and un-pause the menu, the loop actually begins. It's as if all sound is just not set to run until the menu is un-paused, and this only happens on all consecutive tests after the first one when the project is loaded.
  • Again, is this Editor-only or in builds as well?

    Are you using the Sound: Play Action in your scene's OnStart Cutscene to play the sound, or just relying on the AudioSource's Play on awake checkbox?  Try this if you weren't before.
  • edited August 2016
    Hi

    Unity Ver. 5.3.6 / AC  Ver. 1.52a & I can confirm that this is still happening:

    My Player has a ‘walk’ sound clip applied exactly as in the tutorials

    My Player is FP with no mesh attached but has animation, camera and a capsule collider (and the relevant sound child) – this all works fine (Normal interactions including “Look at” and AC functionality)

    I also have a triggered SFX sound later on (Based exactly on the “Camera switch” example in the 3d video tutorial.)

    Symptoms:

    Run in editor – No sounds from either the players walk loop or the triggered sounds until the game is awoken from a pause. (Either (Esc) menu or Action list / Cutscene end)

    “Sometimes” Sound will work OK on the first Editor Play-through… (it is NOT always : it depends on how much you have done in the editor and if you have /have not saved your scene (Works prior to a save)

    Running in full build (standalone Win/Mac/Linux) is fine – with or without a scene prior to the scene with the audio in it. (Which is consoling – and proved that I was not going entirely do-ladley…)

    In the editor the scene “sound” button is enabled – but becomes greyed out during test play , and the mute button is “unchecked” (sound on) during the whole test.

    When the sound component on the player is visible during test – the Audio clip “walk” shows in the  inspector as it should…. (but no sound)

    I have no “on start” cutscenes – because I have a full introductory scene prior to the ‘Main event’ – although for my own sanity I would be happy to have one just to fire up the audio : but I don’t know how to build that yet and have not got the time ATM…

    My Main Camera Audio listener remains on during the entire test.

    What is interesting is that the “Play on awake” on the “Player’s”  Audio source becomes Unchecked as soon as the scene is started – Regardless of editor settings OR having it saved to the prefab (So having it checked or not seems to make no difference!)

    So it would seem this is a Unity Editor problem & I am reporting (as such) to bring this thread to "semi answered" conclusion : Unless anybody has found a cure – for which I personally would be grateful – If just to make development easier & to avoid catching any more red herrings & wasting loads of debugging time…
  • Thank you for bringing it to attention.  From the symptoms, it does appear to be an issue with Unity rather than AC, but I don't want to write it off just yet.  But the fact that sometimes it works / sometimes it doesn't does make it difficult to recreate and pin down.

    You mention First Person - UFPS or AC vanilla?  The only related thing I can think of is the AudioListener.pause calls that AC makes 3 of:
    • UltimateFPSIntegration.cs, line 132
    • SceneSettings.cs, line 259
    • StateHandler.cs, line 397
    Try temporarily commenting out those lines and see if that makes a difference.
  • edited August 2016
    Hi Chris ,

    I am not using UFPS - Its AC Vanilla ( 'ish ) - no model : only the collider , if by Vanilla you mean the AC 'player' attached components - yes it is  :-)

    All three commented out (then, one by one & two by two in case of conflicts)
    and no change - which is 'good' - no sound at the start on any combination...

    StateHandler- lost sound completely (no sound on a resume because it was not re-set by the
    HasGameStateChanged ()
    due to the commenting out - to be expected
    )

    I'd say you where in the clear - I did a bit of following the white rabbit down the hole : and on each occasion came up where I expected to be.. I'ts a right cheek considering my C++ (then) C# has (/had) almost 20 years of rust on it ! 

  • In that case, it may be worth upgrading to Unity 5.4 to see if it's been addressed officially.
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.