Skip to content

[Bug] Unity 6 Sprite Preview Error: Crop rectangle exceeds source bounds & Scrambled Texture Decoding #1

@ETeyondLitle0721

Description

@ETeyondLitle0721

Describe the bug

When attempting to preview a Sprite asset from a Unity 6 bundle, the application throws an ArgumentException regarding cropRectangle. Additionally, the source Texture2D assets are not being decoded correctly, appearing as scrambled "puzzle pieces." This indicates a potential serialization or tiling issue with this specific Unity version's texture format.

To Reproduce

  1. Open AssetStudio.GUI.exe (v2.4.0).
  2. Load the bundle file: yuki.bundle.
  3. Switch to the Asset List tab and filter by Type: Sprite.
  4. Click on a Sprite (e.g., Sprite ID 19) to preview it.
  5. Observed Error: The Log window shows Crop rectangle should be smaller than the source bounds.
  6. Observed Texture: The corresponding Texture2D appears scrambled/tiled incorrectly.

Expected behavior

The Texture2D should be decoded properly, and the Sprite should be correctly cropped and displayed in the preview pane without errors.

Screenshots

1. Sprite Preview Exception
Image

2. Scrambled Texture (Decoding Issue)
Image

Version

v2.4.0 (Multi-threaded)

Unity Version

6000.0.48f1

Sample

Additional context

  1. Stack Trace: The error occurs at AssetStudio.Utility\SpriteHelper.cs:line 55 within the CutImage method.
  2. Analysis: The Crop rectangle error appears to be a secondary symptom. Since the source Texture2D is not being reconstructed correctly (as seen in the "puzzle" effect), the metadata or UV coordinates are likely being misinterpreted by the current Unity 6 parser.
  3. Environment: This is a Unity 6 (6000.x) project using Naninovel assets.

This issue was drafted with the assistance of Gemini (AI thought partner).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions