Скрипт на scroll background, при запуске игры, еще не успеваю нажать на старт а экран уже бежит, как сделать так, чтобы он запускался только при нажатии кнопки start?
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class scroll : MonoBehaviour {
public float speed = 0.5f;
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
Vector2 offset = new Vector2 (Time.time * speed, 0);
GetComponent <Renderer> ().material.mainTextureOffset = offset;
}
}