Unity 3: Content Offset not working in GUIStyle

In Unity 3 beta 7 I’m trying to style a horizonal slider thumb and can’t seem to get the content offset to work. Neither in the GUI nor in the code:

using UnityEngine; 
using System.Collections; 


public class GUIMenu : MonoBehaviour { 

	public GUIStyle horizontalSlider;
	public GUIStyle horizontalSliderThumb;
	


	float hSliderValue = 1.0f;

	void OnGUI() {
		
		Vector2 offset = horizontalSliderThumb.contentOffset; 
		offset.x = 50.0f; 
		offset.y = 50.0f; 
		
		horizontalSliderThumb.contentOffset = offset;
		
      Rect slider = new Rect (50, 30, 214, 30);
      hSliderValue  = GUI.HorizontalSlider(slider,hSliderValue,1.0f,100.0f,horizontalSlider,horizontalSliderThumb);
	}

}

Am I missing something?

Hi,

Just my guess here: maybe it’s that thumb does not have “content”, try padding and margin. Also you could try creating GUI skin and doing it there.