Quantcast
Channel: UGUI & TextMesh Pro
Viewing all 23263 articles
Browse latest View live

[5.2.1] Images with source image set to NONE reneder with random texture

$
0
0
Hello,

I updated to Unity 5.2.1 today and all my UI Images that I used with NONE in the source image render with a random texture from our project when I play the scene (is the same texture every time). In the image component though the source image is still none.
The work around for now is to use the default background which is a 9patch and on fullscreen panels have a transparent margin all around.

Anyone encountered this issue?

UI.Dropdown broken on iOS? (Unity 5.5)

$
0
0
I've been trying porting our project from PC to iOS, and I'm seeing a problem with the Dropdown UI component. When tapping on the dropdown, I get this error in Xcode, and the component fails to lay out its items:

ExecutionEngineException: Attempting to JIT compile method 'System.Collections.Generic.GenericEqualityComparer`1:.ctor ()' while running with --aot-only.

at System.Reflection.MonoCMethod.Invoke (System.Object obj,
BindingFlags invokeAttr,...


UI.Dropdown broken on iOS? (Unity 5.5)

[BUG] Font style SC

$
0
0
Hello.
I'm posting this here, because I can't get access to TMP's forum.
If this is relevant and wasn't posted before, please repost to their forum.

The bug:
Rich text with "SC" font style enabled is always breaking last indent (last line separation). (screenshot 1)
Quick solution to this is to add another empty line to text at the end. (screenshot 2)

My Unity is 2017.1.0f3, TMP is 1.0.55 Beta 12.

http://imgur.com/a/nUmjc

...

[BUG] Font style SC

A ScrollView and GamePad issue

$
0
0
Hello.

Here is a brief view of my UI panel. It is a horizontal scroll-view that has some content (UI Buttons) in it.
The problem is, If you use a gamepad and use it to choose one of the buttons, it doesn't automatically scroll left or right, Although you may select the button you wanted to. Therefore you can't see what button you are selecting.

Although I search the Net for this, I couldn't find a solution for this. It seems it should be an easy fix but I have no idea what is the solution....

A ScrollView and GamePad issue

Is there a grid layout plugin to replace the default GridLayoutGroup?

$
0
0
Hello
I find that the behaviour of GridLayoutGroup looks like flow layout in other GUI framework(e.g. Qt).
Generally grid layout should have fixed row and column count. And I find the LayoutElement component does not work with GridLayoutGroup. I guess GridLayoutGroup looks like a flow layout, so there is no flexible width or height concept in flow layout.

Enabling / disabling large Canvas e.g. MainMenu

$
0
0
To hide / show the Main Menu in our game I use CanvasGroup and set its alpha to 0.0 / 1.0 respectively. During development of the Menu I believed it was the best solution (I made several experiments and monitored profiler to find the best one). However today I discovered that we have unpleasant 3-5 ms of PostLateUpdate.PlayerUpdateCanvases which are caused by the Menu when it's hidden: if I deactivate the whole gameobject (in a purpose of testing) they are all gone.
But for sure...

Enabling / disabling large Canvas e.g. MainMenu

MeshEffects setvertex does not work with other text effects

$
0
0
Hi everyone!

Unity 5.6.2

Why Outline and Shadow effects broke other MeshEffects?

in this line while setting vertex?
helper.SetUIVertex(v, i);


ArgumentOutOfRangeException: Argument is out of range.
Parameter name: index
System.Collections.Generic.List`1[UnityEngine.Vector2].get_Item (Int32 index) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Collections.Generic/List.cs:633)
UnityEngine.UI.VertexHelper.PopulateUIVertex (UnityEngine.UIVertex& vertex, Int32 i) (at...

MeshEffects setvertex does not work with other text effects

InputField - caret active on Start

$
0
0
Hi, I have InputField where player enter his name. When he restart game I want InputField'll display last entered name, as here
[​IMG]


In script I set InputField.text from Player.Prefs. but I still want to see blinking caret when player run the game:
[​IMG]

I tried set InputField as a 'First Selected' in 'System Even' but i have this ;/:...

InputField - caret active on Start

Snappy UI movement?

$
0
0
I'm working on a simple window system and I tried making a the window movable like this:

Code (CSharp):
  1. public class FileBrowserTitleBar : MonoBehaviour, IBeginDragHandler, IDragHandler
  2.     {
  3.         private Vector3 previousMousePosition;
  4.         private RectTransform window;
  5.  
  6.         private void Start ()
  7.         {
  8.             window = GetComponentInParent<FileBrowser> ().GetComponent<RectTransform> ();
  9.         }
  10.  
  11.         public void OnBeginDrag (PointerEventData eventData)
  12.         {...
Snappy UI movement?

TMPro not finding Sprite Assets in 2017.1

$
0
0
Hello =) I posted this in answers.unity3d.com (http://answers.unity3d.com/questions/1400056/textmeshpro-not-finding-sprite-assets-in-20171.html) but that doesn't appear to be the best place for it so I'm posting here too. Hopefully that is ok!

Hi,

I've upgraded to 2017.1 and TextMeshPro Release 1.0.55.2017.1.0b10 (which was required to get it working).

Everything is working except that TMP doesnt seem to find Sprite Assets placed the in the folder referenced in the TMP...

TMPro not finding Sprite Assets in 2017.1

InputField in IOS question

$
0
0
When i type text into my InputField on an iPhone device, in test, the actual typing is done in another input field that comes up over the iPhone keyboard. Why is that and is it possible to fix?

Changing textbox height dynamically.

$
0
0
What up.

I'm instantiating a textbox gameobject.
Then filling it up with text.

Any way to make the textbox height dynamically change?

GameObject reply1 = Instantiate(replyText, transform.position, transform.rotation);
reply1.transform.SetParent(textArea.transform, false);
Text reply1text = reply1.GetComponent<Text>();
reply1text.text = gameRounds[roundCount].reply[0];

The width is fine, don't need to change it.

Canvas isn't scaled properly on mobile

$
0
0
Hey guys, I'm developing a mobile game and I have an issue with the Canvas scaling not appropriately..
When using it with GUI's that aren't levels, like main menu, settings etc. I use Render Mode: Screen Space - Camera. And UI Scale Mode: Scale with Screen Size. Which works brilliant.

The problem is when I enter the game itself, when I created a canvas and used Render Mode: World Space.

But now when I'm using Canvas for buttons, panels, etc.. resizing the Canvas to fit the Camera, it won't...

Canvas isn't scaled properly on mobile

How to assign OnClick for UI Button generated in runtime?

$
0
0
Hi,

So, I'm generating a Button in runtime.

Code (CSharp):
  1. var myButton = (GameObject)Instantiate(button_prefab, Vector3.zero, Quaternion.identity);
How can I assign the OnClick event in runtime?
or how can I listen to button OnClick event anyhow ?

also. within that OnClick event - How can I define from which object if was called. In case the event function could be called from different buttons.

OnBecameVisible does not fire for CanvasRenderers

$
0
0
Not sure if this is a bug or by design, but I noticed that the OnBecameVisible event does not fire for UI widgets (CanvasRenderers). As soon as I add a MeshRenderer to my object, the event fires.

Should this be firing? If not, is there an appropriate way to determine when a UI widget comes on screen? My use case is a long scrolling list of widgets that I only want to initialize once they are visible.

I know I could just do some kind of RectTransform calculations in Update, but I was hoping...

OnBecameVisible does not fire for CanvasRenderers

OnPointerDown/OnPointerUp working but OnBeginDrag/OnEndDrag not working

$
0
0
Hello,
I have a class with all four of these. One minute they were working all day, the next minute, after I merged with another branch, the drag handlers stopped working. I tried to go back to an earlier commit and they aren't working there anymore either. Has any body run into this issue before? Even now the pointer up and pointer down handlers work but the drag handlers don't

Here's a test I made:

Code (CSharp):
  1. using UnityEngine;
  2. using UnityEngine.EventSystems;
  3. using UnityEngine.UI;...
OnPointerDown/OnPointerUp working but OnBeginDrag/OnEndDrag not working

UI Source code on BitBucket for 2017?

$
0
0
There's still no branch for any of the Unity 2017 releases at https://bitbucket.org/Unity-Technologies/ui/branches/. Is the UI source code still going to be made public?

We have some performance tweaks that we've needed to make to past versions that we would want to look at again when we update to 2017.

Thanks!

Came across a small bug/issue.

$
0
0
I came across a small issue while I was working on a slider for moving/selling/buying (in stacks, for items).

I have 3 different methods, depending on the action, that supply some parameters for my slider's UI panel (also includes text, and an input field and a couple of buttons.. don't think that's relevant).

My slider would work correctly on first try, for all 3 methods. It would work every single time for 1 method.
The other 2 methods, however, would set the slider's values all...

Came across a small bug/issue.

New Sprite Atlas + UI?

$
0
0
So in 2017.1 a new feature was released by Unity, the Sprite Atlas:
https://docs.unity3d.com/Manual/SpriteAtlas.html

In addition, the Sprite Packer is now marked as "Legacy" in the project settings --> editor settings.

In NGUI, you could also create atlases. Then, you would create a UISprite component and directly reference an image inside the atlas. There does not seem to be any component like this in Unity UI!

It seems like a core feature that the atlas needs, ESPECIALLY...

New Sprite Atlas + UI?

Input problem when keyboard is opened on Android

$
0
0
Hi, when the keyboard is opened on Android Unity can not detect any touch or button press on the device except on the keyboard. So the keyboard works fine but the part where the the keyboard is not covering the screen there isn't any touch detection.
It's like there would be an invisible cover or something on the part of the screen where the keyboard is not covering the unity app.

So the user have to touch the screen twice in order to push a button when the keyboard is opened.

Example:
1....

Input problem when keyboard is opened on Android
Viewing all 23263 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>