one prefab but different textures per scene

Hi

I basically have made a prefab which has a texture applied to it, but i want to use the same prefab in another scene but with a different texture. But want it not to update the original prefab as im not loading the prefabs at runtime, as i need to build the level by the eye as its too complex.

But that aside, I guess maybe the only option is to use some kind of nested prefab? I’ve read that Unity doesnt support it yet?

I’m just not sure if i have any other options?

Nick

Prefabs can have overrides, just change the value and not press Apply. It will show as bold in the inspector.

ok thanks, but as Im still developing I could end up needing to press the apply button again :(. Good for after this though.

Do you think its possible to make an EditorScript which can detect which scene is open and automatically change this when im moving between scenes? e.g. if Scene name is ‘X’ then apply ‘Y’ texture etc…

Nick

Yes that is possible.

You could only change the prefab by just selecting it in the project view.

ok well I have just tried doing this manually in the Editor and it applies it to every instance of the prefab without updating (clicking apply). So unless im approaching this wrong I cant do it :frowning:

Update: I have tried this is a new scene and I can replace the texture but I think I have found an additional issue, I am using a model imported from Blender, which i have assigned multiple textures too, so if i update the texture I’m actually updating the model rather than the prefab. I’m going to have to rethink this :frowning: