How can I know previously loaded level?

I am trying to get some way to know previously loaded level but, in vain so far. My main goal is to have different functions/behavious depending on previous level.

For example; if I am from levelA to levelD Character should appear somewhere, and if I am from levelB to levelD he should appear somewhere else.

I can have loaded level information with Application.loadedLevel, Application.loadedLevelName and OnLevelWasLoaded (level : int) [level being the index number of that scene given in the Build Settings]. But, but, but I need to know which level I am coming from.

store it in a static variable on a manager for example. that way it will not be touched in any form by loadlevel

I could not quite understand “on a manager” part. I have seen an object of type ScriptableObject. Documentation says it is generally used for storing data, but I did not manage to use it. Does that have anything to do with the thing you mentioned? If no, how does one use that ScriptableObject thing?