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. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice
  4. Dismiss Notice

I bastardized some of this tutorial, but it's not working the way it should.

Discussion in 'Getting Started' started by Paradoxbuilder, Dec 11, 2022.

  1. Paradoxbuilder

    Paradoxbuilder

    Joined:
    Jan 3, 2021
    Posts:
    6
    Full disclosure, I did not follow it all. I ignored the parts that I felt I didn't need, I just wanted to use it as a coding exercise.

    http://gamecodeschool.com/unity/unity-2d-shooter/

    I skipped the stuff about lighting and materials, for the most part.

    However, when I try to run it, this is my screen.

    The UI is obviously not showing up properly, and neither is the background. Once, the player did move and I got audio and could fire lasers, but then after that, it stopped working entirely.

    I am not a complete newbie and I would say that I understand the tutorial completely (if not I would have followed it to the letter) but I'm in the dark as to why it doesn't run. It doesn't seem to be a problem with the code.

    I tried Googling answers to the specific issues, but I fell down a rabbit hole of unrelated information and it's been confusing. I thought I would ask here.

    Also full disclosure, this is a difficult time in my life and I'm not thinking completely straight. I'm doing these projects as a way to move forwards in a painful time.

    upload_2022-12-10_17-44-36.png
     
  2. AngryProgrammer

    AngryProgrammer

    Joined:
    Jun 4, 2019
    Posts:
    435
    Good to see you on the forum.

    At first glance, it looks like you are adjusting UI elements to Scene View not to Game View.

    In the upper right corner of the Unity editor window you have Layout, click and select 2 by 3 from the list. Now as you move the UI elements in Scene View you will immediately see how it looks in Game View.

    Reference points for UI elements work differently than game objects. See they even have other components i.e. UI has Rect Transform (like editing in a Word document) and game objects just have Transform (like on math axes).
     
  3. RichAllen2023

    RichAllen2023

    Joined:
    Jul 19, 2016
    Posts:
    1,026
    You = Fail.

    OK I know most of the official tutorials on here are out of date and don't work but you should still follow them to the letter.
     
  4. Paradoxbuilder

    Paradoxbuilder

    Joined:
    Jan 3, 2021
    Posts:
    6
    In the upper right corner of the Unity editor window you have Layout, click and select 2 by 3 from the list. Now as you move the UI elements in Scene View you will immediately see how it looks in Game View.

    >I tried doing that but I didn't see much difference?

    Reference points for UI elements work differently than game objects. See they even have other components i.e. UI has Rect Transform (like editing in a Word document) and game objects just have Transform (like on math axes)

    >This was good to know thanks

    How do I actually get the game to run?
     
  5. RichAllen2023

    RichAllen2023

    Joined:
    Jul 19, 2016
    Posts:
    1,026
    Press PLAY in the top middle of the screen?