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.DrawWireSphere

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

Parameters

Description

Draws a wireframe sphere with center and radius.

	var explosionRadius = 5.0;
	function OnDrawGizmosSelected () {
		// Display the explosion radius when selected
		Gizmos.color = Color.white;
		Gizmos.DrawWireSphere (transform.position, explosionRadius);
	}