Skip to content

Instantly share code, notes, and snippets.

@sehm
Created January 11, 2016 11:39
Show Gist options
  • Save sehm/d5a75d9042fee4862385 to your computer and use it in GitHub Desktop.
Save sehm/d5a75d9042fee4862385 to your computer and use it in GitHub Desktop.
Unity Editor スクリプト:指定文字列をクリップボードにコピーする
using UnityEditor;
using UnityEngine;
using System;
void CopyToClipboard(string txt)
{
// 代入するだけでクリップボードにコピーされる
// 何でも string 型にすれば、クリップボードにつっこめる。
EditorGUIUtility.systemCopyBuffer = txt; 。
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment