1
\$\begingroup\$

I have a Asset which is a collectable object [Pickup] and I currently have eight in my scene, I'd like to duplicate this asset and use it to harm the player [Bad Pickup].

I decided to duplicate the asset because I wanted both assets to have the same components (Animation script, rigid body, mesh colider, etc...). However, when I edit the texture of my new asset [Bad Pickup], it changes the texture used for the original asset [Pickup] as well.

I've tried GameObject -> Break Prefab Instance on the object with the new asset but it doesn't appear to make a difference.

Is there a way to break this instance so that I don't have to make a completely new GameObject and add the same components manually?

\$\endgroup\$
0

1 Answer 1

2
\$\begingroup\$

This is because you're editing a material. Prefabs simply reference materials, they don't contain them. That material is used for both prefabs. You can duplicate the prefabs, but make sure you create a new material for any prefabs you want to have a different material.

\$\endgroup\$
5
  • \$\begingroup\$ I have two materials, I'm editing the material referenced by the Game Object. \$\endgroup\$
    – Ambo100
    Commented Nov 16, 2015 at 19:00
  • \$\begingroup\$ And two textures? \$\endgroup\$
    – House
    Commented Nov 16, 2015 at 19:01
  • \$\begingroup\$ Yes, two materials, referencing two separate textures \$\endgroup\$
    – Ambo100
    Commented Nov 16, 2015 at 19:02
  • \$\begingroup\$ Then editing one wouldn't affect the other. It's likely you have misreferenced something somewhere. \$\endgroup\$
    – House
    Commented Nov 16, 2015 at 19:03
  • \$\begingroup\$ I see now, I was editing the reference to a texture, not a material. It's working fine now. Also I agree, this looks like a duplicate of the question linked above, Thanks! \$\endgroup\$
    – Ambo100
    Commented Nov 16, 2015 at 19:06

Not the answer you're looking for? Browse other questions tagged .