x


Hide Object in game mode, wireframe in editor

I'm looking for a way to not render an object in gameplay, but have it appear as a wireframe in the editor. Currently, I'm just removing the renderer and selecting the object through the hierarchy when I need to edit it, but I would much rather have some way to highlight it in the 3D viewport.

So I suppose it doesn't need to be a wireframe view, but something? Perhaps a dot at the center of the object or something?

The purpose is to make a node-based 3D adventure game. The nodes are big, invisible objects that move the camera to their position when clicked.

more ▼

asked Dec 03 '10 at 04:10 AM

Zib Redlektab gravatar image

Zib Redlektab
304 10 12 24

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

1 answer: sort voted first

Put the nodes on their own layer, then have the camera not render that layer using the camera culling mask. Or you could use gizmos.

more ▼

answered Dec 03 '10 at 04:50 AM

Eric5h5 gravatar image

Eric5h5
80.1k 41 132 519

Layers! Thank you, that works really well.

Dec 03 '10 at 05:21 AM Zib Redlektab

How did you change the culling mask of the Scene view camera? I can't make it work. SceneView.lastActiveSceneView.camera.cullingMask = 0 has no effect.

Jun 14 '11 at 11:56 AM hardwire

@hardwire: the Layers drop-down menu in the upper-right.

Jun 15 '11 at 02:52 AM Eric5h5

@Eric5h5: hm but I need to do it from the script, so that the user doesn't have to set it up to use my tool

Jun 15 '11 at 06:55 AM hardwire
(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:

x124
x19

asked: Dec 03 '10 at 04:10 AM

Seen: 2333 times

Last Updated: Jun 15 '11 at 06:55 AM