私は自分のゲームに簡単な一時停止メニューを作ろうとしている初心者プログラマーです。ただし、このエラーが発生し続けます:
エラー 3 代入、呼び出し、インクリメント、デクリメント、待機、および新しいオブジェクト式のみをステートメントとして使用できます
これが私のコードです:
using UnityEngine;
using System.Collections;
public class pause : MonoBehaviour
{
// Use this for initialization
void Start()
{
}
// Update is called once per frame
void Update()
{
if (Input.GetKey("escape") && Time.timeScale == 1)
{
Time.timeScale == 0;
}
}
}