Git Product home page Git Product logo

unitypsdimporter's Introduction

Unity Psd Importer

Unity Psd Importer is an addon for Unity3D. It provides an editor window from which individual layers can be selected and exported. The layers are exported either as individual PNGs or as an atlas image.

To compile the Unity PSD Importer in the Unity3D Editor you must have the files gmcs.rsp and smcs.rsp with "-unsafe" in the first line of the files in the root directory of your project. Otherwise you can compile the code as a DLL and it will also work in the editor.

To use the Unity PSD Importer, in the Unity3D Editor go to Sprites > PSD Import to access the importer, then drag and drop or search for the PSD file you wish to import.

To only export the layers to PNG files, click on the "Export Visible Layers" button and it will only create the PNG files with the sprites that are visible. You can individually check which layers you want to import.

To create a root gameobject with all the layers as child sprites and the layers compiled in an atlas, click on the "Create atlas" button. All the layers will be saved to an atlas texture with sprites as children that is autogenerated with the atlas size you define under "Max. atlas size". A root gameobject with the filename of the PSD file is created and all the layers as sprites will be as children gameobjects under the root gameobject.

To create PNG files individually with each sprite assigned to the PNG files, click on the "Create sprites" button. This will create a root gameobject with the filename of the PSD file and all the layers as sprites under the root gameobject.

All sprites are created with a center pivot so that they will import in their correct alignment with the PSD file layers' positions.

Some notes on the PSD support:

It should support all image layers, however text, layer groups, or other special layers will not be supported. It is best to flatten layer groups and text before importing.

All the imported layers should be imported at their same positions as in the PSD file.

When importing as an atlas, if the layers cannot collectively fit in the atlas they will be scaled down to fit the atlas texture, therefore it is preferable to import the layers using "Create sprites" to have the layers imported as separate PNG files.

unitypsdimporter's People

Contributors

playemgames avatar banbury avatar ironicnet avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.