The collection /main/LevelComplete.collectionc could not be initialized since it has not been loaded (SOLVED)

#1
ERROR:GAMESYS: The collection /main/LevelComplete.collectionc could not be disabled since it is not enabled. Message 'disable' sent from simGame:/go#Gamesim to simGame:/go#

ERROR:GAMESYS: The collection /main/LevelComplete.collectionc could not be initialized since it has not been loaded. Message 'init' sent from simGame:/go#Gamesim to simGame:/go#collectionproxy2

ERROR:GAMESYS: The collection /main/LevelComplete.collectionc could not be initialized since it has not been loaded. Message 'enable' sent from simGame:/go#Gamesim to simGame:/go#collectionproxy2.

I am trying to load into a new collection but its giving me these errors when I DID load the proxy, with these lines:

	if message_id == hash("proxy_loaded") then
	msg.post(".", "disable")
	msg.post(".", "unload")
	-- New world is loaded. Init and enable it.
	msg.post(sender, "acquire_input_focus")
	msg.post(sender, "init")
	msg.post(sender, "enable")
end

and

	if action_id == hash("touch") and action.pressed then
	msg.post("/go#collectionproxy2", "load")
end
0 Likes

#2

These messages should be sent specifically to the proxy component you wish to disable. With the “.” notation you send the message to all components on the current game object.

The sender is the collection proxy component. Is that really the game object you wish to acquire input for?


A much more common approach to loading and unloading collections using a proxy is through a central loader/controller, like in this example:

2 Likes

#3

This helped! Thanks!

0 Likes