unity中texture转化为sprite

//转化

//texture转化为sprite
Sprite sprite=Sprite.Create(texture,new Rect(0,0,texture.width,texture.height),new Vector2(0.5f,0.5f));
image.sprite=sprite;

你可能感兴趣的:(unity)