public virtual float?

Hi everyone ! I was just looking at the detonator.cs code from the explosion framework http://unity3d.com/support/resources/unity-extensions/explosion-framework.

Inside it you’ll find an abstract class called DetonatorComponent wich has what it looks like virtual variables, things like public virtual bool on = true; or public virtual float startDuration = 2f; anyone knows what they are or means? I couldn’t find anything in microsoft documentation.

public abstract class DetonatorComponent : MonoBehaviour
{
	public virtual bool on = true;
	public virtual bool detonatorControlled = true;
	
	 [HideInInspector] 
	public virtual float startSize = 1f;
    public virtual float size = 1f;
	
    public virtual float explodeDelayMin = 0f;
    public virtual float explodeDelayMax = 0f;

	[HideInInspector]  
	public virtual float startDuration = 2f;
	public virtual float duration = 2f;
	
	[HideInInspector]
	public virtual float timeScale = 1f;
	
	 [HideInInspector] 
	public virtual float startDetail = 1f;
	public virtual float detail = 1f;
	
	 [HideInInspector] 
	public virtual Color startColor = Color.white;
	public virtual Color color = Color.white;
	
	[HideInInspector]
	public virtual Vector3 startLocalPosition = Vector3.zero;
	public virtual Vector3 localPosition = Vector3.zero;
	
	public virtual Vector3 force = Vector3.zero;

    public abstract void Explode();
	
	//The main Detonator calls this instead of using Awake() or Start() on subcomponents
	//which ensures it happens when we want.
	public abstract void Init();
	
	public virtual float detailThreshold;

	/*
		This exists because Detonator makes relative changes
		to set values once the game is running, so we need to store their beginning
		values somewhere to calculate against. An improved design could probably
		avoid this.
	*/
	public void SetStartValues()
	{
		startSize = size;
		startDuration = duration;
		startDetail = detail;
		startColor = color;
		startLocalPosition = localPosition;
	}
	
	//implement functions to find the Detonator on this GO and get materials if they are defined
	public Detonator MyDetonator()
	{
		Detonator _myDetonator = GetComponent("Detonator") as Detonator;
		return _myDetonator;
	}
}

It was a mistake (and won’t work in Unity 3); remove all instances of the “virtual” keyword.

–Eric

Great, thanks.