In real life the oil warning light indicates low oil pressure.
The cars manual will tell you to check oil level and fill if oil is low, it also says if the light stays on after filling, get it checked.
Low oil is only one problem it senses. It also could be an indication of a broken oil pump, loss of compression, faulty pressure switch and a lot more things.
It is not a low oil level sensor, the light can be on even if oil is the correct level, something else is then causing the low pressure warning.