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

Pages: [1]
1
NGUI 3 Support / Re: Assigning material to atlas
« on: July 30, 2015, 09:55:28 PM »
Sorry in advance, my C# is a bit rusty. I suppose I would create an instance of UIDrawCall.OnRender and set it to onRender. The delegate takes a Material, but I don't know what I'm supposed to do with the material in the method.

  1. var cb = new UIDrawCall.OnRenderCallback(CbMethod);
  2. someSprite.onRender = cb;
  3.  
  4. void CbMethod(Material mat)
  5. {
  6.  
  7. }

2
NGUI 3 Support / Re: Assigning material to atlas
« on: July 26, 2015, 07:58:17 PM »
I'd like to change it during runtime via script. Is there a way I can do this?

3
NGUI 3 Support / Assigning material to atlas
« on: July 24, 2015, 03:03:17 AM »
I have a custom black and white shader that I want to apply to my atlas. I know that the shader will effect all sprites in the atlas, and that is fine. I came across a post mentioned I should use UISprite's onRender to set the new material, but I don't understand how to apply it (syntax). Please help!  :)

Pages: [1]