SFA-CS / PredatorPreyProject

1 stars 1 forks source link

Game crashes when new sprites are used #8

Closed Boezienko closed 4 months ago

Boezienko commented 4 months ago

If at least one child game object in the parent Prey object doesn't have a triangle as it's sprite, the game cannot find the parent Prey object and all of it's children. The same goes for the predators.

Boezienko commented 4 months ago

when all of the original triangles are deleted, the game cannot find the predators and prey, even if new ones are added with a triangle sprite. Maybe we can't use prefabs

Boezienko commented 4 months ago

Didn't actually fix the issue, but stopped using prefabs and it works.

Boezienko commented 4 months ago

I found the true solution. In the game object, GameManager, that is where it keeps track of each of the predator/prey Avatars.