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

Boss in the wrong room after build

Discussion in 'Getting Started' started by Dacotahslim, Dec 14, 2020.

  1. Dacotahslim

    Dacotahslim

    Joined:
    Nov 27, 2020
    Posts:
    24
    I was testing for bad bot behavior in my FPS minigame so I built the game for windows to see if the wrong behavior was present in the build and my Boss is not in the room I placed him in. He is in the starting room. It is the customizable boss in the tutorial. Unity is so buggy I'm about to throw in the towel.
     
  2. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    9,842
    What you describe would not be caused by any Unity bug. It's a bug in your code somewhere.
     
    Joe-Censored likes this.
  3. Dacotahslim

    Dacotahslim

    Joined:
    Nov 27, 2020
    Posts:
    24
    If I moved the boss just a little bit, he ended up somewhere else but not where I put him. When I played the game, it would wander about through walls and such erratically. I had the boss on a Probuild platform. When I placed floor under it, it stayed put and behaved normally.
     
  4. Dacotahslim

    Dacotahslim

    Joined:
    Nov 27, 2020
    Posts:
    24
    I haven't written any code, just used the settings as indicated by the tutorials. That is what is so frustrating.
     
  5. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    9,842
    Maybe you haven't written any code, but the tutorials certainly have, or there wouldn't be a game. You said the boss wanders; that's not something that can happen without code. Also, objects can't appear anywhere other than where they were placed in the scene without code.

    So, somewhere there is code that is moving that boss. You can either debug it, or give on this tutorial and try another one, or give up on development in general. Bugs happen, and tracking them down is how most programmers spend most of their time. Game development is just a particularly difficult (though fun) type of programming.

    I would say that if you have no idea where the code is that's placing or moving the boss, then the tutorial has not done you any good and you may as well try something else. On the other hand, if you think back and say "oh — that's where we attached this script that spawns the boss" or similar, then you can go study that script and see if you can understand it. Add Debug.Log statements to check your assumptions. When you find the assumption that you (or the tutorial writer) are making that is not true, then you'll probably know why the boss isn't behaving as you think it should.
     
    Joe-Censored and JeffDUnity3D like this.
  6. Dacotahslim

    Dacotahslim

    Joined:
    Nov 27, 2020
    Posts:
    24
    As a beginner, I find suddenly having to go through code a bit much to ask. However, I did figure out that the boss was over a Probuild surface and when I placed floor under it, it stopped behaving oddly. Odd thing is all the other bots are performing normally over the probuild structure so I don't understand why that would make a difference. I'm too stubborn to just quit, but I'm really frustrated that I have to leap to a higher level of debugging so soon in all this.
     
  7. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    9,842
    I think you've chosen an unfortunate tutorial, then. Game development is coding; going through code — or better yet, actually writing code (with help, of course) — should be like task #1. I mean sure, you have to know how basic usage of the Unity editor, but as soon as you can throw a game object into the scene and press Play, you should start writing scripts to make it do things.

    I think some tutorials try to hide this truth from you, and give you big piles of code you're supposed to just drop in and use without understanding. That does you a disservice. You're not learning game development that way.

    I applaud your stubbornness — that's a very valuable trait as a developer! But you might be well served to find a better tutorial, something that focuses squarely on learning to code right away.