1
Support / extractRegion in sprite definition - ok to use?
« on: January 14, 2018, 10:51:58 pm »
Hello,
my question refers to the following members of tk2dSpriteDefinition:
public bool extractRegion;
public int regionX, regionY, regionW, regionH;
are they safe to use within a non-editor script?
I'm using it to find the size of the sprite at runtime, but there's a comment implying that they may only be intended to use from the editor side and it sounds to me like they could not be filled in when running outside the editor:
/// Speficies if this texture is extracted from a larger texture source, for instance an atlas. This is used in the inspector.
that's all
many thanks
my question refers to the following members of tk2dSpriteDefinition:
public bool extractRegion;
public int regionX, regionY, regionW, regionH;
are they safe to use within a non-editor script?
I'm using it to find the size of the sprite at runtime, but there's a comment implying that they may only be intended to use from the editor side and it sounds to me like they could not be filled in when running outside the editor:
/// Speficies if this texture is extracted from a larger texture source, for instance an atlas. This is used in the inspector.
that's all
many thanks