Forum rules - please read before posting.

Player switching question

Hi,
I have more scenes. For example in menu scene, I run Player: Switch action "under" a button, when I select my player, after if I start the game, not this player is my player, the original default player is the player. Where could be my mistake?

Comments

  • edited January 2020

    Are any of your Players present in the scene files? If you rely on player-switching, you should avoid this - all Player objects should be spawned in at runtime.

    I'll need steps to recreate the issue. Please share more details and screenshots showing your workflow - including the Settings Manager, Player: Switch Action, your Hierarchy at each point, and the Console's messages.

    What are your AC and Unity versions, also?

  • Thank you,the problem was that, I left my first player in the scene, after I deleted it, I saw the good player, so it was a perfect advice!:) Just I have a problem now with Opsive, I remember, I left my player in the scene, because if AC instantiate my player, I got continously red errors from Opsive UCC side, what I can't understand because I'm not coder. So when I leave my player in the scene and I start the game, Opsive works perfectly with AC. But when the scene without player, I get errors.

    I know, it's NOT AC problem, I don't know any tricks for it.:(

  • What is it you're trying to achieve, exactly?

    If Opsive needs the Player to be present in the scene-file itself, then don't rely on player-switching.

    If you're trying to just not have a Player present in your main menu scene, you can create an "empty" Player just by adding a Player component to an empty GameObject.

  • The strange thing is that, when I put 2 player in the scene ( 1st player is active, 2nd player is inactive), then Opsive works, after I deactivate first player and active 2nd player, Opsive collapses and give me errors. Strange

    Thank you for your advices:)

  • You'll have to contact the Opsive devs for advice with errors on that side.

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.