Convert layered PSD files into Unity uGUI Prefabs. Export layer data with the included script, then right-click in Unity to generate Prefabs with Image, TMP text, and nested groups.PSD to Prefab is an editor extension that converts layered PSD files into Unity uGUI Prefabs. Run the included JSX script in your image editor to export layer data, then right-click the exported file in Unity to generate a structured Prefab.HOW IT WORKSStep 1 - Run the included JSX script in Adobe® Photoshop® (File > Scripts > Browse). Select an output folder and the tool exports a .layout.txt file (JSON format) and individual layer images.Step 2 - Import the exported files into your Unity project under the Assets folder.Step 3 - Right-click the .layout.txt file in the Project window and select "PSD to Prefab > Create Prefab". A .prefab file is generated in the same folder.SUPPORTED ELEMENT TYPES- Image: Unity UI Image component with automatic Sprite assignment. Detects 9-slice border settings and sets Image.Type to Sliced automatically.- Text: TextMeshPro (TextMeshProUGUI) with position, font size, color, opacity, and alignment mapped from PSD layer data.- Group: Nested layer groups are preserved as parent-child hierarchies in the Prefab.LAYER NAMING CONVENTIONSLayers prefixed with # are excluded from export. Layer groups prefixed with * are rasterized and merged into a single image before export.OPTIONAL SETTINGS (PsdImportSettings)A settings ScriptableObject can be created via "Assets > PSD to Prefab > Create Settings". It supports three mapping tables:Font Mappings: Map PSD PostScript font names to TMP_FontAsset references. If no match is found, the tool falls back to any available TMP_FontAsset in the project.Material Mappings: Apply a specific TMP material preset to text layers whose name contains a defined keyword (partial match).Prefab Mappings: Replace generated GameObjects with your own Prefab templates when a layer name contains a defined keyword. The matching Prefab is instantiated and positioned according to the PSD layer data. For Prefabs containing an Image component at the root, the corresponding layer image is assigned automatically.SAMPLE (GitHub)A free sample package including a layered PSD file, exported layout data, a generated Prefab, and a demo scene is available on our public GitHub repository:https://github.com/onederappli/psd-to-prefab-samplesDownload "PsdToPrefabSample.unitypackage" from the repository and import it into your Unity project (Assets > Import Package > Custom Package) to verify the workflow before using it with your own PSD files.REQUIREMENTS- Unity 2022.3 LTS or later- TextMesh Pro (installed via Package Manager)- Adobe® Photoshop® CC 2021 or later (used to run the included JSX export script)Note: Photoshop 24.0 (2023) and later may require enabling ExtendScript under Preferences > Scripts and Actions > Enable ExtendScript.NOTES AND LIMITATIONS- Layer names must be unique within the same level. Duplicate names within a document will trigger an error during JSX export.- Image layers are exported as individual PNG files. Layers using blend modes other than Normal are flattened during export.- The tool reads the first matching asset when multiple textures share the same filename. A console error is logged in that case.- Text rendering in Unity may differ from the source PSD depending on font availability and TMP settings.- This tool is an Editor-only extension. No runtime scripts are included.TRADEMARKSAdobe and Photoshop are trademarks or registered trademarks of Adobe Inc. in the United States and/or other countries. This product is not affiliated with or endorsed by Adobe Inc.AI DisclosureThis package was created with the assistance of AI tools used in a supporting role.Specifically:- The C# editor scripts and the Photoshop JSX export script were authored by the developer with AI-assisted code suggestion and review. All code was manually verified and tested before release.- The user manual (PDF) and the Asset Store listing copy were drafted and translated into English with AI assistance, then reviewed and edited by the developer.No third-party content was reproduced. All AI-assisted output wasreviewed by the developer before inclusion in this package.

