Git Product home page Git Product logo

hy2013 / unitypsdlayouttool Goto Github PK

View Code? Open in Web Editor NEW

This project forked from glitchenzo/unitypsdlayouttool

0.0 2.0 0.0 841 KB

A tool used to import a Photoshop Documents (.psd files) into the Unity Game Engine. It can import each layer as separate textures, create Unity 4.3+ Sprites laid out in a scene, and generate an entire prefab with the layout.

License: GNU General Public License v2.0

C# 100.00%

unitypsdlayouttool's Introduction

What is the Unity PSD Layout Tool?

It is a tool used to automatically layout Photoshop Documents (.psd files) in the Unity Game Engine.

Features

  • Layout each PSD layer as Unity 4.3+ Sprites
    • Create Sprite animations using a set of layers as the frames in the animation
  • Layout each PSD Layer as Unity 4.6+ UI elements
    • Create Button objects using a set of layers as the button states
  • Generate a single prefab with the entire layout (Sprites or UI)
  • Export each PSD Layer as a .png file on the hard drive
    • Useful for simply updating textures without creating an entire layout

How to Install

Simply copy the files into your project. A .unitypackage file will be provided in the future.

How to Use

The PSD Layout Tool is implemented as a Unity Custom Inspector. If you select a PSD file that you have in your project (Assets folder) special buttons will appear above the default importer settings.

  • Maximum Depth
    • The maximum depth value (Z position) to use when laying the layers out. The front-most layer (minimum depth) is always 0.
  • Pixels to Unity Units
    • The scale to use when generating Unity Sprites, in pixels to Unity world units (meters).
  • Use Unity UI
    • Check to generate Unity 4.6+ UI elements instead of "normal" GameObjects.
  • Export Layers as Textures
    • Creates a .png image file for each layer in the PSD file, using the same folder structure.
  • Layout in Current Scene
    • Creates a Unity 4.3+ Sprite object for each layer in the PSD file. It is laid out to match the PSD's layout and folder structure.
  • Generate Prefab
    • Identical to the previous option, but it generates a .prefab file instead of putting the objects in the scene.

Special Tags

Layers can have special tags applied to them that flags them to have the layout tool perform special operations on them.

Group Layer Tags

Tag Description
|Animation Creates a Sprite animation using all of the children layers as frames
|FPS=## The number of frames per second to use for a Sprite animation. Defaults to 30 if not present
|Button Creates a Button object using any tagged children layers as the button states

Art Layer Tags

Tag Description
|Disabled Represents the disabled state of a button
|Highlighted Represents the highlighted state of a button
|Pressed Represents the pressed state of a button
|Default Represents the default/enabled/normal/up state of a button
|Enabled Represents the default/enabled/normal/up state of a button
|Normal Represents the default/enabled/normal/up state of a button
|Up Represents the default/enabled/normal/up state of a button
|Text Represents a texture that is the text of a button (normal text layers import without this tag)

Photoshop Compatibility

Photoshop's "Smart Objects" are not supported, and therefore must be flattened/rasterized in Photoshop before attempting to import.

  1. Click Layer in the Photoshop menu
  2. Click Rasterize
  3. Click All Layers

unitypsdlayouttool's People

Contributors

glitchenzo avatar

Watchers

 avatar  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.