hi guys. when i press “play” button, my unity wait for 1 minute. increases the ram from %60 to %95 and then it is crashing. can anyone tell me why . it is happend 4 times only today. and i updated the unity yesterday. (btw my ram is 8gb)
edit: i increased my virtual ram. still crashing
edit2: when i press play button size of unity in ram is increasing from 500mb to 6 gb - lol -
edit3: when i undo changes in my project thanks to collab, it is fixed. idk i only added some box colliders to some prefabs.
edit4:
i can’t do changes that i want. i just added box colliders to my prefabs (prefabs are roads in my game). according to collider’s size, the prefabs will be added end to end. so i will obtained an endless map.
when i changed the script file (road maker) it is not crashing. when i added the colliders and pressed play button the game is crashing as i said above (look at the edit3).
the first script file: http://txt.do/1pkb2
the second (last) script file: http://txt.do/1pkbv
i just changed these parts:
transform.GetChild(0).transform.localScale.z
to
GetComponent().bounds.size.z
pls help me guys.
edit: i fixed it. i was should use GetComponent().size.z