- Home /
Read only texture
Hello,
I am trying to make a pocket tanks like game where the environment is a texture and pixels are changed to transparent and the collider is updated to destroy something. However i have run into a problem. Running the script tells me i need to make the texture readable in the import settings. I do. But then when changes are made to the texture they dont go away even after i stop and start the game again... the very asset image file is changed. How would i make a copy of the original image that i can destroy?
Thanks!
Answer by Eric5h5 · Apr 15, 2014 at 03:17 AM
You should instantiate the texture and modify that, rather than the actual texture asset.
Same way as anything else, using the Instantiate function.
Could you show me the syntax for that I get an error when I try
Your answer
![](https://koobas.hobune.stream/wayback/20220613142734im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Creating 2d shapes with code and filling them 1 Answer
2D Terrain 1 Answer
Texture flickering (sniper scope reticle) 0 Answers
Distribute terrain in zones 3 Answers