Before our amazed eyes was a white unicorn.
Why is unicorn the subject of the sentence instead of eyes? It is because the preposition "before" that was placed in front of the words "amazed eyes"?
English Language Learners Stack Exchange is a question and answer site for speakers of other languages learning English. It only takes a minute to sign up.Sign up to join this community
Before our amazed eyes is a prepositional phrase. As you say, it's the use of before that determines this.
Your sentence is just an inverted version of the following:
[A white unicorn] was before our amazed eyes.
Changing the order of the components (in this way and in this sentence) doesn't change their syntactical roles.