に異なるクラスの静的変数を使用して I次のコードを持って public class Score : MonoBehaviour {
private static int score;
public int sc;
void OnTriggerEnter2D(Collider2D col) {
if (col.tag == "Ball") {
では動作しません、私は次のスクリプト public class SpeedUp : MonoBehaviour {
public Rigidbody2D ball;
void OnTriggerEnter2D(Collider2D col)
{
if (col.tag == "Ball") {
ball.AddForce(Vector2.