Hi Everyone !
I've got a Icon generator giving my that icon (Ugly pink Stick top left screen)
I would like to use that icon to replace the "Fantasy Craft Crystal 035" I am currtenly using for the Magnetite Item.
I tryed to get the Icon custom property of the Magnetite Item and make it equal to the UiImage:GetImage() not working
I tryed to get the Fantasy Craft Crystal 035 and SetImage() to to the UiImage:GetImage() not working
still has the standard Craft Crystal 035 icon in my inventory....
Any advices ?
Thanks a lot
Nebbley
You need to get an image with something like:
local capture = myCamera:Capture(CameraCaptureResolution.MEDIUM)
Then set your icon image with:
myUIImage:SetCameraCapture(capture)
You can only use SetCameraCapture() on a UIImage. You cannot use SetImage directly with the capture. This CameraCapture gives quite a good walk through of it.
Exactly how you make this work is going to depend on how your inventory system is setup, but perhaps there is enough there to get started? If you can't get the whole inventory system to work, try experimenting with just the camera capture bit until you feel comfortable with that.
When I wrote my system I used a table of captures and saved the index as a custom property on each item, so I could always reference the capture without having to recapture it each time - I'm not sure if that helps you or not, it all depends on how you have implemented it.