private float MaxHeight(Texture texture) { if (texture == null) return 0; float scale = 128f / (Mathf.Max(texture.width, texture.height) * 1f); return scale * texture.height; }