Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Question GameObjects appearing in Editor but not in Build (disappearing) Problem.

Discussion in 'Editor & General Support' started by rieusgames, Jul 6, 2023.

  1. rieusgames

    rieusgames

    Joined:
    Mar 29, 2022
    Posts:
    3
    Please take a lot at the pictures!

    As you can see in the editor, I can see and control the player character, but in the build I can only move the player character, but I can't see it, also some other GameObjects Materials disappeared!
    What could be causing this problem? And how to fix it? Thanks
     

    Attached Files:

  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    36,563
    Check the runtime logs. Google for where they are located on your machine.

    You'd be looking for things like exceptions or errors in the log.

    OR if this is just a UI Anchoring issue, here's some notes:

    Here are some notes on UI Anchoring, Scaling, CanvasScaler, etc:

    https://forum.unity.com/threads/inc...size-between-two-people.1130146/#post-7261747

    https://forum.unity.com/threads/game-ui-button-size-problem.1142650/#post-7337383

    Usually you need to choose a suitable ScaleMode and MatchMode in the Canvas Scaler and stick with it 100%. Generally if you change those settings you will often need to redo your UI entirely.

    I also use this
    CanvasScalerOrientationDriver
    utility to make sharing UI for Landscape / Portrait easier. Read what it does carefully.

    https://gist.github.com/kurtdekker/8802b1b6c708637398f8c9167641efd3
     
  3. rieusgames

    rieusgames

    Joined:
    Mar 29, 2022
    Posts:
    3
    Thank you for your suggestions, but If you take a look at the pictures, this is not an UI Issue, but some 3d objects and materials seems to disappear