Author Topic: UISprite class parameter with sprite selection from atlas  (Read 4895 times)

frarees

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 22
    • View Profile
UISprite class parameter with sprite selection from atlas
« on: May 10, 2013, 08:14:43 AM »
Hello,

Please consider the attached image. What you are seeing here is a custom editor tool to define objects in a war game.

These objects have several levels, each of them with a different 2D preview graphic. Using a texture field, the designer can drag and drop the images from the project inspector itself. We are trying to use a UISprite property, instead.

The thing is: we would need it to behave the same as the UISprite class; with both the atlas selector and the image selector. Do you guys see an elegant way to achieve this?

Thanks in advance for any contribution.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: UISprite class parameter with sprite selection from atlas
« Reply #1 on: May 11, 2013, 12:48:39 AM »
Why not have a look at how it's done in the UISpriteInspector? It's pretty simple.