Forum rules - please read before posting.

Bug: My Player won´t spawn correctly on Builds

edited August 2022 in Technical Q&A

Not sure if this is AC related but I am having a weird problem where in a Build of the game, my player doesn´t show up, I know he is spawned in there cause the AC console tells me he is but the player sprite is shrinked. However in-editor (meaning inside Unity) I can see him and play him just fine. Also I used Player -> Switch to force him appear on the "OnStart" Cutscene (not coming from a previous scene)

I have two players on my game. The Player Prefabs are correctly set in Settings and the Prefab is correctly set on the Order in Layer and Sorting order I want him to be.

IN THE EDITOR:

ON BUILD:

There´s also another Scene that somehow spawns both my players on the balcony (PlayerStart2D marker):

Using Unity v2020.3.2
Adventure Creator v1.75.4

Has anyone here had this problem before?

Thanks in advance!

Comments

  • edited August 2022

    What platform are you building to, and how are you determining that the player is shrunk? I don't see him in the second screenshot.

    Unless you're affecting it through animation, a character's scale should be set via the Sorting Map. Are they set to follow the scene's default?

    I will need steps to recreate the two issues - they're likely separate. Can you provide details on how to get them to occur? If it's too complex or unknown, you may PM me your project with instructions on how to see them for myself.

  • edited August 2022

    Hi Chris! If you look at the second screenshot, you will se that the player sprite it´s just a thin line (look closely)

    We use no Sorting Maps in this project because there´s no depth to the Scenes, it´s just right-left movement and the characters don´t move up and down (kinda platformer style)

    The weird thing is that in-editor this doesn´t happen.

    What details should I give you? Access to the project ? or maybe upload the OnStart actionList?

    We are building to Windows x86/x64

  • edited August 2022

    Screenshots of all related - the Player Inspector, OnStart cutscene, PlayerStart as it appears in the scene.

    It may be a rotation issue - is there any difference if you uncheck Turn root object in 3D? in the Player Inspector?

    What is your render pipeline, also?

    Also I used Player -> Switch to force him appear on the "OnStart" Cutscene (not coming from a previous scene)

    The Player: Switch Action should be avoided if you're already controlling the correct Player. You can teleport him with Object: Teleport - or is he not the active Player beforehand?

    There´s also another Scene that somehow spawns both my players on the balcony (PlayerStart2D marker):

    Where should both Players be at this time - in other scenes or PlayerStarts - and how are you moving them?

    When Player-switching is enabled, PlayerStart2D Inspectors can be configured to activate for specific Player characters - what are the values for the one on the balcony?

  • I believe I managed to fix it, you pointed me in the right direction, it was a combination of several stuff, I was coming from another Scene on the build and I didn´t set the PlayerStart properly.

    Thank you very much! :)

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.