6
\$\begingroup\$

when I make any object I'm able to see that by other side in the game view. And this troubles me in adjusting the objects.

So can anyone help me to adjust the main camera in such a way that views of both game and scene look the same?

Thanks in advance.

\$\endgroup\$
2
  • 1
    \$\begingroup\$ If you don't want people to down vote you, you should try to show what you tried before to solve this problem. Nobody should post anything without trying on its own before ;) \$\endgroup\$
    – XandruCea
    Sep 4, 2015 at 6:24
  • \$\begingroup\$ Sorry for that. \$\endgroup\$ Jan 13, 2017 at 11:30

4 Answers 4

5
\$\begingroup\$

It simple, follow these steps

  • Select the main camera
  • Click on "GameObject" in the top panel
  • Click on "Align View to Selected"

It seems you are a fan of Clash of Clans ;)

\$\endgroup\$
0
0
\$\begingroup\$

It may becasue your main camera has some specific rotation. You can reset the main camera and then adjust your Canvas.

\$\endgroup\$
1
  • 1
    \$\begingroup\$ This answer would be more useful if it described how to reset the main camera and what kind of adjustment needs to be made to the Canvas. \$\endgroup\$
    – DMGregory
    Sep 3, 2019 at 3:35
0
\$\begingroup\$

Hot Keys:

  • Align with view: Ctrl+Shift+F
  • Move To view: Ctrl+Alt+F

With Unity UI:

  • Select the main camera
  • Click on "GameObject" in the top panel
  • Click on "Align with view" or "Move To view".
\$\endgroup\$
0
\$\begingroup\$

Here is a way to do it with a script

using UnityEngine;
using UnityEditor;

[ExecuteInEditMode]
public class AlignCam : MonoBehaviour
{
    public Camera gameCam;
    public bool updateView = false;
    private void LateUpdate()
    {
        if (updateView)
        {
            SceneView sceneCam = SceneView.lastActiveSceneView;
            gameCam.transform.position = sceneCam.camera.transform.position;
            gameCam.transform.rotation = sceneCam.camera.transform.rotation;
        }
    }
}
\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .