Hi guys, I’m having a problem with the Graphics.DrawTexture function.
I neee to use this one instead of GUI.DrawTexture, because I want to update the alpha of the texture each frame. This is not possible with GUI.DrawTexture, AFAIK, because it interprets the alpha of the texture as a cut-out operation.
Well, so far so good, until I build the project (Windows x86/x64) and the textures disappear, or they are not painted at all. I built the executeable with script debugging and all parameters are correct.
This function seems to work only if called from OnGUI callback. Form other function such as OnPost/PreRender() (with the script attached to the camera) it doesn’t.
Yes, you are right, I can use the alpha in the texture, whatever is its value, but I can’t change it at runtime.
Anyway, the problem here is that Graphics.DrawTexture doesn’t draw anything on the screen but you are running from the editor.
Is this a bug? Could any developer repro this and let us know please?
I have reproduced the error. I ran unity with both videocards and the texture and screen location are valid. The GUI.DrawTexture() function does not seem to draw the HUD I am instructing it to, even though I have multiple other textures on the near plane of the frustum.