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

Pages: [1]
NGUI 3 Documentation / Re: UITable
« on: April 05, 2018, 09:29:33 AM »
I had a problem with Table.

My case:
I have a prefab with UITable onboard (in children object)
Need to relocate the prefab on initialization. My components on the prefab do this in Start method.
But. After reposition the transform, the UITable is going crazy.
I tried to call Reposition, it doesn't change anything.

Finally I found a solution:
  1.         var table = GetComponentInChildren<UITable>();
  2.         if (table != null)
  3.         {
  4.             table.Reposition();
  5.             table.enabled = false;
  6.         }

It's very important to disable Table after Reposition.
And very important execute all the code before reposition the prefab.

Hope it could help somebody!
Cheers! :)

NGUI 3 Documentation / Re: UIScrollView
« on: April 03, 2018, 12:34:58 PM »
UIScrollView extention

I created extentions for UIScrollView, it helps getting vertical and horizontal scroll percent [0 - 1]
Check the ExtentionsUIScrollView.cs here -

It works super easy. Just put the class in your unity project than you can write this anywere:

  1. UIScrollView scrollView;
  3. float percentH = scrollView.PercentHorizontal();
  4. float percentV = scrollView.PercentVertical();

Pages: [1]