The Godot Q&A is currently undergoing maintenance!

Your ability to ask and answer questions is temporarily disabled. You can browse existing threads in read-only mode.

We are working on bringing this community platform back to its full functionality, stay tuned for updates. | Twitter

+1 vote

When you duplicate a MeshInstance, the Material and Mesh will refer to the same ones from the original MeshInstance.
I know that if I want to play with the Material separately, I can make it unique.
But, you can make them unique, but it's hard to make dozens of objects unique one by one.

Is there any way to make them unique at the same time as duplicating them?
Or, is there a way to make all objects unique at once?

Godot version 3.4
in Engine by (25 points)

You duplicate in editor (like ctrl+D) or in code ?

Have you tried overriding the material on the mesh? There's a way to do it, but the method currently escapes me.

In editor. ctrl+D.

I also tried Material override. The result was the same.

2 Answers

+1 vote

You can go to Resource property of original mesh and material and set localtothe_scene as true. But if I recall correctly, there is a problem with duplicate itself, and it might still not work.

by (8,188 points)

Still the result is the same, I don't even know what the Local to scene property is for.

It works if scene is instanced from code, it makes every new instance automatically to "makeunique". As I suspected, this does not work with duplicating, both in code and in editor. I am afraid You have to duplicate naked mesh scene without material and set it after. Or You can create a scene from meshinstance with material and make "newinherited_scene" from it. It should work better than duplicate.

Excuse me, but what does it mean to create a scene from meshInstance? What does "newinherited_scene" mean?
I'm not very good at English, so I don't know what you're talking about...

0 votes


Another thing you can try is instantiating the mesh and material in code to make it unique rather than reply on reusing nodes.

Something like this:

by (14 points)

I am struggling with how to make it duplicate on the editor instead of during the game run. It is not possible to duplicate in code.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.