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

Pages: [1]
1
NGUI 3 Support / Re: Anchor reposition takes some frames, why?
« on: July 15, 2014, 02:20:22 AM »
It appears not to be working, I tried calling it on the parent panel, and all its widgets but it's not immediately.

2
NGUI 3 Support / Anchor reposition takes some frames, why?
« on: July 14, 2014, 04:09:15 AM »
Hello, I have some sprites and labels which have the new NGUI anchor system (unified, advanced). The thing is If I change some widget height or width it takes NGUI some frames to reposition all the widgets. Why?

Is there a way to tell NGUI to recalculate this in a sync way?

3
NGUI 3 Support / Re: Programmatically use a UITexture/UISprite
« on: February 20, 2013, 08:05:55 AM »
Thanks!  ;D

4
NGUI 3 Support / Programmatically use a UITexture/UISprite
« on: February 20, 2013, 04:53:45 AM »
Hello, I have a Texture2D variable with the texture to add in an empty object. The gameObject is positioned right and now I just want to create an UISprite or UITexture (really don't know which one is the best for my case) and assign somehow my texture to the UISprite/UITexture. How can I acheive that?


  1. public GameObject icon;
  2.        
  3. void Start()
  4. {
  5.         icon = transform.FindChild("icon").gameObject;
  6.         icon.AddComponent<UITexture>(); // ????
  7. }
  8. public void setSlot(Item _item)
  9. {
  10.         Texture2D tex = _item.icon;
  11.         print("filling slot");
  12.         // ...
  13. }

Pages: [1]