UBC is accessible via transit from all over the Lower Mainland, but if you wish to stay overnight at UBC there are plenty of accommodations.
Gage Suites is an affordable option that is close to central campus