Help us understand the problem. What is going on with this article?

【Unity拡張】Unity上の画像ファイルをPhotoshopで開く

More than 1 year has passed since last update.

はじめに

最近、Photoshopで画像データを編集するという場面が増えてきて 

Photoshop起動 -> 画像を開く

という手順が面倒に感じるようになってきました。

そこで、Unity上から画像ファイルをPhotoshopで直接開くエディター拡張を作ってみました。

環境について

Windows 10
Unity 5.6.1f1

ソースコード

Unityプロジェクト内にEditorフォルダを作成して、以下のスクリプトを作成します。

using UnityEngine;
using UnityEditor;
using System.Diagnostics;
using System.IO;

public class EditorOpenInPhotoshop
{
    const string ItemName = "Assets/Open in Photoshop";

    [MenuItem(ItemName, false)]
    static void Open()
    {
        foreach (var guid in Selection.assetGUIDs)
        {
            var path = AssetDatabase.GUIDToAssetPath(guid); // 選択中のアセットのパス
            var fullPath = Path.GetFullPath(path); // アセットの絶対パス
            Process.Start("photoshop", fullPath); // Photoshopでアセットを開く
        }
    }
}

使う

開きたい画像を選択して右クリックメニューの Open in Photoshopを選択します。
open_in_photoshop.gif


Photoshopが立ち上がり、選択した画像がすべて開きます。(完)
image.png

Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
No comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
ユーザーは見つかりませんでした