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

#1

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?

0 Likes

#2

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.

0 Likes

#3

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

0 Likes

#4

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

#5

Thanks!

0 Likes

#6

I did what you said but now I’m getting

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

#7

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

1 Like

#8

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

#9

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

3 Likes