- Home /
Changing a broken prefabs terrain material
I'm starting to try to use prefabs and I have a problem. My prefab has a terrain in it with a simple texture. I can't seem to get only one individual instance of the prefab to change its texture to something unique. I broke the prefab instance but the texture still applies to all instances. Any ideas what I'm doing wrong?
Answer by freerunningparkourtraceur · Apr 12, 2014 at 03:16 AM
If I understand correctly,
It may not be the prefab or texture, but the material your object is using.
If two objects share a material, when you change the texture on the first object, the second object's texture will change as well. You might just have to make separate materials for your separate objects. :)
I'm using the Terrain (Script) that seems be the default component for editing terrain. That looks like it directly accesses the textures. I'm not explicitly using any materials right now, do the components use them in the background?
Ins$$anonymous$$d of the Terrain(Script), look at the Terrain Collider // Terrain Data field. Do the terrains and behaviour you are desribing share the same value in the Terrain Data field
Ahhhh I haven't used a Terrain(Script) in a while. Sorry about my answer.
What exactly is your goal with Terrains?
Terrains are stored differently from other objects. Its instances can't be edited individually.
If you wanna have multiple terrains, you'll probably have to go create a whole new one from the GameObject menu.
Creating multiple terrains worked. I didn't think that far outside of the box :) Thanks for the help!
Your answer
![](https://koobas.hobune.stream/wayback/20220613142524im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Randomize texture within prefab 0 Answers
How to apply a texture to a prefab? 2 Answers
Suggestions for Prefabs which refer to other Prefabs 0 Answers
Premade Texture Use 1 Answer
Prefab Material 0 Answers