DrawSphere(Vector3, float)
Draws a solid sphere with center and radius.
Read time 1 minuteLast updated 4 days ago
Definition
- Type: Method
- Namespace: UnityEngine
- Assembly: UnityEngine.CoreModule
public static void DrawSphere(Vector3 center, float radius)
Parameters
Examples
using UnityEngine;using System.Collections;public class ExampleClass : MonoBehaviour{ void OnDrawGizmosSelected() { // Draw a yellow sphere at the transform's position Gizmos.color = Color.yellow; Gizmos.DrawSphere(transform.position, 1); }}