大修
This commit is contained in:
12
Assets/Scripts/SLSUtilities/General/SpriteExtension.cs
Normal file
12
Assets/Scripts/SLSUtilities/General/SpriteExtension.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace SLSUtilities.General
|
||||
{
|
||||
public static class SpriteExtension
|
||||
{
|
||||
public static Sprite Create(Texture2D texture)
|
||||
{
|
||||
return Sprite.Create(texture, new Rect(0, 0, texture.width, texture.height), new Vector2(0.5f, 0.5f));
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user