Quantcast
Channel: Questions in topic: "gui.drawtexture"
Browsing all 91 articles
Browse latest View live

gui.drawtexture not showing up

So I am trying to draw texture over my entire screen using gui draw texture. Here is script : GUI.DrawTexture(new Rect(0, 0, Screen.width, Screen.height), myvariable texture); I have also tried many...

View Article



Load a sprite as a texture from.

This works public Texture testTexture; void OnGUI() { GUI.DrawTexture(new Rect(0, 0, Screen.width, Screen.height), testTexture); } I can drag and drop a texture, that works fine. However I am trying to...

View Article

Best way to handle clicking on a GUI.DrawTexture?

As simple as the title says - I'm trying to make a clickable button with `GUI.DrawTexture`, and it works perfectly fine. But OnGUI is called at least twice, so when I try the following: void OnGUI() {...

View Article

Mouse Over on a GuiDrawTexture

Hi guys! I want to make appear a Label with specs when the mouse over this gui.drawtexture. My problem is when I create the texture by script how I do a onmouseover to her? Thanks to all. > if(show...

View Article

GUI.DrawTexture and GUILayout.Label stop working after Build & Run

Hello everyone, I am working on a scrolling text program using snippets provided by user Broxxar, and it was working splendidly in the Unity game window until I used "Build & Run", now it won't...

View Article


GUI.DrawTexture Error: BCE0023

Please Help Script: public var MouseTexture = Texture2D; public var MousePosition = new Rect (Event.current.mousePosition.x/2, Event.current.mousePosition.y/2, 64, 64); function Start () {...

View Article

Button when clicked doesn't draw texture

GUI.skin = storageSkin; GUI.DrawTexture (new Rect (xTestStart, yTestStart, xTestFinish, yTestFinish), background, ScaleMode.StretchToFill, true, 0); if (GUI.Button (new Rect (1125, 25, 40, 40), "")) {...

View Article

Gradually changing the color of Texture which is drawn using GUI.DrawTexture...

In my game, I have a coin meter in which the level of the meter is shown using GUI.DrawTexture command. Here is the code of that: GUI.DrawTexture(x,y,width, -current_value * (height / max_value),...

View Article


Alternatives to using GUI.DrawTexture

I have a clock on screen that's based on a timer. The clock image will change depending on how much time has passed and will loop through an array holding all the textures (15 total). GUI.DrawTexture...

View Article


Drawing a rectangle on gameObject's position

I have to use the "GUI.DrawTexture(new Rect..." function to draw a rectangle on my screen(actually, it's a gradient GUI bar i got from https://www.assetstore.unity3d.com/en/#!/content/19972, but deep...

View Article

GUI.DrawTexture is not getting called when i press button

hii guys, i,m trying to call gui.DrawTexture function like this: void OnGUI() { if (GUI.Button (new Rect (130, 450, 100, 50), "Grass Texture")) { GUI.DrawTexture(new...

View Article

What are the differences between GUI.Label(Used to draw a texture) and...

1. Are there any differences between GUI.DrawTexture and GUI.Label, when used to draw a texture, other than the former offering more specialized options for drawing textures and the latter being...

View Article

GUI.DrawTexture disappering after a new one is made.

Hi, i have a problem with GUI.DrawTexture that i need some help with. I want to draw a GUI Texture when my player enters one trigger, and make an other GUI Texture 50 pixels lower when it enters an...

View Article


GUI.DrawTexture() into a Layer?

Hey All, I need to draw a GUITexture into a certain layer with a rotation. I've seen I can create a new GUITexture object by GameObject->Create Other->GUITexture. This allows me to put the...

View Article

GUI.DrawTexture not showing correctly.

CODE void OnGUI() { GUI.DrawTexture(new Rect(Screen.width * 0.05f,Screen.height * 0.975f, 800,15), empty); GUI.DrawTexture(new Rect(Screen.width * 0.05f,Screen.height * 0.975f, 800 *...

View Article


Event Handler for GUI.DrawTexture()

Is there some way to create mouse or touchscreen response for GUI.DrawTexture()? OnMouseDown() and Touch wont work appropriately unless I line them under the GUI call perfectly. Is there something I...

View Article

GUI.DrawTexture Rendering Issues

Hi, I'm trying to position a texture whenever there is a touch / mouse move, and updates the texture relative to the touch / mouse coordinates. Using the TUIO protocol, I'm receiving touch event and...

View Article


Moving texture flicker with GUI.DrawTexture

Hi, I'm having a flickering problem when moving a texture in OnGUI function. The flickering looks like double buffering is not used (no smooth redraw). The texture I have is 512x512 with an alpha...

View Article

GUI texture outside of OnGUI

Is it possible to show a "textured" button outside of onGUI without using GUI.Drawtexture in a function?

View Article

change button texture from different button press

What I want to do is have a set of buttons that determine what textures could be used, when a user presses this button it will trigger which texture will be used. Then the user can press a different...

View Article
Browsing all 91 articles
Browse latest View live




Latest Images