Gizmos won’t show up?

Problem:
You are using OnDrawGizmos to use DrawCube, but your cubes aren’t showing up.

Example:
using UnityEngine;
using System.Collections;

public class SpawnPoint : MonoBehaviour {

public void OnDrawGizmos(){
Gizmos.DrawCube(transform.position, new Vector3(2,2,2));
}
}

Solution:

There are many causes to this, but here’s one that is often overlooked. OnDrawGizmos is case sensitive. Make sure it’s OnDrawGizmos and not onDrawGizmos.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: