- Home /
GUITexutre pixelinset doens't work on android
Hi, I have a guitexture which I want to set its pixelinset with c# code. I tried it with JS and it worked perfectly without any problems on Unity play mode and also on Android. When I tried the same thing with c# , it also works perfectly well in Unity play mode but the code doesn't seem to have any effect on my GUITexture when I try it on Android. here's my code :
public GUITexture background;
void Start () {
background.guiTexture.pixelInset = new Rect(0.0f,0.0f,100.0f,100.0f);
}
I'll appreciate if you can help me with this.
Thanks very much
@pako I have pretty much commented out everything else in my code and I still don't get why it works on play mode and it doesn't work on my android phone.
I just edited the code in the question, I added the first line
It works if I attach the script to the GUITexture itself and call it like guiTexture.pixelInset = .... but it doesn't work with the script in the question attached to the camera
Your answer
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
Distribute terrain in zones 3 Answers
Make an object move when clicking a GUI button? 1 Answer
Using scripts coded in C# on android projects 1 Answer
C++ windows DLL and Android? 1 Answer