SphereCollider.radius Manual     Reference     Scripting  
Scripting > Runtime Classes > SphereCollider
SphereCollider.radius

var radius : float

Description

The radius of the sphere, measured in the object's local space.

The sphere radius will be scaled by the transform's scale.

JavaScripts
collider.radius = 10;

using UnityEngine;
using System.Collections;

public class example : MonoBehaviour {
void Awake() {
collider.radius = 10;
}
}

import UnityEngine
import System.Collections

class example(MonoBehaviour):

def Awake():
collider.radius = 10