Skip to content
Alfish edited this page Jul 30, 2022 · 16 revisions

KRA OpenRaster Importer

With this plugin, any .kra/.krz and .ora files in your project will be recognized as assets.
You can see their preview in the Project window.
Whenever you edit any of those files externally, it will be reimported automatically.

Source Image Import Settings

This window defines how to import source images from your project's Assets folder into the Unity Editor.
Select one or more image files in the Project window so that the import settings appear in the Inspector.
Enable the desired import method, then click Apply.

No import method is enabled by default. If you want, you can select one of the included OpenRasterImporter presets (or create your own preset) and use the button on the Inspector to set it as the default for the project.

Note that this importer was designed only for non-HDR sRGB images without animation. For other images, you may need to export using an image editor (such as Krita) instead.

You can hover the mouse on any field's label to show a tooltip explaining what it does.

Extract PNG

This is the recommended method, since that allows to use all features of Unity's built-in PNG importer.
This will generate each PNG file on the specific path/name pattern you set.
You can then select the extracted PNG files and import them as normal.

The default pattern extracts the PNG file on the same folder as the source image.
Variables (e.g. <name>) are used to specify the extraction path pattern generically. This allows you to import many files at once.
Simply hover the mouse on Extract PNG To for a tooltip explanation of each variable.

For example, if you want to change just the top folder under Assets, you could use:

  • Assets/Textures/<subpath>/<name>.<ext>.png
  • Assets/Textures/_auto/<guid>.png

Note that none of the settings below will be applied to the extracted file's import settings. If you want to change default PNG Texture import settings, you may be able to create a custom TextureImporter preset pattern for a specific folder, according to your use case.

Import Texture and Sprite

You might prefer to import textures and sprites directly as sub-assets, although this method has more limited options and a size limit (PNG < 64 MiB).
Note that sprites can only be imported when the Import Texture option is also enabled. Only single sprite mode is supported.

Most options here correspond to the same option in Unity's built-in TextureImporter or Sprite Editor, so only differences will be explained below.

Texture|Sprite Name

Name of the sub-asset. These fields allow the same variables as in the path patterns explained before. The default is <name>, which is the filename of the source image without the extension.

Texture Format

Same as in Unity's built-in TextureImporter, but only the options below are available.

  • ARGB32: Uncompressed, 8-bits per channel, color with alpha transparency.
  • DXT5: Compressed color with alpha transparency.

If you need a different format, or platform-specific overrides, use Unity's built-in importer instead.
Note that HDR and linear/non-sRGB textures aren't supported even when extracting a PNG; in this case, use an image editor like Krita to manually export to an EXR file.

Scale Per Unit and Scale Unit

How many pixels in the sprite correspond to 1 unit in the world. This is the sprite's Pixels Per Unit setting when the next field is set to Absolute Pixels. Otherwise, the value is relative to the image size.

  • Absolute Pixels: Value is the exact amount of Pixels Per Unit.
  • Width|Height Percentage: Value is Pixels Per Unit relative to % of either width or height.
    E.g., 25% width means unscaled sprite width is 4 world units.
  • Covering Percentage: % of width or height, whichever is smaller, per world unit.
    E.g., when it's 100% covering, then if an unscaled image has "portrait" aspect its width will cover 1 world unit; if it has "landscape" aspect, height will cover 1 unit.
  • Containing Percentage: % of width or height, whichever is larger, per world unit.
    E.g., when it's 100% containing, then an unscaled image will fit inside a 1x1 world unit square without stretching.

Pivot

Corresponds to the normalized Custom Pivot setting, where (0, 0) is bottom left and (1, 1) is top right.

Support

You can report any bugs you happen to find in the issues section.

For questions or private conversations, use Unity Forum.

If you want to check other assets: Unity Asset Store

Clone this wiki locally