Questions tagged [unity3d-gui]

Questions related to the new UI system in Unity 4.6 and newer or the old GUI class.

Useful links:

134 questions
0
votes
2 answers

change text based on button-click

I am using Unity3d I've tried to track where the problem comes from and had no success. The text update in "Guess" occurs properly when done by key press, but no by clicking the button (both log in an exception). The code: using UnityEngine; using…
Giovanni Di Toro
  • 797
  • 1
  • 14
  • 34
0
votes
2 answers

how to create dynamic UI that adjust itself to current screen dimensions after loading?

I have created a level editor using new UI system in Unity3D. Using Level Editor: I can drag the ui elements, I am able to save them in scriptable objects But how could i save and load them at runtime? I mean, if i create a level with some…
chetan rane
  • 533
  • 2
  • 10
  • 25
0
votes
1 answer

GUI Canvas scaling problems using localPosition

So I'm following a tutorial online and am 99.9% sure I have not made an error and it is perhaps something to do with my trying to implement his ideas in to an already established project with (perhaps) different concerning factors. The general idea…
MattGarnett
  • 545
  • 3
  • 20
0
votes
1 answer

Masking in World Space canvas - Gameobject renderers act as mask too

My goal was to create a Scroll Rect on a worldspace canvas but whenever I would mask out the content everything vanished. I tested on an overlay canvas to see if I was setting it up correctly and I was. What I learned was that non-UI gameobject…
0
votes
1 answer

GUI.Label doesn't work in for loop

i have a problem with printing GUI elements in for loop pf OnGUI() method. In code listed below i create GUI.Label of user clicked on GUI.Box: public List messages = new List(); int dialogueMsg = 0; void OnGUI() { …
Supo
  • 1,135
  • 3
  • 8
  • 10
0
votes
1 answer

How to block game input from ui interaction?

I'm using Unity UI introduced in 4.6, and the button works fine. However, I have the game underneath controlled by touch. If the user touches the left of the screen, hero turns left, if the right side, it turns right. But if the user touches a…
csomakk
  • 5,369
  • 1
  • 29
  • 34
0
votes
3 answers

How do you get the image component of a nested game object in a UI prefab?

I am trying to alter the sprite of a nested image object within a dialog UI (Unity 4.6's UI) that I have saved as a prefab. I am able to load the prefab, but when I try to do: Image[] imageComponents =…
Yecats
  • 1,715
  • 5
  • 26
  • 40
0
votes
1 answer

how to create a rect under new ui canvas?

I wanna ask how to create a rect and put it under the canvas of unity new ui? So this is what i made. you can see my game controller. i put that controller on a canvas. When my "Character" goes to NPC, and going to have a dialogue, i made a…
0
votes
2 answers

Unity 4.6 UI image blur

Is there a way to set blur on the image in new UI on Unity 4.6? I need normal image to become blurred or pixelized on button click. I did try to use some free shader from asset store but it doesn't work on android phones.
filipst
  • 1,547
  • 1
  • 30
  • 55
0
votes
1 answer

Unity3d with vuforia showing 2d image when targed is detected

I have a question about the way how to show simple 2d image on top of detected marker. I have followed some tutorial to show 3d model and it works fine. there is no problem with 3d. The problem starts when I want to add normal 2d object->sprite .…
Jan
  • 29
  • 1
  • 4
  • 9
0
votes
1 answer

Unable to use Unity UI elements on my android

I just created a very simple 3D game, and I used Unity UI for the first time. Inside the game editor I can click the buttons and move the sliders. I build the game for my android,and I can see all UI elements on my device but however, for some…
Smart Pants
  • 147
  • 2
  • 8
0
votes
0 answers

Bug in Unity 4.6 concerning canvases? (iPhone 5/iPhone 5s)

Stackoverflowish question: Is my issue here a bug, or can this be fixed somehow? Bear with me now but I'm gonna post a couple of screenshots that will show how I think there's a weird bug that only (?) affects iPhone 5 and iPhone 5s. Confirmed…
Jonny
  • 15,955
  • 18
  • 111
  • 232
-1
votes
1 answer

Unity UI screen size issue

I'm quite new to Unity, so I'm sorry if this is a basic question. I've been trying to set up the UI for a mobile game, but I'm not quite sure how to make the UI lock it's position, no matter the screen size. I've tried using anchors (though I don't…
C Yo
  • 1
  • 1
-1
votes
1 answer

Button no longer working in game window, but works fine in .exe build

So last night my game was working just fine. I log on today and I change an (unrelated) sprite and now for some reason the button won't be clicked in the game window during play mode. It does however work perfectly on an .exe build. It's just the…
1 2 3
8
9