コード例 #1
0
 /// <summary>
 /// Get custom size or default size of texture.
 /// </summary>
 static public Vector2 GetSizeFromXml(Texture2D texture, string textureName, float scaleWidth = 1, float scaleHeight = 1)
 {
     if (CustomImageExist(textureName))
     {
         return(XMLManager.GetSize(textureName, imgPath, scaleWidth, scaleHeight));
     }
     else
     {
         return(new Vector2(texture.width * scaleWidth, texture.height * scaleHeight));
     }
 }