Script:1
public class Test : MonoBehaviour
{
public List list;
public void value()
{
list[0].Test2.number+=100;
}
}
Script:2
public class Test2: MonoBehaviour
{
public static int number;
void Update()
{
if(number > 0)
{
Debug.Log(number);
}
}
}
I created a list, I want to access the zeroth element, I cannot access it. How do I access it with code.