Search Unity

Question missing objects after build

Discussion in 'Editor & General Support' started by Toast_123, Jul 17, 2021.

  1. Toast_123

    Toast_123

    Joined:
    Jun 26, 2021
    Posts:
    2
    Hi, so im new to unity so wanted to try something new so i made a copy of flappy bird. when i export it for testing it out the pipes were missing
    before and after https://imgur.com/a/9Vmxsrl
    can someone tell me what i did wrong.
     
  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,752
    Start here:

    https://docs.unity3d.com/Manual/LogFiles.html

    See if you can get any intel from the program about things going wrong.

    If not, then add your own logging, step by step proving that stuff works.

    I recommend liberally sprinkling Debug.Log() statements through your code to display information in realtime.

    Doing this should help you answer these types of questions:

    - is this code even running? which parts are running? how often does it run? what order does it run in?
    - what are the values of the variables involved? Are they initialized? Are the values reasonable?
    - are you meeting ALL the requirements to receive callbacks such as triggers / colliders (review the documentation)

    Knowing this information will help you reason about the behavior you are seeing.

    You can also put in Debug.Break() to pause the Editor when certain interesting pieces of code run, and then study the scene

    You could also just display various important quantities in UI Text elements to watch them change as you play the game.

    If you are running a mobile device you can also view the console output. Google for how on your particular mobile target.

    Here's an example of putting in a laser-focused Debug.Log() and how that can save you a TON of time wallowing around speculating what might be going wrong:

    https://forum.unity.com/threads/coroutine-missing-hint-and-error.1103197/#post-7100494
     
    Toast_123 likes this.