Answer the question
In order to leave comments, you need to log in
Where is the array being lost?
Here I fill an array and fill it with prefabs
public Achievement[] ArrayAchievements;
private void Start(){
Achievement[] ArrayAchievements = new Achievement[10];
for(int i = 0; i < ArrayAchievements.Length; ++i){
ArrayAchievements[i] = Instantiate(achievement) as Achievement;
}
Debug.Log(ArrayAchievements.Length);
}
public void PressButtonTest(int c){
Debug.Log(ArrayAchievements.Length);
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question