I'm trying to find the earliest event in which I can use "player" as a UnitID in UnitGUID("player"). I've tried Player_Entering_World and Player_login as well as having it on a frame's OnLoad script function, and all of them return nil on login.
As it works fine every time on any of them with a UI reload (which I'm presuming is because on a reload the character already exists) I'm guessing it's because on Entering_World and Login, the unit probably doesn't exist yet.
The reason for wanting it at the start is I would like to set 2 variables for a lower and upper For loop based on the characters class and I only want to check it the once on logging in.
Thanks for any help,