123456789101112131415161718192021 |
- namespace AtlasUtility
- {
- using UnityEngine;
- using System.Collections;
- using System.Collections.Generic;
- public static class ExTexture2D
- {
- public static Texture2D Clone(this Texture2D sourceTexture)
- {
- Texture2D texture = new Texture2D(sourceTexture.width, sourceTexture.height);
- texture.SetPixels(sourceTexture.GetPixels());
- texture.Apply();
- return texture;
- }
- }
- }
|