Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Views

Discussion in 'Getting Started' started by hhatton80, Apr 7, 2021.

  1. hhatton80

    hhatton80

    Joined:
    Dec 15, 2020
    Posts:
    22
    In tutorial the instructor is able to see the G.O. move in both scene and game view tabs at the same time, but it only moves in game view for me. how to correct this?
     
  2. Schneider21

    Schneider21

    Joined:
    Feb 6, 2014
    Posts:
    3,512
    You're saying objects moving while your game is running don't actually move in the Scene view? I've never seen that before. Can you post a video of it happening?
     
    Joe-Censored likes this.
  3. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    11,847
    Are you sue you are looking at the correct gameobject in the scene view, and are viewing it from a distance where you would actually be able to notice it moving? If the scene view camera is extremely far away for example, you might not notice it moving.
     
  4. hhatton80

    hhatton80

    Joined:
    Dec 15, 2020
    Posts:
    22
    All I have is one box. When I press play, I'm not able to move the box IN SCENE VIEW with the a, d or arrow keys even though the code is correct. When I press the keys in game view, the box moves because when I return to the scene view after pressing them, it's moved. When I watched my instructor he had both tabs open and was able to see the box move in both tabs.
     
  5. Schneider21

    Schneider21

    Joined:
    Feb 6, 2014
    Posts:
    3,512
    Well for your input to be processed by the game while it's running, you have to have the Game view active. This doesn't mean you can't have the Scene view visible as well. Just pick a layout that has them side-by-side, or drag the Scene tab somewhere to undock it from the same space as your Game view and put it somewhere else.
     
    Joe-Censored likes this.
  6. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    11,847
    This ^^^ You've got to be have the Game view window focused. If you click on the Scene view, it isn't going to process your in game inputs until you click back over to the Game view.

    What I like to do is move the Game view over to the 2nd monitor when I need to play the game while watching the Scene view.
     
    Schneider21 likes this.
  7. hhatton80

    hhatton80

    Joined:
    Dec 15, 2020
    Posts:
    22
    sorry but I just don't understand...
     
  8. Schneider21

    Schneider21

    Joined:
    Feb 6, 2014
    Posts:
    3,512
    Can you just share a screenshot of your Unity Editor with us?
     
    Joe-Censored likes this.
  9. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    11,847
    When you hit Play, Unity automatically switches focus to a window called "Game". This might be on a tab, or in a separate window, depending on how your Editor layout. So long as you keep focus on this Game window, then your inputs are used to do stuff in the game as a player. You click on any other window, like clicking on Scene, the game window is no longer in focus, so your inputs aren't used to play the game. It is really that simple.

    So if you click on Scene, to view the Scene View, you have to click back on Game in order to move around in the game. If you have them as separate tabs on top of each other, you'll have to move your layout around so that you can have focus on the Game window while also able to see the Scene window. As I already mentioned, a 2nd monitor is pretty handy for that. But you can do it all in the same monitor.
     
    stain2319 likes this.
  10. stain2319

    stain2319

    Joined:
    Mar 2, 2020
    Posts:
    417
    In case it isn't clear, what it means is that by default, Game and Scene appear as tabs docked into a single Window. You can drag one of them away by holding down the mouse button over the name of the tab and move it around. You can dock the tab into a different window or make it a free floating window. Then you'll be able to still see them both when one or the other is selected.
     
    Joe-Censored likes this.
  11. hhatton80

    hhatton80

    Joined:
    Dec 15, 2020
    Posts:
    22
     

    Attached Files:

  12. Schneider21

    Schneider21

    Joined:
    Feb 6, 2014
    Posts:
    3,512
    Right, so it's what everyone's been saying. You have both panels docked into the same space. Grab the tab for either your Scene view or your Game view and pull it out so it's floating or docked in a different region of the Editor, and you'll be able to see both at the same time.

    If there's some sort of language barrier and you're still confused, check out the manual, which walks you through how to customize your Editor layout.
     
  13. hhatton80

    hhatton80

    Joined:
    Dec 15, 2020
    Posts:
    22
    OK.