x


byte array of image whether can make as the background of unity camera preview

byte array of image whether can make as the background of unity camera preview? if can,how to do that.please help me!!!

more ▼

asked Oct 17 '11 at 01:16 AM

waqa1988 gravatar image

waqa1988
16 10 11 11

Well, Texture.SetPixels takes an array of Color values. Is that what you mean? As for the background thing, you'd have to set up some kind of culling thing- have a second camera which renders first, with nothing in front of it except this image, and then have your main camera set its clear flags to 'none' so that it doesn't wipe the previous image. As for the preview thing, you can't really do that, but why do you want to?

Oct 17 '11 at 02:26 AM syclamoth

I want to change the backgroud of the unity camera preview to the images that HTC mobile Camera captured,can you tell me how to do?

Oct 17 '11 at 02:49 AM waqa1988

Like I said, have a second camera which only shows an image. If you have a Texture2D which you have parsed from the camera, just use that!

Oct 17 '11 at 02:58 AM syclamoth
(comments are locked)
10|3000 characters needed characters left

0 answers: sort voted first
Be the first one to answer this question
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:

x3014
x1363
x167
x21

asked: Oct 17 '11 at 01:16 AM

Seen: 1051 times

Last Updated: Oct 17 '11 at 02:58 AM