Accessing custom pivot through script
Hi I've got a sprite (from a multiple-sprite sheet) with a offsetted custom pivot. the concept is the turret of a gun platform, the platform is static and the turret sprite is changed to suit the direction it's facing. Rather than store any coordinates we simply made the pivot points of all the parts sit on the same coordinates (0,0) That part is working fine.
The Tricky bit is that I need to retrieve the pivot offset in code for another related task, .pivot superficially looks like what I need but the numbers are wrong, they don't match up to the true offsets in the metadata files. I can theoretically generate a list of turret offsets by reading the metadata files and store that for the actual game, but I'd rather simply retrieve directly from the Sprite object.
Am I missing anything obvious?
Ruadhan