# Access existing child in collection from editor script

**URL:** <https://forum.defold.com/t/access-existing-child-in-collection-from-editor-script/83361>\
**Category:** Questions\
**Created:** [October 18, 2026, 10:40pm UTC](https://forum.defold.com/t/access-existing-child-in-collection-from-editor-script/83361 "2026-10-18T22:40:59Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mrpenguin](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/mrpenguin/32/41383_2.png) [@mrpenguin](https://forum.defold.com/u/mrpenguin)\
**Post date:** [October 18, 2026, 10:40pm UTC](https://forum.defold.com/t/access-existing-child-in-collection-from-editor-script/83361/1 "2026-10-18T22:40:59Z")

</div>

I’m having trouble doing something that I thought would be pretty straightforward. I’m creating a point and click type game where there are a number of rooms, each is a collection with an atlas. There will ultimately be a lot of these and I am trying to streamline adding and editing these rooms. Creating the collection and the atlas and setting up the collection with all the base objects in it was relatively simple. The last thing I’m trying to do is add the new collection to the collection proxy in the main game collection. I can “get” the collection and I can see its children but I can’t seem to edit them in any way.

```lua
local gameCollection = editor.get("/main/game/game.collection", "children")
pprint(gameCollection)
for i = 1, #gameCollection do
    print(editor.get(gameCollection[i], "path"))
end

```

When I run that code, the results are:

```lua
{ --[[0x58b3d80b]]
  1517,
  1519
}
nil
nil

```

I have looked through the forums, Discord and documentation but none of the examples show getting a collection and then editing something that already exists within it. The fairly advanced editor scripts from pawell and jerakins seem to be reading and writing the files directly, not using the fairly new “get” and transactions. I have tried a fair number of things at this point and seem unable to crack this nut. Is there no way to do this or is my syntax off?
