What does "make local" do?

Godot Version

4.2.2

Question

I’m talking about this option when you right-click a node in the scene tree: Imgur: The magic of the Internet

I was trying to implement a simple flash whenever an enemy gets hit, but found that when there are multiple of the same enemy in one level they’ll all flash when one is hit. After doing some googling someone suggested making the shader for each enemy unique, which works, but it’s a bit inconvenient to have to set each enemy to have editable children before being able to set their shader as unique. The “make local” option also seems to work for this purpose, and it can be done with one click, but I want to make sure I know exactly what it’s doing before using it willy-nilly throughout my entire game.

make local will give every (in your case) enemy have their own resource, which isnt bad. Resources are usually not local, to save on memory. When several instances are made, they all use the same resource in memory and when one instaces alters the resource, it will be alterd for all instances. Making them local will force every instance to have their own resource in memory → its more expensive on memory but that shouldnt be a problem

3 Likes

@herrspaten has make local spot on

Make unique probably isn’t what you want. If your hitflash is saved to a file, “make unique” will un-link it from that file or scene to a built-in resource. This will make it harder to edit every hitflash at the same time, say you want to change it to a orange or yellow; make unique would have to change each one where local to scene you can still edit every shader at once but get unique instances in-game.

So make unique is for editing unique assets that may have been accidentally copied, or were copied as a good starting point, but need to diverge.

2 Likes