Invalid floats in PlayerPrefs

I am attempting to save several floats to PlayerPrefs. For some reason, they all come out invalid DWORD Value. The ints and string save perfectly fine. What am I missing?

Here is some code:

public class CharacterGenerator : MonoBehaviour {
    private float _alignment;

void GenerateStats(){
_alignment=0f;
...
}
void OnGUI(){
if(GUI.Button (new Rect (392, 300, 100, 50), "Start Game")){
		
Debug.Log("Start Our Game!");
...
PlayerPrefs.SetFloat("Alignment:", _alignment);
...
}

Thanks!
Please forgive my noobness.

The Windows Registry is capable of storing binary data, using the RegSetValueEx function. It appears that Unity is setting a 64-bit binary value into a REG_DWORD key when storing floating point numbers. Regedit can’t deal with this, and shows “invalid DWORD”, but the data is still there and can be retrieved by Unity (using RegQueryValueEx).

You can see that the data is there in Regedit with right-click > Modify.

So everything’s fine, it just looks busted in Regedit. Microsoft problem.

Could this be related to the “:” in the name of the saved prefs?

You said that you have problems reading the value back. In your code you’re just writing it. Are you sure that you use GetFloat? By looking at the error i guess you use GetInt() instead…

copy & paste error?