"Cycle detected on node..." But this is what I want (SOLVED)

So I have a Menu collection that loads the game collection using a proxy, and then after the game ends I want to load back into the Menu collection using a proxy again.

But setting a proxy that goes from menu to game and from game to menu counts as a cycle that generates an error.

Any workarounds?

You most likely want your collection proxies to be in your main bootstrap collection that is never unloaded instead of within each individual collection being loaded.

I unload my main collection though. Should I not do that?

The pattern I follow in my project is to have a main bootstrap collection that is relatively minimal and has setup stuff / proxies which then loads the initial screen collections and switches between them as needed.

2 Likes

Thanks!

I did what you said but now I’m getting

The collection /main/ChallengeMap.collectionc could not be loaded since it was already.

Fixed this by unloading all the collections after I was done using them

1 Like

You cannot unload the bootstrap collection as far as I know.

I think this is great advice and definitely according to best practice! This use of a main/controller/loader collection can be seen in this example:

2 Likes

Can confirm. I wasted a lot of time trying to do so at one point =P

3 Likes