Hi,
Can you give a use case? go ID's are usually required for custom editors, not within your games, but you might have a good reason to do so
currently, I would suggest you simply save the reference of the gameObject itself, this is totally fine, and not much different then referencing an int ( where actually, I am pretty sure internaly, Unity refers to GameObject using this ID indeed)
bye,
Jean