UISlider.Init C# (CSharp) Method

Init() public method

Initialize the cached values.
public Init ( ) : void
return void
	void Init ()
	{
		mInitDone = true;

		if (foreground != null)
		{
			mFGWidget = foreground.GetComponent<UIWidget>();
			mFGFilled = (mFGWidget != null) ? mFGWidget as UISprite : null;
			mFGTrans = foreground.transform;
			if (mSize == Vector2.zero) mSize = foreground.localScale;
		}
		else if (mCol != null)
		{
			if (mSize == Vector2.zero) mSize = mCol.size;
		}
		else
		{
			Debug.LogWarning("UISlider expected to find a foreground object or a box collider to work with", this);
		}
	}