Created
January 28, 2019 07:24
-
-
Save TomoG29/b4972298fb81e25c0cd291e3fac26464 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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