private void SetInitialState() { if (persistentData.Exists(id, "main")) { if (persistentData.GetData(id, "main")) { component.TrueState(); } else { component.FalseState(); } } else { persistentData.RegisterValue(id, "main", startingState); } }