As for the question of Mahayana view on this question, the relevant school is Yogacara, also called Cittamattra (Mind Only), which according to some interpretations taught that the world is a kind of a collective projection and the Mind is primary in some sense.