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.


Topics - gecko64

Pages: [1]
1
We've got four buttons anchored at the four corners of the screen, and they disappear when I rotate the device 180 degrees. We only support landscape, not portrait, so the aspect ratio/resolution is exactly the same. Non-anchored objects are fine. Here's one of the anchored objects. Any idea what we're doing wrong?

thanks!
(And thanks for keeping NGUI going -- extremely helpful for legacy projects)

Dave


2
NGUI 3 Support / Several draw calls per sprite (only sprites in the panel)
« on: December 16, 2014, 08:59:21 PM »
I've got a game with a lot of panels -- at runtime, between 15 and 40 UIPanels are distributed across a starry-night skydome, representing astronomical objects. They're on a GUI layer is not affected by any lights, and only one camera is set to render that layer. Yet each sprite in each panel uses 2-4 drawcalls. I've read the various threads about this type of issue, but I don't think any apply. These panels are very simple: each one has about ten sprites in it, all of which use the same atlas. There are no dynamic fonts or anything else but sprites in the panels.  The panels revolve around the camera with the skydome, but the contents in each panel are static, so I've checked the "Static" toggle on each panel, and also checked the "Static" box on each sprite object.

I don't think that it's caused by 3.x's depth function, since there's nothing but sprites in these panels, and they all use the same atlas. There are several other GUI panels onscreen at the same time.

Any solutions or suggestions? It's really dragging down the frame rate.

thanks
Dave

3
NGUI 3 Support / How to set up reference font
« on: March 11, 2014, 09:42:25 PM »
I've set up Reference Atlases with the LoadAtlas script, but I don't understand how to set up Reference Fonts. I thought I'd create a reference font for each font prefab, and then put LoadAtlas script on the UIRoot just like I've done for the Reference Atlases. But when I do that, I can't assign the Reference Font to the Reference Atlas slot in the inspector -- it rejects it, being the wrong type of object. So...do I put the LoadAtlas script on each Reference Font, or what do I do?

Edit: Oh, and in case it matters: this project is still on NGUI 2. (It's an old project, I'm just doing a higher-rez version, and can't do all the mods necessary to upgrade it to NGUI 3.)

thanks
Dave

4
NGUI 3 Support / ArgumentException error when opening Atlas Maker
« on: April 15, 2013, 04:15:54 PM »
I've been getting this error when I open the Atlas Maker, with a nearly-blank window. No way to close it, relaunching Unity doesn't help. How can I fix it?

ArgumentException: An element with the same key already exists in the dictionary.
System.Collections.Generic.Dictionary`2[System.String,System.Int32].Add (System.String key, Int32 value) (at /Applications/buildAgent/work/b59ae78cff80e584/mcs/class/corlib/System.Collections.Generic/Dictionary.cs:404)
UIAtlasMaker.GetSpriteList (System.Collections.Generic.List`1 textures) (at Assets/NGUI/Scripts/Editor/UIAtlasMaker.cs:230)
UIAtlasMaker.OnGUI () (at Assets/NGUI/Scripts/Editor/UIAtlasMaker.cs:846)
System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Applications/buildAgent/work/b59ae78cff80e584/mcs/class/corlib/System.Reflection/MonoMethod.cs:222)

5
NGUI 3 Support / Font Maker fails
« on: February 20, 2013, 01:39:37 PM »
I've been making fonts and atlases for a project in the past few days without a problem, but today, every font I try to make fails in the same way -- after i make the font, the font prefab is missing a sprite, and the new font has not been added to the font atlas. Throws an error when I look at the font prefab, below. Any suggestions?


NullReferenceException: Object reference not set to an instance of an object
UIFontInspector.OnPreviewGUI (Rect rect, UnityEngine.GUIStyle background) (at Assets/NGUI/Scripts/Editor/UIFontInspector.cs:277)
UnityEditor.Editor.OnInteractivePreviewGUI (Rect r, UnityEngine.GUIStyle background)
UnityEditor.Editor.DrawPreview (Rect previewPosition)
UnityEditor.InspectorWindow.DrawPreviewAndLabels ()
UnityEditor.InspectorWindow.OnGUI ()
System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Applications/buildAgent/work/3df08680c6f85295/mcs/class/corlib/System.Reflection/MonoMethod.cs:222)

Pages: [1]