x


Camera in Interface

Hi, I don't know if this possible, but I sure couldn't find anything about it. I'm trying to show a Camera (Not the main one) in a part of the Interface.

So basicly, can I make a small window that renders the other camera?

more ▼

asked May 24 '12 at 07:28 PM

Danzou gravatar image

Danzou
220 16 27 40

Are you trying to place the viewport as a subrectangle of the user's screen? or are you trying to have it render as a texture to one of your objects?

May 24 '12 at 07:30 PM Weitzel

As a viewport, do you know how to apply this or do you have a reference on how to implement it?

May 24 '12 at 08:30 PM Danzou

you can set the rectangle via camera.pixelRect = new Rect(left, top, width, height); http://unity3d.com/support/documentation/ScriptReference/Camera-pixelRect.html

May 24 '12 at 09:45 PM Weitzel

It works perfectly, thank you. Only it appears behind my GUI, do you happen to know how to show it in front of the interface?

May 25 '12 at 03:16 PM Danzou

"Depth - The camera's position in the draw order. Cameras with a larger value will be drawn on top of cameras with a smaller value" http://unity3d.com/support/documentation/Components/class-Camera

May 25 '12 at 04:08 PM Weitzel
(comments are locked)
10|3000 characters needed characters left

1 answer: sort voted first

Camer-targetTexture is a Pro-Only feature, where you can have what a camera sees applied as a texture.

In free versions you can have multiple camera's display as different rectangular shapes and sizes on the screen's viewport by specifying offset and width percentages.

more ▼

answered May 24 '12 at 07:36 PM

Weitzel gravatar image

Weitzel
170 4

(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:

x3692
x3008
x89

asked: May 24 '12 at 07:28 PM

Seen: 412 times

Last Updated: May 30 '12 at 10:51 PM