- Home /
Question by
Waffle Dragon · Apr 29, 2014 at 02:09 AM ·
errordrawgizmosgizmo
Console error when trying to use gizmos?
I'm getting these errors in the console and I can't figure out why.
"error CS0117: Gizmos' does not contain a definition for
color'" and
"error CS0117: Gizmos' does not contain a definition for
DrawWireSphere'"
everything in my code looks right though.
using UnityEngine;
using System.Collections;
public class Gizmos : MonoBehaviour {
public float gizmoSize = 0.75f;
public Color gizmoColor = Color.yellow;
void OnDrawGizmosSelected() {
Gizmos.color = gizmoColor;
Gizmos.DrawWireSphere (transform.position, gizmoSize);
}
}
Comment
Best Answer
Answer by getyour411 · Apr 29, 2014 at 02:22 AM
Try using a class name besides Gizmos, I think that's the actual name of the Gizmos class for Unity
Wow, i made exactly the same mistake! Was already going crazy for this... Thanks very much!
Your answer
Follow this Question
Related Questions
How to draw a Sprite on OnDrawGizmos() 0 Answers
Draw 4 points around object 1 Answer
Gizmo disappeared when custom editor 0 Answers
Custom inspector draw Gizmos 0 Answers