How to avoid cyclical scene loading

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Johnnyfantastic6

I have a creature that lays eggs, and the eggs hatch into more monsters.
However, the egg has to preload the creature it creates and the same for the monster with the egg and then the preloaded egg loads the animal again. bingo bongo infinite preloading and it gives an error. How can I avoid this?

:bust_in_silhouette: Reply From: klaas

You can either

  • use load instead of preload
  • build a container around Monster and egg which preloads both
  • combine both in a single scene/object/script

this are the first 3 ideas that came to my mind … there are dozents of other ways to deal with this

Did not know you could just load the monster. It works great now!

Johnnyfantastic6 | 2020-07-23 19:35