The fourth version. Professionalized, adjusted for debugging. Author: Tomasz Zackiewicz (Unity Forum ID: Tomza, Email: pogtoma@gmail.com).