Unity2Dで衝突判定のあとに物体を停止させたいのでTime.timeScale = 0.0f;を使って全体を停止させてしまおうと考えて下記のようにコードを書いたんですが止まりません。
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class PlayerBehaviour : MonoBehaviour {
void OnCollisionEnter2D(Collision other) { Time.timeScale = 0.0f; } // Use this for initialization void Start () { } // Update is called once per frame void Update () { }
}
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。