I make a game about a ball that falls from a height and goes through some obstacles … I wanted at the beginning of the level the game is paused and the camera is Moving only and then (after a period of moving the camera) the game starts to move,I make a game about a ball that falls from a height and goes through some obstacles … I wanted at the beginning of the stage to move the camera only and then (after a period of moving the camera) the game starts to move
You could write a scene-level controller script of sorts that has references to every object currently present. Use this scene controller to enable/disable components on objects that you want to move. It all boils down to how you have set up your project’s architecture in terms of handling scene events.
public class SceneController : MonoBehaviour
{
public float BallMoveStartTime = 10.0f;
public GameObject Ball;
public GameObject Camera;
private float _timer = 0;
private bool _ballMoveStarted = false;
private void Update()
{
if (_ballMoveStarted) return;
_timer += Time.deltaTime;
if (_timer < BallMoveStartTime) MoveCamera();
else
{
_ballMoveStarted = true;
StartMovingBall();
}
}
private void MoveCamera()
{
// your camera movement logic here
}
private void StartMovingBall()
{
// your logic for starting the ball to move here
}
}