Problem when nesting collections

I seem to be having a problem when putting a collection in a collection


The image above is from the collection within the other collection. Notice how the game object ‘terrain’ has a sprite in it

This image shows the collection that contains the other collection. Notice how the game object no longer has the terrain sprite within it.

When I run the game this sprite does not appear. Does anyone have any idea why this is and how to fix it?

Have you saved the collection after adding the sprite?

yep, doesn’t seem to be something to do with saving issues

Just tried removing the collection then re-adding it and it made no difference

I now can no longer compile my project and get this error: Errors occurred during the build. Errors running builder 'Content Builder' on project 'Convoy'. Build failed: null com.dynamo.bob.CompileExceptionError Build failed: null com.dynamo.bob.CompileExceptionError Not sure if my client is now broken
UPDATE: Forget the ‘my client may be broken’. I can now no longer open any editor files and when I do I get this error: org.eclipse.ui.PartInitException: at com.dynamo.cr.sceneed.ui.SceneEditor.init(SceneEditor.java:232) at org.eclipse.ui.internal.EditorManager.createSite(EditorManager.java:828) at org.eclipse.ui.internal.EditorReference.createPartHelper(EditorReference.java:647) at org.eclipse.ui.internal.EditorReference.createPart(EditorReference.java:465) at org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:595) at org.eclipse.ui.internal.PartPane.setVisible(PartPane.java:315) at org.eclipse.ui.internal.presentations.PresentablePart.setVisible(PresentablePart.java:180) at org.eclipse.ui.internal.presentations.util.PresentablePartFolder.select(PresentablePartFolder.java:270) at org.eclipse.ui.internal.presentations.util.LeftToRightTabOrder.select(LeftToRightTabOrder.java:65) at org.eclipse.ui.internal.presentations.util.TabbedStackPresentation.selectPart(TabbedStackPresentation.java:473) at org.eclipse.ui.internal.PartStack.refreshPresentationSelection(PartStack.java:1245) at org.eclipse.ui.internal.PartStack.setSelection(PartStack.java:1198) at org.eclipse.ui.internal.PartStack.showPart(PartStack.java:1597) at org.eclipse.ui.internal.PartStack.add(PartStack.java:493) at org.eclipse.ui.internal.EditorStack.add(EditorStack.java:103) at org.eclipse.ui.internal.PartStack.add(PartStack.java:479) at org.eclipse.ui.internal.EditorStack.add(EditorStack.java:112) at org.eclipse.ui.internal.EditorSashContainer.addEditor(EditorSashContainer.java:63) at org.eclipse.ui.internal.EditorAreaHelper.addToLayout(EditorAreaHelper.java:225) at org.eclipse.ui.internal.EditorAreaHelper.addEditor(EditorAreaHelper.java:213) at org.eclipse.ui.internal.EditorManager.createEditorTab(EditorManager.java:808)

A collection within another collection will not display any other components than scripts - but they are there all the same. The reason for the sprite not to appear could be related to z-position. Make sure the total z-position (sprite+go of the sprite+collection) is not above or below the viewport limits (1 and -1 in the default render script if I remember correctly)

2 Likes

Ah, now I feel stupid. Johan is of course correct. Thanks for pointing this out!

1 Like

It turned out the problem was also that the ‘main.collection’ file had corrupted and was no longer openable. I thought it was a problem with defold so I ended up deleting defold (except the branch files) then reinstalling only to find that I still couldn’t open main.collection. I ended up just deleting the file and recreating it and it worked fine

1 Like