Outer-Wilds-New-Horizons / new-horizons

A tool for modifying or creating new planets, dialogue, ship logs, and more for Outer Wilds.
https://nh.outerwildsmods.com/
MIT License
42 stars 15 forks source link

Subtitle with small dimensions not getting created #893

Open MegaPiggy opened 3 weeks ago

MegaPiggy commented 3 weeks ago

What Happened?

Subtitle with the dimensions of 296x89, not getting created.

Here's an example brokenSubtitle

The logs say it errors here. image

What was supposed to happen?

Should create the sprite for the subtitle

Logs

ArgumentException: Could not create sprite (0, 0, 296, 97) from a 296x89 texture.
Stacktrace: UnityEngine.Sprite.Create (UnityEngine.Texture2D texture, UnityEngine.Rect rect, UnityEngine.Vector2 pivot, System.Single pixelsPerUnit, System.UInt32 extrude, UnityEngine.SpriteMeshType meshType, UnityEngine.Vector4 border, System.Boolean generateFallbackPhysicsShape)
UnityEngine.Sprite.Create (UnityEngine.Texture2D texture, UnityEngine.Rect rect, UnityEngine.Vector2 pivot, System.Single pixelsPerUnit, System.UInt32 extrude, UnityEngine.SpriteMeshType meshType, UnityEngine.Vector4 border)
UnityEngine.Sprite.Create (UnityEngine.Texture2D texture, UnityEngine.Rect rect, UnityEngine.Vector2 pivot, System.Single pixelsPerUnit, System.UInt32 extrude, UnityEngine.SpriteMeshType meshType)
UnityEngine.Sprite.Create (UnityEngine.Texture2D texture, UnityEngine.Rect rect, UnityEngine.Vector2 pivot, System.Single pixelsPerUnit, System.UInt32 extrude)
UnityEngine.Sprite.Create (UnityEngine.Texture2D texture, UnityEngine.Rect rect, UnityEngine.Vector2 pivot, System.Single pixelsPerUnit)
NewHorizons.Handlers.SubtitlesHandler.AddSubtitle (OWML.Common.IModBehaviour mod, System.String filepath) (at NewHorizons/Handlers/SubtitlesHandler.cs:107)
NewHorizons.Handlers.SubtitlesHandler.AddSubtitles () (at NewHorizons/Handlers/SubtitlesHandler.cs:86)
NewHorizons.Handlers.SubtitlesHandler.Start () (at NewHorizons/Handlers/SubtitlesHandler.cs:77)