Question by
ionmorei65 · Oct 10, 2017 at 12:27 PM ·
texturetexture2dnot working
Texure2D is not changing
I'm trying to change my texture in code, but it don't works. Why ?
https://i.imgur.com/5HWqoDi.png https://i.imgur.com/TGZkl2q.png
Comment
Answer by FortisVenaliter · Oct 10, 2017 at 06:53 PM
Because when you use the "material" property, it makes a copy of the material for that object, so the prefab material would never be changed.
Instead, you want the "sharedMaterial" property.
Your answer
![](https://koobas.hobune.stream/wayback/20220612140703im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
How to load a folder of textures automatically to an array of Raw Images? 2 Answers
1024x1024 Texture2D Takes up over 8MB of memory 0 Answers
Convert Texture to Texture2d takes a lot of time in android device. 0 Answers
How do I use a sliced 2D sprite as the repeating texture on a 3D object? 0 Answers
shader graph messes up the texture (2D) 0 Answers