So after looking around the forums more, after a few google searches I managed to find someone else who had the same issue as me using the code that is supplied.
This solution appears to have solved the unity hanging but I do have a CHANNEL_STOLEN error come up which I will continue to investigate.