Look at the VMT methods. They're a huge help. You can find the offset to the GetObjectName() method inside the LUA functions. Just go look in IDA and you'll see something like "call eax", this is nearly always a VMT function(it reads basePtr and adds something to it, then calls eax).
EDIT: Sadly, I just looked at the UnitName() lua function, and it doesn't seem to use the vmtBUT it does have the function to retrieve object names(you just have to follow the correct series of jumps to find it). I'm sure it shows unit names and player names, but I'm a little lazy.