//first script
using UnityEngine;
using System.Collections;
public class First : MonoBehaviour {
public int test=false;
}
//second script
using UnityEngine;
using System.Collections;
public class second : MonoBehaviour {
void Update () {
if(Input.GetKey(KeyCode.A))
{
First.test=true;
//if you press a it change the variable from the //skript"first"
}
}
}
↧