Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

How to play a self-made game in maximised game view?

AdityaAditya Member
edited May 19 in Programming

I am a beginner in game making and I am using 2019.3 Unity Version. I am following Brackeys playlist named "How to make a Video Game". I have seen 6 videos till now and I am facing one problem. I am able control my Cube (Player) in minimised game view. But when I maximise the game view, I am not able to control my Cube. It just goes straight and collides with one of the obstacles before stopping. Is there a problem with my coding, or is there a problem with my laptop? BTW, I am using Toshiba Satellite L755. I have attached the image of my codes. Please help...

I have also attached the link of the gameplay videos.

Comments

  • babissofbabissof Member
    edited May 20

    This is a glitch that unity is facing. When you're on maximized game mode and it shows you are playing you should click once inside the window at the beginning. It's like having two programs open in the screen and you click to select which one is the active one in order to scroll etc. This is a weird glitch and I hope it's patched in the future. Glad I could help :)

  • WarpWarp Member

    @babissof It is not a bug, its a result of how Windows handles window focus, and Unity full screening it.

    Regardless, @babissof is right, clicking on the window will solve the problem. If you want to test it without this problem go to:

    File -> Build and run -> choose a folder

    Build the game, and run the executable. That will allow you to play it without this issue, like a player would.

  • AdityaAditya Member

    Thanks @babissof. But it's not working. @Warp , I will give your suggestion a try.

    Thanks for answering!

  • AdityaAditya Member

    Thanks, but neither of the suggestions worked... After clicking Build and Run, nothing happened on my laptop.

  • Look at the console, maybe in the console is some errors that not allows you to build a game.

  • WarpWarp Member
    edited May 21

    @Aditya Google "Build game in unity". It shouldnt "do nothing".

    Also, if that isnt the problem, can you post a screenshot of your console when you try and use the keys?

    It literally just sounds like the new window is out of focus. Click on the window's viewport after starting, and use your movement keys after that.

    Post a video if you can.

  • AdityaAditya Member
    edited May 21

    I have built the game following Brackeys' "How to make a Video Game in Unity". The problem is I can't play the game in full-screen. When I maximise the game view, I am not able to control my Player.

    Okay @Warp, I can send the video. I had attached the link earlier, but I think it got deleted.

    I will send it tomorrow (According to Indian Time).

  • WarpWarp Member
    edited May 21

    @Aditya Building a game does not mean coding/making the game.

    Building a game refers to the process of packaging/exporting the game into a file that you can play, like an executable. When you maximize the window, it goes out of focus because Unity opens a new window.

    If you built the game, and then run the executable, it will run on its own, and be focused automatically.

    Brackeys has a tutorial for it, make sure to check this out.

  • AdityaAditya Member

    Thanks @Warp I wil check it out. But I have got one more problem. My laptop is facing some hardware issues. It will take 3-4 days to get repaired. So, I will try this out after that.

    Thanks for helping!

  • Hey @Aditya, its just a normal problem as if you are playing a YouTube video but not able to pause it because you have specifically not selected that browser video. In your case, once you maximize the view and hit the play button just click on the cube or near it and then control it with arrow keys. Hope it works!!

  • edited May 23

    Use "Maximize on Play" Button in the Game View at the top right.

  • WarpWarp Member

    @Aditya Sorry to hear your computer is not working.

    I hope the video helps. If not, @Jatinstic_Gaming has a suggestion that I second aswell. Let us know if that solves it.

  • AdityaAditya Member
    edited May 24

    I applied @Jatinstic_Gaming 's suggestion, and it worked!!

    Thanks @Warp , your video helped me to test and export my game.

    Thanks a ton!!

  • edited May 24

    @Aditya, No Problem.

Sign In or Register to comment.