I have a unitid provided by the unit created callback. I then grab the unitdef from the Unit interface.
Code: Select all
unitdef = Unit.getDef( unitid )
So here's the question. How can I take that list of unitdefids and obtain each corresponding unitdef? I tried doing so in a round-about manner as follows, as I've not found a more direct route to obtain the information.
Code: Select all
name = UnitDef.getName( unitdefid )
UnitDef.getUnitDefByName( name )
Shouldn't there be a UnitDef.getDef( unitdefid ) method or equivalent? Seems like there should be a very straight forward method for obtaining a unitdef by its given unitdefid. Seems like an obvious bit of functionality, which makes me think I'm overlooking something.
I think I'm stuck unless someone can straighten me out. Which wouldn't be the first time I needed straightening out.

--
I edit the message. I provided some clarifications which may have been confusing if careful attention was not given. Please re-read.