What are the differences between "unit" and "unitref"? As far as I can tell they're essentially the same, except that "unit" has significantly more native functions associated with it. Also, which is faster:
Unitrefs are used mostly as references in trigger events. Unitrefs have the advantage of being able to use different units while the unitref stays the same, for example when using a trigger event specific to that unit. You can use the UnitRefFromVariable (or something like that) function, which will cause the unitref to update based on the unit saved in the variable.
I have no idea what is faster, I would assume the difference is marginal and in most cases negligible.
What are the differences between "unit" and "unitref"? As far as I can tell they're essentially the same, except that "unit" has significantly more native functions associated with it. Also, which is faster:
unitA == unitB or unitrefA == unitrefB?
Unitrefs are used mostly as references in trigger events. Unitrefs have the advantage of being able to use different units while the unitref stays the same, for example when using a trigger event specific to that unit. You can use the UnitRefFromVariable (or something like that) function, which will cause the unitref to update based on the unit saved in the variable.
I have no idea what is faster, I would assume the difference is marginal and in most cases negligible.