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
4
votes
1 answer

Unity3D Programmatically Assign EventTrigger Handlers

In the new Unity3D UI (Unity > 4.6), I'm trying to create a simple script I can attach to a UI component (Image, Text, etc) that will allow me to wedge in a custom tooltip handler. So what I need is to capture a PointerEnter and PointerExit on my…
slumtrimpet
  • 3,159
  • 2
  • 31
  • 44
3
votes
1 answer

Unity3D how to get centered object of a ScrollView?

So I have this ScrollView set up using ScrollRect that has a Viewport child which has an Image and a Mask (pretty basic ScrollView setup). Inside the scroll view I have 15 buttons. I want to know what button is at the center of my ScrollView, so I…
sesmajster
  • 752
  • 7
  • 32
3
votes
2 answers

Custom window mimicking SceneView

I am building a custom window and I am trying to reuse Unity's Scene view to be able to draw directly from this specific window. I manage to reproduce the correct window by extend UnityEditor.SceneView and here's what I have: And here's the…
MadJlzz
  • 767
  • 2
  • 13
  • 35
3
votes
1 answer

Do we have to upload different resolutions icons in unity?

Android requires 5 different resolution of images and ios requires 3 different resolution of images during development. Does unity requires different resolutions of images while building for android or ios?
user8425575
  • 31
  • 1
  • 1
  • 3
3
votes
4 answers

How to Display WebcamTexture as Full Screen on Android Portrait Mode?

I am trying to display full screen Webcamtexture on android Portrait mode. but when i am building and testing it on my device its rotated and videoRotationAngle is 90 I am using RawImage as a texture. I have seen on some post that you have to rotate…
Faisal Khalid
  • 620
  • 10
  • 22
3
votes
3 answers

How to use UI.Text as a prefab in Unity?

I've tried using this Instantiate(entry, new Vector3(x, y, 0), Quaternion.identity); It successfully created objects, as seen in my hierarchy. But I cannot see the text on the screen, even though there is a text assigned to it. I can only see an…
jeanl
  • 379
  • 2
  • 7
  • 18
3
votes
0 answers

How to apply a postprocess effect to a UI element

I have a post-process effect that uses Unity's Graphics.Blit to pixelate or apply a crt-screen effect to a scene. There are some UI elements that display after the fact (basically making it not a true post process, but let's put that aside for a…
Aaron Hull
  • 422
  • 4
  • 16
3
votes
1 answer

Unity Canvas Buttons gets tiny when Build

I am working with Unity 5, and when I add Canvas Button the button get smaller this is how it looks like before build Before Build to an Apk and after build on my Lg g3:
UnityNewb
  • 361
  • 1
  • 5
  • 17
3
votes
3 answers

Unity 5 UI Mask issues Android

I am having issues with Unity 5 / Android and masking. In version 4.6 the mask works as expected. However, I can not get it to work at all in Unity 5. I have attached two images of what it should look like and what it does look like if anyone could…
user3318682
3
votes
1 answer

Unity 4.6 UGUI Mask in Worldspace Canvas

I am trying to create a UGUI Mask using a Canvas rendering in Worldspace. I am using Unity v4.6.1f1. Any world geometry in the scene masks the image even when the Canvas and all of its children are on the UI layer and the camera is rendering…
2
votes
1 answer

Why is adding texture to atlas not lowering memory consumption?

I have a NPOT sprite used in UI and Unity previews it like this: When I add a Packing Tag to it Unity displays this: Notice that Unity keeps saying it takes 8.2MB. I thought it would be lesser but when profiling my app I saw it does take 8MB. The…
Roberto
  • 11,557
  • 16
  • 54
  • 68
2
votes
2 answers

Unity3D - Move UI object to center of screen while maintaining its parenting

I have an UI image that is parented to a RectTransform container, which is parented to a UI panel, which is parented to a Canvas. I want to be able to move this UI image to the center of the screen (ie. canvas) while leaving the parenting hierarchy.…
IHateATMFees
  • 346
  • 3
  • 11
2
votes
1 answer

Adding button with Text dynamically to UI at runtime in Unity

I am working with C# an Unity 5.6.1f1, I done a mechanism that on UI button click should add an additional button with text to Panel that is already on UI, and it does work... since I am able to see Object appear there public void…
Matas Vaitkevicius
  • 58,075
  • 31
  • 238
  • 265
2
votes
1 answer

Extending UnityEngine.UI.Image and add extra field available in Inspector

I am trying to extend UnityEngine.UI.Image like that public class MyImage : Image { public string Comment; } But I do not see extra text field Comment in inspector. Is it possible to add extra field that would be available in inspector? PS It…
Tema
  • 1,338
  • 13
  • 27
2
votes
2 answers

Unity3D: void OnEnable() is called Unpredictably in Editor Mode

I implemented OnEnable() and it is always called in Play mode as expected. But in Editor Mode some components call OnEnable() and other don't I need OnEnable() or other method to be called in Editor Mode to setup component to be able to prototype…
Tema
  • 1,338
  • 13
  • 27
1
2
3
8 9