game-developmentgame-enginegodot

Duplicating a node is causing the resources to be linked with each other


Shifted to Godot from Unity and while I'm enjoying everything this one thing is bugging me a lot. I have read that duplicating a node in Godot does not make it's resources unique so when you change one, it'll change the other as well. Problem is, my node are not un-linking despite making the resource unique.

Here's what's happening:

  1. Made a 3D node
  2. Attached a MeshRenderer3D with it (cube)
  3. Duplicated it
  4. Attached a Material with one node - it got attached with other already (I wanted to change color of one)
  5. Found out I have to click on arrow besides material and select "Make Unique"
  6. Made it unique - still changing color would change the color of other node as well
  7. Removed the materail from both. Made the resource unique. Added material back - again connected.

Can someone guide a beginner please? My use case is I have to make a lot of cuboids with different colors so not being able to use CMD + D to duplicated without making them unique is quite frustrating (heck I can't even unlike them manually anyway).


Solution

  • Just create a node type "MeshInstance3D" and do this in property addresses that I mention them:

    1. From "Inspector>Mesh" drop down set it to "New BoxMesh".
    2. From "Inspector>GeometeryInstance3D>Material Override" set it to "NewStandardMaterial3D" and click on it and set its "Albedo>Color" to your desired color.
    3. Make that material to unique as you know.
    4. see the sample image I attached! Two cubes with unique albedo color