Carry information from runtime back to editor

I have a gameobject that uses a seed to create a random generator at runtime.

It’s relatively easy to make an inspector that allows the designer to set the seed before playing the game. I just tag the gameobject as [ExecuteInEditor] and set the seed from the inspector code.

By default the gameobject creates its own seed at runtime. I can report the seed from the inspector at runtime, but if the designer quits the play session, both the inspector and the gameobject are recreated, so I have no way of reporting the seed of the play session “just gone”.

Is there any key-value store anywhere that persists between the editor and play sessions that can transmit data back to the editor? Or is there another viable method for doing this?

PlayModePersist Version 2.0 is now available for download in the Unity Asset Store - PlayModePersist | Utilities Tools | Unity Asset Store.