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

Pages: [1]
1
NGUI 3 Documentation / Re: UIScrollView
« on: February 09, 2016, 10:43:39 AM »
I have two different ScrollViews. Both with 5 Items. One with Words and one with BackgroundImages for each word. When I center one of the Words, I call BackgroundImages.centerOn that Word.

This works good, when I go from word 2->3 or 3->4 or 3->5, but when I go from 4->1 it goes backwards, instead of forward, because I think centerOn takes the shortest way to the target.

Is there a way that it goes the same direction the WordScollView goes and not the shortest way or do I have to modify the UICenterOnChild for this?

Cheers,
Mourkain

2
NGUI 3 Support / Re: NGUITools.AddChild creates duplicate objects
« on: June 01, 2015, 06:12:56 AM »
Thanks, just wrote an own function now and it works ;)

3
NGUI 3 Support / Re: NGUITools.AddChild creates duplicate objects
« on: May 27, 2015, 02:48:56 AM »
I have a similar problem.

I have this call, that creates one GameObject under the Parent and one in the Hierarchy root.
  1. NGUITools.AddChild(creatureHolder, SingletonCreatureCreator.Instance().makeCreature(creatures[_arrayNumber]));
  2.  

 Looking into the NGUI-Code the AddChild(GameObject, GameObject) uses Instantiate and thats the Reason why it's doing this.

It would fix it, if I just change this:
  1. static public GameObject AddChild (GameObject parent, GameObject prefab)
  2.         {
  3.                 // GameObject go = GameObject.Instantiate(prefab) as GameObject;
  4.                 Debug.Log("I changed NGUI-Code here.");
  5.                 GameObject go = prefab;

Is there a better solution for this problem?

4
NGUI 3 Support / UIButton - OnTouchBegan?
« on: April 02, 2015, 06:41:59 AM »
Hey guys,

i made a small game where you have to flip same cards very fast. Every Card had a UIButton on it.
I'm using the standard OnClick to detect the touches, but this method is pretty slow. Is there something like
OnTouchBegan?

Cheers

Pages: [1]