Skip to content

Instantly share code, notes, and snippets.

@TomoG29
Created January 28, 2019 07:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save TomoG29/b4972298fb81e25c0cd291e3fac26464 to your computer and use it in GitHub Desktop.
Save TomoG29/b4972298fb81e25c0cd291e3fac26464 to your computer and use it in GitHub Desktop.
private void CopyTexture()
{
private Sprite src_Picture;//元の画像
private Sprite dst_Picture;//コピー画像
//コピー先のパスを保存
private string dst_path = AssetDatabase.GetAssetPath(dst_Picture);
//ファイルのコピー
AssetDatabase.CopyAsset(AssetDatabase.GetAssetPath(src_Picture), dst_path);
//コピーファイルの読み込み
dst_Picture = (Sprite)AssetDatabase.LoadAssetAtPath(dst_path, typeof(Sprite));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment