No, patents are typically not obtained before a prototype is developed. Creating a prototype allows for refining the design and proving the concept works, both beneficial for a successful patent application. However, some form of provisional patent application can be made to protect your invention during development.