new-horizons icon indicating copy to clipboard operation
new-horizons copied to clipboard

Subtitle with small dimensions not getting created

Open MegaPiggy opened this issue 8 months ago • 0 comments

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)

MegaPiggy avatar Jun 12 '24 15:06 MegaPiggy