Legacy Documentation: Version 5.1
LanguageEnglish
  • C#
  • JS

Script language

Select your preferred scripting language. All code snippets will be displayed in this language.

Gizmos.DrawSphere

Switch to Manual
public static function DrawSphere(center: Vector3, radius: float): void;

Parameters

Description

Draws a solid sphere with center and radius.

	function OnDrawGizmosSelected () {
		// Draw a yellow sphere at the transform's position
		Gizmos.color = Color.yellow;
		Gizmos.DrawSphere (transform.position, 1);
	}