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

Pages: [1]
1
NGUI 3 Support / Re: 3D Text and UILabel
« on: May 23, 2014, 02:18:40 PM »
SOLVED: I got 3D text to work in the following way in a game with signposts in the terrain:
uipanel
  -UIsprint
      -UIlabel
      -Quad unity-primitive behind the label

Explanation:
-The Quad primitive closes the transparency.
- The UIPanel is, for some reason i do not understand, required in order to avoid flicking of the label when you approach or move backwards from the label.

NGUI is really a valuable tool - thanks

The UIPanel will not work by itself because when you move around in 3D then the panel ordering will eventually show the depth in the wrong order.

2
I got null reference on app termination i UIPanle and had to make the following fix

The fix is to check for "dc!=null" in ClearAll,  ReleaseAll, Destroy:
 
   static public void ClearAll ()
   {
      bool playing = Application.isPlaying;

      for (int i = mActiveList.size; i > 0; )
      {
         UIDrawCall dc = mActiveList[--i];
         if( dc!=null ){
            if (playing) NGUITools.SetActive(dc.gameObject, false);
            else NGUITools.DestroyImmediate(dc.gameObject);
         }
      }
      mActiveList.Clear();
   }

   static public void ReleaseAll ()
   {
      ClearAll();

      for (int i = mInactiveList.size; i > 0; )
      {
         UIDrawCall dc = mInactiveList[--i];
         if( dc!=null )
            NGUITools.DestroyImmediate(dc.gameObject);
      }
      mInactiveList.Clear();
   }

   static public void Destroy (UIDrawCall dc)
   {
      if (Application.isPlaying && dc!=null )
      {
         if (mActiveList.Remove(dc))
         {
               NGUITools.SetActive(dc.gameObject, false);
               mInactiveList.Add(dc);
         }
      }
      else if( dc!=null )
      {
         mActiveList.Remove(dc);
         NGUITools.DestroyImmediate(dc.gameObject);
      }
   }

3
NGUI 3 Documentation / Re: UIWidget - UpdateWidgetCollider
« on: December 30, 2013, 01:09:52 PM »
Hi

In NGUITools.cs line 290 there is the following statement
if (!w.isVisible) return;

I believe this is inconvenient because it prevents you to calculate layout and sizes before display including setting the right collider area using the UIWidget feature to update the collider.

Could this be improved in a future version. Alternatively UIWidget could update the collider area when it becomes visible ?

4
NGUI 3 Support / Re: Change off layer stops interaction
« on: August 24, 2012, 06:00:29 AM »
Finnaly found this post: http://forum.unity3d.com/threads/114833-NGUI-(Next-Gen-UI)-demo-amp-final-feedback-request/page109

Solution => the cameras event receiver mask should be update to receive events from the MenuSystem layer instead off default

5
NGUI 3 Support / Change off layer stops interaction
« on: August 24, 2012, 05:32:41 AM »
Hi I made my own menu using uitable. It work find until i made the following changes:
- change layer from "default" to a custom layer "menuSystem"

I can see the menu but the UIbutton Tween does not work (stopped activating the tween). Not even if the culling mask i set to everything and the clearflag to skybox

What went wrong ?

Pages: [1]