After saving the pre-stored r and specific values of the Sentence array in the Input_data array,
change the scene to Equip3D, and then use the values stored in Input_data to create a gameobject cube(Input_data array is used for position and size)
At this time, the scene is switched, but objects are not created after that.
Even if I take a log, it runs without any error
Can I know how to fix it?
(I Dont want to use DontDestroyOnLoad, Because the cube must exist only at changed scene)
Here are source code:
public void Find_Out(){
for (int j=0; j<r; j++){
for (int k=0; k<7; k++){
Input_data [j,k]=Sentence[(int)Input_i[j],k+4];
Debug.Log("j= " + j +" k= " + k + " Item= " + Input_data[j,k]);
}
}
SceneManager.LoadSceneAsync("Equip3D");
for (int i=0; i<r; i++){
GameObject equipment = GameObject.CreatePrimitive(PrimitiveType.Cube);
equipment.name=Input_data[i,0]; //장비 이름
equipment.transform.position = new Vector3(float.Parse(Input_data[i,1]), float.Parse(Input_data[i,3]), float.Parse(Input_data[i,2])); //y 대칭
equipment.transform.localScale = new Vector3(float.Parse(Input_data[i,4]), float.Parse(Input_data[i,6]), float.Parse(Input_data[i,5])); //z 대칭
Debug.Log("Scene Change!!!");
}
}