- Home /
Gizmo disappeared when custom editor
hi, guys!
I recently make some tools for designer. I custom editor to display the serialize field which script i code.
but, it seems like OnDrawGizmos() function can not display what i draw.
I found that it only display with which was const value. like: Gizmo.DrawLine(Vector3.zero, Vector3.one);
but it can not be:
Gizmo.DrawLine(Vector3.zero, Vector3.one * (Variable value assign by Inspector panel));
I search it on google several times but still get nothing.
hope anyone can help me.
Thanks in advanced!
What value are you putting in? I have never had a problem with this
for example i use drawLine() to display the enemy's sight distance. a float variable to be assigned via Inspector panel. but it doesn't display. i just use float and Color variable before.
BTW, it seems appeared beause of custom editor.
it works well when i'm not use custom editor.
Your answer
Follow this Question
Related Questions
Custom editor struggle - "Invalid iteration - (You need to stop calling Next when it returns false)" 0 Answers
Custom Inspector for an array of a serialized class 0 Answers
Select object by selecting gizmo or handle? 1 Answer
Make hidden gizmos invisible 0 Answers
Component on SceneView camera has wrong gameObject In OnDrawGizmos. 0 Answers