camera moving in scene but not game unity code example

Example 1: why raycast is not hitting a 2d object unity

//Have to use 2D version in 2D scenes.
 //Object must have a collider.
 RaycastHit2D hit = Physics2D.Raycast(transform.position, Vector2.down);
         if ((hit.collider != null) && (Input.GetMouseButtonDown (0))) 
         {
             print ("This hit at " + hit.collider.name);
         }

Example 2: godot after changing scene button not working

It sounds like you might not be unpausing the game when you leave the pause menu that way?