private float GetTextureScale()
{
float textureScale = 0;
NamedObjectSave nos = Instance as NamedObjectSave;
var instruction = nos.GetInstructionFromMember("TextureScale");
if (instruction != null && instruction.Value != null)
{
if (instruction.Value is int)
{
textureScale = (float)((int)instruction.Value);
}
else
{
textureScale = (float)instruction.Value;
}
}
return textureScale;
}