Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - vexe

Pages: [1] 2 3 ... 11
1
NGUI 3 Support / Elements are not pivoting correctly?
« on: July 06, 2017, 01:51:50 PM »
Greetings,

I'm not sure when or how this happened, but for some reason our Labels and Sprites no longer have the right position when setting their pivot point.

See this picture, that's supposed to be Right-Center aligned, except it looks like it's Right-Bottom aligned.



Any idea what could be causing that?

Thanks

2
Fixed it. We had some large textures in our Atlas, removed those took the size of it down and it's fine now. Seem if atlas exceeds a certain size things get screwed.

3
Resolutions:
- Ones that were bad:
--Samsung Galaxy S7 Edge: 2560x1440
--Samsung Galaxy View 18.4": 1920x1080

- Ones that were good:
--Samsung Galaxy Note 4: 2560 x1440
--Samsung Galaxy S5: 1920x1080

Atlas settings, set to True Color there shouldn't be any compression:


- Those labels/sprites are not anchored themselves. The only thing we anchor is positions. So we have a Top-Left, Top-Right, Center etc anchors that we position things to. Nothing should be stretched by those anchors as far as I know. Because pretty much all other screens/subscreens in the game are messed up, even ones that have no anchors (at least font wise)

4
Greetings,

we're getting weird/bad looking font and clipped sprites on some of our devices but not all.

Details:
- We're using bitmap fonts, Arial_12, Arial_14 (Don't want to use Dynamic fonts)
- All our UI is in one atlas, including the font
- UIRoot has "Constrained on mobile" with 480x270 (both with 'Fit' checked)
- Devices it looks bad on: Samsung Galaxy S7 Edge 1080p, and Samsung Galaxy View 18.4" 1080p
- Devices it looks good on: Samsung Galaxy Note 4, Samsung Galaxy S5
- UI Atlas texture filtering is set to Point, Wrap Mode is Clamp, Alpha Is Transparency is checked
- Using Unity 5.4.1f1

Comparison:
GOOD:




BAD:




What I've tried but didn't do anything:
- Disabling 'Fit' in the UIRoot
- Enabling/Disabling Anti-aliasing in the quality settings
- Changing filter mode in atlas texture

Really appreciate any tips/pointers as to what's going on here.

Thanks.

5
NGUI 3 Support / Drag drop from world to UI?
« on: August 31, 2016, 09:26:13 AM »
Greetings,

We have a horizontal scrollview/inventory at the bottom of the screen where you can drag objects/train cars into the scene to build your train (2d game). Works fine. I want to go the other way around now. I want to click on a train car in the scene and be able to drag/drop it back to the UI.

One approach I could try is manually picking it up and handle moving it with the mouse and detect if it's released over the UI to add it back to the grid/inventory. Problem with that is depth. It will always appear behind the UI because of depth/sorting issues cause the UI renders on top.

The other approach which I'm trying now is to 'simulate' a UI drag. So when I click on a car in the scene, I 'instantly' add it to the grid, and then send an NGUI 'drag' event of some sort which will snap it to the mouse position and perform its drag.

But I'm not sure how to exactly achieve the latter. I tried calling 'StartDragging' from UIDragDropItem but it didn't do anything. Digging more into the code (UICamera) it seems I have to create a touch or mouse event? I'm not sure.

Maybe there is a better way of doing this?

Any ideas or pointers are appreciated?
Thanks.

6
Thanks for the reply.

Are there any other cases than large textures that could cause this? It happened on two games, in one game we set the max texture size to 2k and it worked, in the other it didn't. And, this only happens when we're building from Unity 5.3.4 and beyond, anything below that everything works fine, even if the max atlas texture size was 4k! Any idea what's going on there?

7
Hi,

On Android, we're having a weird issue where if we build our game with any version of Unity above 5.3.4 we get visual bugs where UI sprites are all black and no fonts render on the screen. We use the latest NGUI. Weird thing if you run the game once it works fine, but if you force-close and reopen the glitches appear, if you restart they disappear, if you restart again they reappear, etc.



Unity forums thread crosslink for adb logs and more details: http://forum.unity3d.com/threads/black-sprites-and-invisible-fonts-after-5-3-4-using-ngui.417661/

Any ideas what's wrong?

[EDIT]: Seems like setting the max atlas texture size to 2kx2k fixed it for one of our games. But we have another game that we tried building (same NGUI, same Unity, same texture settings etc) that still shows black textures.

8
@wallabie: I couldn't wait actually - so I made mine - have a look https://www.youtube.com/watch?v=Z3CNrgU8xnY&feature=youtu.be - I'll be releasing it soon - just working around some quirks :)

9
NGUI 3 Support / Re: Can you add editor classes support to EventDelegates?
« on: February 27, 2014, 05:57:02 PM »
yeah well I tried doing what I was doing, it seems that this is not the only place one has to make changes to, to be able to notify editors. since I'm interested in notifying my editor (which is a non-MB) - the "Target" of the delegate will be null, since you're only targeting MBs. I've also had issues with the delegate not serializing, probably related to the fact that the target is null or something, haven't looked into it in depth, but yea... more stuff needs to be editor in order to fully support that. I would love to see it happen though :)

10
NGUI 3 Support / Re: Can you add editor classes support to EventDelegates?
« on: February 27, 2014, 04:14:14 AM »
As I mentioned before, there's a certain method in my editor that I want to execute when there's a rename on a certain GameObject (which has RenameNotifier attached to it - if there's a rename, it executes onRename which is a List<eventdelegate>)

11
i.e. support handlers of type "void handler(T arg)" and not just "void handler(void)" - (By handler I mean the target method to be called in the MB to be notified)

Thanks!

12
NGUI 3 Support / Can you add editor classes support to EventDelegates?
« on: February 26, 2014, 11:39:20 AM »
I have a RenameNotifer MonoBehaviour attached to some of my gameObjects, whenever there's a change in their name, it notifies a method in their editors. However, I had to make a slight adjustment for the delegate to be executed:

  1.                         if (Application.isPlaying) {
  2.                                 call();
  3.                         }
  4.                         else if (call.Target != null) {
  5.                                 System.Type type = call.Target.GetType();
  6.                                 object[] objs = type.GetCustomAttributes(typeof(ExecuteInEditMode), true);
  7.                                 if (objs != null && objs.Length > 0
  8.                                         || type.IsSubclassOf(typeof(UnityEditor.Editor)))
  9.                                         call();
  10.                         }
  11.  

Can you add this to NGUI's code?

Thanks!

13
I'm all out of words describing this - see attachment. I'm not sure if this is an issue with the debugger, or... Idk.

14
NGUI 3 Support / Re: NullReferenceException from NGUITransformInspector?
« on: February 13, 2014, 03:33:36 AM »
I keep an eye close to the release notes. I didn't see anything worth updating to 4.3.4 so I just didn't do it. I'll update and let you know if I still get the error.

15
NGUI 3 Support / Re: NullReferenceException from NGUITransformInspector?
« on: February 13, 2014, 03:23:17 AM »
No I'm using 4.3.3f1

Pages: [1] 2 3 ... 11