Welcome,
Guest
. Please
login
or
register
.
November 30, 2023, 10:21:21 AM
Home
Help
Search
Login
Register
Tasharen Entertainment Forum
»
Support
»
NGUI 3 Support
»
Screenshots to UISprite
« previous
next »
Print
Pages: [
1
]
Author
Topic: Screenshots to UISprite (Read 1949 times)
Tatanan
Jr. Member
Thank You
-Given: 11
-Receive: 0
Posts: 81
Screenshots to UISprite
«
on:
June 30, 2015, 10:27:16 AM »
Hello.
Using
Texture2D tex
=
new
Texture2D
(
128
,
128
)
;
tex
.
ReadPixels
(
new
Rect
(
0
,
0
,
128
,
128
)
,
0
,
0
)
;
tex
.
Apply
(
)
;
I can take a screenshot. How can I put it in a UI Sprite?
I guess it should be a UI
2D
Sprite, right?
Thank you.
Logged
Game developer on
Casual Arena
.
Leopotam
Newbie
Thank You
-Given: 0
-Receive: 1
Posts: 7
Re: Screenshots to UISprite
«
Reply #1 on:
July 01, 2015, 05:59:22 AM »
You cant, use UITexture instead.
Logged
Tatanan
Jr. Member
Thank You
-Given: 11
-Receive: 0
Posts: 81
Re: Screenshots to UISprite
«
Reply #2 on:
July 01, 2015, 06:11:08 AM »
Isn't it the same as a UI2D Sprite?
On both I just drag a png and it's done.
Logged
Game developer on
Casual Arena
.
ArenMook
Administrator
Hero Member
Thank You
-Given: 337
-Receive: 1171
Posts: 22,128
Toronto, Canada
Re: Screenshots to UISprite
«
Reply #3 on:
July 02, 2015, 08:55:45 PM »
UI2DSprite works with Unity's 2D sprites. It's not the same thing as a texture. Sprites are packed into atlases at run-time / build time by Unity.
Logged
Print
Pages: [
1
]
« previous
next »
Tasharen Entertainment Forum
»
Support
»
NGUI 3 Support
»
Screenshots to UISprite