Add minimum size for text decals

This commit is contained in:
Andrew Cassidy 2020-11-13 01:43:08 -08:00
parent a6e2edc475
commit c42e443b4b
2 changed files with 3 additions and 0 deletions

View File

@ -207,6 +207,9 @@ namespace ConformalDecals.Text {
// CALCULATE SIZES
var size = bounds.size * PixelDensity;
size.x = Mathf.Max(size.x, 0.1f);
size.y = Mathf.Max(size.y, 0.1f);
var textureSize = new Vector2Int {
x = Mathf.NextPowerOfTwo((int) size.x),
y = Mathf.NextPowerOfTwo((int) size.y)