I have a inventory system. Each item in the system has a monobehaviour attached where I define the item's properties and functionality. Currently one of the fields (the Icon field) is a Texture2D.
I am using the MvvM pattern. This means that my inventory item script does not draw itself and includes no UISprite's or widgets. Instead I have a second game object (the view) and use binders to set the value of the visual components (currently the icon binds to a UITexture) as defined by the inventory item.
My solution currently works fine, but I would like to define my icons using an Atlas and UISprite instead.
I noticed that in the editor for the UISprite behaviour you have a very nice Atlas and Sprite inspector. Being that manually typing in the 'name' of the sprite is a horrible solution, I would like to include this sprite selector in my inventory item script. Where is this code for this?