Author Topic: Trying to get NGUI to work with Spriter  (Read 2526 times)

cdman

  • Guest
Trying to get NGUI to work with Spriter
« on: November 06, 2013, 05:26:47 PM »
I got Spriter working using the free version of NGUI and the APIs in this forum:
http://www.brashmonkey.com/forum/viewtopic.php?f=3&t=534&start=50

However, I just bought the full version of NGUI and now it doesn't work. I updated to v3.0.4 and still no luck. I commented out the #define NGUI_FREE like I was told in the instructions.

I get several errors (No overload function for method 'ImportTexture' takes '3' arguments) which can be fixed by adding a 4th boolean value to the calls.

But I can't seem to fix the other error (Can not implicitly convert type 'System.Collections.Generic.List<UISpriteData>' to 'System.Collections.Generic.List<UIAtlas.Sprite>' for the line 345:
List<UIAtlas.Sprite> spriteList = atlas.spriteList; in SpriterDataNGUI.cs

Thank you.


Yukichu

  • Full Member
  • ***
  • Thank You
  • -Given: 3
  • -Receive: 8
  • Posts: 101
    • View Profile
Re: Trying to get NGUI to work with Spriter
« Reply #1 on: November 06, 2013, 05:45:43 PM »
Without actually knowing too much, I presume 'Spriter' was written to use pre-NGUI 3.0.

I think there is still something for NGUI 2.7 in the Unity download.  Try that instead of the latest version.  Not much you can do other than fix Spriter yourself, well, or ask whoever made it to fix it.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Trying to get NGUI to work with Spriter
« Reply #2 on: November 07, 2013, 04:47:23 AM »
UISpriteData replaced UIAtlas.Sprite. Its data is also not backwards compatible, which is why I have code that auto-upgrades it for older atlases.

cdman

  • Guest
Re: Trying to get NGUI to work with Spriter
« Reply #3 on: November 07, 2013, 12:33:23 PM »
Thanks.

I tried 2.7 but it was too old.