Wall/Ledge Climbing using RayCasts in Unity Developed by JoshGn. This hopefully helps you understand some mechanics of ledge climbing. All the best with your R&D.
Code walkthtough can be found at 'https://www.youtube.com/watch?v=AOUeUY4q1uQ&list=PLv08NhLrgtDFn32mXCKCXieR3D_fchxS_'