Forum rules - please read before posting.

crossfade Play Music problem

edited March 2017 in Technical Q&A
Hello.

i have a problem with playmusic crossfade.
The first music is cut instantly (no fadeout), the new music starts in fade.
The music resume well on the trigger of the lower stairs

i use 1.56a
unity 5.5.0f3

ask me if you need more details. thanks

here is a video:


screenshots :

trigger upstairs
image


trigger downstairs
image

music storage :
image

a track :
image

Comments

  • Thank you - I will let you know if I need more detail.
  • It works fine for me, provided that the MusicEngine prefab has a child object with the "MusicCrossfade" component.  Check your Console for an error message related to this.

    I shall have the MusicEngine create one dynamically if one is not found, but try updating your AdventureCreator/Resources/MusicEngine prefab by re-importing it from the Asset Store.
  • i update the MusicEngine.prefab but it's the same.
    nothing in the console, no error message.

    finally i test the upstairs trigger to "pause gameplay" and it's works!
    Can we do this without pausing the game?


    thanks.
  • It's certainly possible - aagin, I recreated your set-up in my own test and all worked fine.

    Perhaps there's an issue with the Trigger firing repeatedly.  Assign each Music Action a comment (via the cog icon on the right-side of the Action) and enable comments in the Console from the bottom of the Settings Manager.  You'll then be able to see exactly when and how many times those two Actions are firing - anything amiss?
  • hello,



    here a video with comment on each trigger (up and down)



    At each passage it adds 2 and not 1 to comment
    With the "pause gameplay" it adds only one comment.

  • edited March 2017
    If the Trigger is run again while the crossfade is still ocurring, the crossfade effect will be skipped the next time around.  It sounds like your Player is causing the Trigger to run twice.

    Check that only the root GameObject of your Player prefab has a collider, Rigidbody, and is tagged with Player.  If you have any other Colliders as children, you must untag them - only the root should be tagged as Player.
  • only the root gameobject is tagger as "player"
    but... it have 2 colliders...deleted one and everything works!

    This may solve my other problems!
    I will test later (the "npc follow" no longer works)
    Thanks for your help Chris.
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.