The Mahayana philosophy of Yogacara (Sanskrit, "application of yoga") teaches that the reality we think we perceive does not exist except as as a process of knowing. Phenomena, anything that can be experienced, have no reality in themselves. At the same time, there is no "experiencer" who experiences except as a process of mind.
If there is no experiencer and nothing to experience, how can anything seem to be? What is it that knows? This "knowing" is explained by alaya-vijnana, "store consciousness," which is a function of the fifth skandha. Very briefly, it is in this "storehouse" that mental phenomena are tied together to create the deception of external existence.
Yogacara emerged in India in the 2nd or 3d century and reached its zenith in the 4th to 6th centuries. Originally it was a rival to the philosophy of Madhyamika, but eventually the two philosophies merged. Both philosophies were enormously influential in the development of Mahayana Buddhism.