In Defold 2, copy doesn't work right

I’m following the “Getting Started” tutorial and at Step 6, in the second sub-step, step #13 it asks:

Copy “platform.go” to a new file (right-click the file in the Project Explorer and select Copy, then right-click again and select Paste) and call the new file “platform_long.go”.

This creates a new “platform_copy.go” but it is empty.

I will say I eventually got it to work, but I’m not sure what changed.

Hmm, do we have any known issues with copying of game objects @Erik_Angelin?

Could you please report this issue in github for easier tracking? You can also use Help > Report Issue from inside the editor.

Done In Defold 2, copy doesn’t work right · Issue #640 · defold/editor2-issues · GitHub

3 Likes

I think it has something to do with the save state of the project. I think copy only works right after savings (ctrl-s.)

1 Like

That’s exactly right. It’s an operation on the file system, which is only updated after saving. I understand this is confusing and needs to be made more clear anyway.

3 Likes

Ah, I see. Okay, maybe a simple pop-up if you copy a dirty object asking if you want to save first?

1 Like