Can I save gameobjects in scriptableobjects?

I’m trying to do a coingen, so, my idea is, when I pass through a coin another coin is generated in other position inside 4 points, well, I want to save a GameObject inside my scriptableobject to acces to the function CrearMoneda(), like:


but when in the inspector I try to put the gameobject CoinGen(Or another gameobject inside) in the scriptableobjects to acces on his script and use the function the inspector says “Type mismatch”

The problem here is that you save an active Scene Gameobject to a scriptable object, which is invalid, because it only exists in that specific scene at that specific time. What you can try is to save a non-specific identifier for the Gameobject and get it like that.