x


ScriptableWizard and Gizmos

Hi,

I made a custom ScriptableWizard and wanted to draw Gizmos while it was active, so I defined the following function inside my class (c#):

void OnDrawGizmos()
{
    Debug.Log("draw gizmo");
    Gizmos.DrawCube(new Vector3(0,0,0), new Vector3(1,1,1));
}

But even when the wizard is active there are no Debug messages and no Gizmo is drawn. So I was wondering what I was doing wrong... ;P

Thanks in advance

more ▼

asked Feb 21, 2010 at 09:32 AM

Froghut gravatar image

Froghut
51 6 4 13

Same problem here, have you find some workaround for this?

Jun 14, 2011 at 09:50 PM AzulValium

No, I was so focused in ways to avoid using gizmos that forgot to.

Jun 19, 2011 at 02:57 AM AzulValium

Deleted the comment and posted and answer. No need to post a bug report, according to the forums UT is aware of the issue. :)

Jun 19, 2011 at 02:58 AM Joshua

Same here, OnDrawGizmos seems to not work with scriptablewizard...unfortunately

Apr 29, 2012 at 12:18 PM Crazydadz
(comments are locked)
10|3000 characters needed characters left

4 answers: sort voted first

Make sure you didn't accidentally "un-render" the mesh for the missing object. It may sound obvious, but you never know. That would be something I'd do by accident. lol.

more ▼

answered Mar 10, 2010 at 07:56 PM

CalledToGaming gravatar image

CalledToGaming
190 55 54 52

But I don't even have a mesh, I only have a ScriptableWizard editor window. Not sure I understand what you mean.

Mar 11, 2010 at 07:23 AM Froghut
(comments are locked)
10|3000 characters needed characters left

Is the scene camera looking at <0,0,0>? The best way to check is to position an object there and make sure the camera can see it. If you still don't see the cube, there could be another problem.

more ▼

answered Feb 24, 2010 at 05:47 PM

andeeee gravatar image

andeeee ♦
1.5k 6 10 27

To test this I placed a sphere at 0,0,0. I can see the sphere in the scene view, but can't see a cube with the wizard open, neither in the scene view nor in the game view with the Gizmos button enabled.

Feb 25, 2010 at 06:56 AM Froghut
(comments are locked)
10|3000 characters needed characters left

Check you don't have any script compilation errors. If this code was added since the last successful compile, it won't be included in the current wizard you see.

Note that this includes ALL compiling issues in your project, not just the script containing this code. If there are any compilation errors at all, Unity will revert to the last successful code compile.

That's about the only thing I can see possibly wrong with this right now, and I point it out as it has happened to me a couple of times before.

more ▼

answered Jun 03, 2010 at 03:01 AM

Murcho gravatar image

Murcho
2.9k 27 35 67

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

It's a know bug. A quote from the forums by Shawn, a Unity employee: " this is a known problem. We have no ETA on a fix yet... :( "

more ▼

answered Jun 19, 2011 at 02:54 AM

Joshua gravatar image

Joshua
6.9k 47 48 104

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

x101
x9

asked: Feb 21, 2010 at 09:32 AM

Seen: 2962 times

Last Updated: Apr 29, 2012 at 12:18 PM