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 - afroman

Pages: [1]
1
NGUI 3 Support / Re: "Example 0 - Control Widgets" crashes Unity
« on: February 21, 2014, 12:06:27 AM »
Nice, sounds pretty sweet.

2
NGUI 3 Support / Re: "Example 0 - Control Widgets" crashes Unity
« on: February 20, 2014, 11:52:16 PM »
Sounds great, that was fast.
Just curious, how are you able to update NGUI on the asset store so quickly?

3
NGUI 3 Support / "Example 0 - Control Widgets" crashes Unity
« on: February 20, 2014, 11:41:44 PM »
Just imported the latest version of NGUI from the asset store, opened up "Example 0 - Control Widgets" and it immediately crashed the engine on my mac.
Tried again with no luck, no issues with the other examples. I'm running Unity 4.3.4.

Interested in some of the controls in that example, looking forward to a possible fix.
Any help would be appreciated!

4
NGUI 3 Support / Re: NGUI Performance Issues
« on: January 30, 2014, 10:08:49 AM »
it's fixed, significant performance improvements!

5
NGUI 3 Support / Re: NGUI Performance Issues
« on: January 29, 2014, 11:35:46 AM »
Yes, I am disabling all 361 GameObjects. I'm also on the latest version 3.09.
I was disabling the GameObjects because it seemed like the only logical thing to do.

Good idea thou, I'll try that.
Thanks, I'll let you know how it goes :)

6
NGUI 3 Support / Re: NGUI Performance Issues
« on: January 29, 2014, 11:13:58 AM »
I do. I don't destroy objects knowing that I will use it again.

I'm actually disabling the GameObjects that I don't use after initially instantiating them. It is however still a problem when I re-enable the same GameObjects again. I'm getting a whopping 3.7MB In garbage collection in UIRect.OnEnable(). Which is causing the game to run really slow, each time the shop is open.

I doubt it but would using a Queue still help with this issue? Or would this be a general GC issue I need to work around?

7
NGUI 3 Support / NGUI Performance Issues
« on: January 28, 2014, 02:03:48 PM »
I'm having serious performance issues in UIRect.Start() & UIPanel.LateUpdate(). I have a lot of labels in my UI that can be disabled & enabled depending on whether or not the shop is open. This is causing over 1.4MB of GC. This is really hurting performance in my game, any suggestions?

8
NGUI 3 Support / Re: Problem with sliding across buttons
« on: December 09, 2013, 06:42:55 PM »
Updated to NGUI 3.0.7 rc2, the problem has gotten slightly worse.
After dragging over a button, the button colour changes to the original colour and size instead of keeping the button pressed colour.
Also UIButton still has no effect when dragging over a new button.

I'm so picky about this because this is for the directional buttons in my game and the previous behaviour of it was great.
Any help or clue on how to restore the button behaviour would be great!

9
NGUI 3 Support / Re: Problem with sliding across buttons
« on: December 06, 2013, 08:40:58 AM »
Alright nice, thanks!

10
NGUI 3 Support / Re: Problem with sliding across buttons
« on: December 05, 2013, 03:52:31 PM »
Ok, seems things have changed a bit, OnDragOver / OnDragOut wasn't previous needed.
How would I reflect these changes with UIButton or UIButtonColor as they use to work?

Thanks in advance!

11
NGUI 3 Support / Problem with sliding across buttons
« on: December 04, 2013, 07:02:20 PM »
For some reason I can't get NGUI to process a new touch event when sliding across from a previous button.
After turning on debug, the camera reports a "touch hit" on the new button, but it doesn't process the event until the current event has been completed.
How would I get NGUI to process all buttons when sliding?

12
Yeah I've noticed the spike as well. The spike is actually so bad that it crashes the game on some devices. it has however improved slightly since upgrading to 3.0.6.

13
NGUI 3 Support / Re: Centring items in a UIDraggablePanel...
« on: November 10, 2013, 12:10:49 AM »
I just did, sorry I'm new to the forums :$

14
NGUI 3 Support / Centring items in a UIDraggablePanel...
« on: November 07, 2013, 10:26:04 AM »
I'm trying to centre an item at the end of a UITable list within a UIDraggablePanel. What I'm trying to do is that when someone clicks an item near the end and only part of it is shown, I want the whole item to be displayed instead of it being selected and only half shown.
I stumbled across an old forum http://www.tasharen.com/forum/index.php?topic=180.0 and found the answer, however the math is slightly wrong. If I select the first or last item in the list it moves the entire draggable panel out of the panel clipping until I click it again. I tried to fix it with no luck. Any suggestions? (the code is below)

using UnityEngine;
using System.Collections;
[RequireComponent(typeof(UIDraggablePanel))]
public class UIDraggablePanelSelectedObjectFollower : MonoBehaviour {

    UIDraggablePanel draggablePanel;
    Transform mTrans;
    GameObject mGO;
    GameObject lastFollowed;
   
    void Awake() {
        mGO = gameObject;
        mTrans = transform;
        draggablePanel = GetComponent<UIDraggablePanel>();   
    }
   
    void Update() {
        if (enabled && mGO.active && UICamera.selectedObject != null && UICamera.selectedObject != lastFollowed) {
            if (!UICamera.selectedObject.transform.IsChildOf(draggablePanel.transform)) return;
           
            var draggableBounds = draggablePanel.bounds;
           
            var widgetBounds = NGUIMath.CalculateRelativeWidgetBounds(draggablePanel.transform, UICamera.selectedObject.transform);

                UIPanel mPanel = GetComponent<UIPanel>();
               
            Vector3 constraint = mPanel.CalculateConstrainOffset(widgetBounds.min, widgetBounds.max);
            if (constraint.sqrMagnitude > 0.000001f) {
                SpringPanel.Begin(mPanel.gameObject, mTrans.localPosition + constraint, 13f);
                lastFollowed = UICamera.selectedObject;
            }
        }
    }
}

Pages: [1]