here is the colorpicker code i am using,
if (GUI.RepeatButton(new Rect(xxx, yyy, xxx, yyy), colorPicker, GUI.skin.GetStyle("ColorPickerStyle"))) {
Vector2 pickpos = Event.current.mousePosition;
Vector2 coords = new Vector2((pickpos.x - xxx) / xxx, -(pickpos.y - yyy) / yyy);
Color color = colorPicker.GetPixelBilinear(coords.x, coords.y);
_headMaterial.SetColor ("_Color",col);
}
and use GameSettings2.SaveColor( col );
and this is what i am trying to do to save
and load from gamesettings script,
public static String SaveColor( string col ) {
PlayerPrefs.SetString( "col", Color );
}
public static String LoadColor() {
return PlayerPrefs.GetString( "col", Color );
}
and my error, currently anyways, is
Assets/_Scripts/_Items/GameSettings2.cs(87,37): error CS0161: `GameSettings2.SaveColor(string)': not all code paths return a value
so what am i doing wrong? cause i am failing to truly understand what i am really doing lool i cant seem to get it to work, though choosing the color etc, works fine, i might not have fully translated java to c#? any help or straight forward fix would be grand, thank you!!