Unity. Some fields go to null on Play

I Mean those fields.

[SerializeField]
public Type gameStateType;

[SerializeField]
public IGameStateParams gameStateParams;

I made in Editor methods to set those fields up, but, when click Play they go null.

I can deal with Type(all supported by my system types stored in dictionary, so i can just use their ID to get Type), but not with IWhatever implemented instance.

Can it be solved?

If not, is there any way to store in scene game object any IWhatever implemented instance?

In short, Unity doesn’t serialise interfaces nor Type objects. You have to design your system differently. Also you might want to take a look at abstract classes for replacing interfaces, since these do in fact serialise.