Copy paste from scene to scene?

I would love a way to copy and paste entities from one scene to another, and also a way to “duplicate” a scene. Edit: Oh, there is one already, it’s under the little triangle square drop down I had missed the first time looking at it. The object duplicating issues still stand, and the copy and paste between editor instances. I’ve removed the scene copying from the post since it already exists as “duplicate scene”.

I noticed the editor will let you select multiple scene objects in the hierarchy, but will not let you copy them. Having multiple editors open also does not allow copy and paste between editor instances, so I can’t even copy them one object at a time.

I propose a “import object from project scene” option under the “make new object” menu, and if possible, allowing copy and paste between scene editor windows on the same machine.

Example of use:

  1. Say I have a complex player/camera setup, or a complicated enemy entity with many particle effects and editor made settings that need to be “the same”. If I had the “import object from scene” option, I could make the enemy in Scene 1, and then when making another scene, just import the first enemy object to make sure all the settings are the same.

  2. Let’s say I have two scenes, one with a test of a new moving platform in it but with some old object setup elsewhere in it, and a second scene with many new elements that have been tweaked. I want to start a new scene, and combine the “good parts” of both the previous scenes. If I could “import object from scene”, I could simply create a new template scene, import the platform from one old scene, and the other “good parts” of the second scene.

This feature would be very useful if it could be done at runtime as well. For example: A single “enemy” unit setup in a scene being used as a container, and the actual levels all have emptys with a “spawn enemy” script that duplicates the entity from the “container” scene. Then if there are any major changes needed to be done to the enemy, like changing the speed value of an editor enabled field, changing the enemy in the “container” scene would update all of the rest, since they are duplicated out during the level code. This would allow a way to do something like what Unity has with it’s prefab and spawning prefabs during runtime setup. It would also make it easy to “spawn” enemies, or other objects, during runtime without needing to hide/destroy clone-able objects in the level somewhere.

In summary, a way to duplicate entities between scenes in editor would be very time saving for level prototyping. And if that duplication were also open to access during runtime, we could have “prefabs” from Unity, and be able to quickly setup editor adjustable things like particle effects on elements in all our levels at once, without needing to manually copy settings for each one.

What’s really frustrating with that last one is that we already have that kind of control with scripts and textures/materials, or even models. Editing or updating the source for all those automatically updates them over the whole project. But anything made with the editor panels needs to be done over and over per editor object. The editor interface is great but constantly making sure every enemy/player/ect object has the same editable properties when we need to change or tweak say, the physics settings of their rigid bodies, is a nightmare in the current setup. It’s way too easy to miss one or type the wrong numbers, and depending on what is being changed, testing to check may take hours or even days of our time.

1 Like

Just wanted to mention that you can currently copy Entities from one Scene to another as long as those Scenes belong to the same Project. Select the Entity in Scene A, Ctrl + C, go to Scene B, select a parent Entity, Ctrl + V to paste.

1 Like

Yeah copying between projects would be great. I have an object hierarchy with a particle system I want to copy - going to have to resort to typing for now!

I agree it would be very useful, however there are various cases where it’s not clear what we should do. For example if the copied Entity references any assets, these do not exist in the target project and if they do they have different id’s. So we could leave the asset references empty when you copy and just let you assign them back yourself or we’d have to copy assets to the other project too which is more complicated.

But it’s something we can review I think.

Thanks :slight_smile: I think just exporting an Entity graph and packing it with it’s assets would be very useful - though I guess there would need to be a way to identify these using a GUID that was persistent. That way you could import such a pack - would also be useful to be able to stream such things at runtime - though I’m guessing that is “hard” with code - it would be good for the rest of it to be loadable that way

There are several challenges, for example what if you paste twice, how do you detect that asset already exists and needs to reuse assets id, instead of importing new one.
Other problem is how to detect partial existence of assets already there. For example if assets related to hierarchy is foldered, when pasting will lead to some clashes, and resolving that - is very tricky, and does not feels like there is any “proper” solution for this without introducing some opinions.

For moving things between, people tend to use slightly different approach from copy/paste, but using boundles/prefabs, which can be moved around as a single thing.
We had ideas of assets within user scope, and ability to clone stuff around from project to user scope and back. That would allow to move assets around, but hierarchy is totally different piece of information. And possibly prefabs would be a way here.

It is very tricky logically to find intuitive and non-opinionated solution to this task, so that users will be able to use with minimum number of clicks and get desired results without need to learn some special rules and cases around that feature.

Yeah agreed on the complexity front. My thought would be to use a shasum of the asset as a unique ID. Then you can detect if the same asset already exists in the new scene perhaps?

We use this technique on our custom CMS to ensure that people can’t upload the exact image or movie multiple times.

1 Like

So…nothing new under the sun with this topic, right?
Almost any 3D soft has something similar to this feature…very unpleasant to repeat shading and re asigning UVmaps, textures atc to an already worked and finished FBX just because drag n drop with assets do not work…

1 Like

It should be done if the assets would be put in a global user directory and can be used in different projects by fishing from the global directory. I think that tecnically is doable but could be complex since dependencies from assets (model/materials/textures) should be inside single projects. Basically an hell of work :slight_smile: not impossible but i guess the crew staff has lots of things to work on before they can spare time on that. Isn’t @max? :wink:

May be that is the reason I don’t see a playcanvas asset market place…
I think making this easier would pump up Pcanvas community. I will do some experiments .

…experiments failed…I have to rebuild and make up from zero an FBX …buffffffff

You can copy paste entities between different scenes and different projects. As long as your assets have the same names and are in the same folders in both projects it should work by mapping each asset by name.

Hem there is a assets place…a little small though, from editor by clicking on library tab over the assets open this page

yes, but only useful for tutorials and some practise.
About copy/paste entities between different projects, I tried but I did not succeed. May be my project is a little bit complicated now and something is missing somewhere…I will try to in my next project when I start from zero.

Yes i’m sure if we could have a larger store would benefit the developers, though i think the most interesting thing would be a way to adapt animations to models. Actually you can import a model with animation and you have the 2 separate files, but if you have something that make every animation fit to different models would be great (i know that it’s not easy coz of nodes and bones numbers) but since bvhacker allow to cut bones in bvh files maybe that’s possible too.