x


How to get texture from texture atlas

I currently have texture atlas for my GUI. Is it possible to fetch textures from texture atlas for my GUI elements? All ideas, solutions and tips are appreciated.

more ▼

asked Dec 20 '09 at 12:38 AM

Erkki Nerkki gravatar image

Erkki Nerkki
26 1 1 3

(comments are locked)
10|3000 characters needed characters left

2 answers: sort voted first

if you generated the atlas with packtextures method, it will return an array of rects to you witch is the uv positions of all textures. if the texture is generated outside unity you should have the starting pixel number and width and height of each texture. then you can get each texture with GetPixels method of texture2d class and put them in a new texture to use.

more ▼

answered Dec 20 '09 at 03:48 AM

Ashkan_gc gravatar image

Ashkan_gc
9k 33 56 117

(comments are locked)
10|3000 characters needed characters left

sry for reviving this but I didn't actually wanna make another thread for this. I know how to create atlas using 3rd patry programs and plugins but what I dunno is how I can create it using packtexture and apply it to unity. they all talk bout scripting and all. one is here by phantom and here by unity manual. unfortunately none of em explained how to use them. I can't even find a single and simple tut on this out there. Is there a simple way for starters to learn how to atlas and use it in unity ? thanks in advance

more ▼

answered Jun 28 '12 at 03:21 PM

STARS gravatar image

STARS
48 4 8 8

That should really be a new question - I suggest you post it as such (this question is from 2009 and appears to be answered)

Jun 28 '12 at 03:58 PM whydoidoit

ok.. thx anyway

Jun 28 '12 at 05:53 PM STARS
(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x3669
x2188

asked: Dec 20 '09 at 12:38 AM

Seen: 6178 times

Last Updated: Jun 28 '12 at 05:53 PM