Returns the script name and line number where the region was created.
location = Region:GetSourceLocation()
- string - The script name and line number where the region was created.
- The returned string will be the script name and line number delimited with a colon, eg.
- For accurate script names the enableSourceLocationLookup console variable must be set to
1, otherwise the script name will always be "UnknownFile".
- For dynamically loaded scripts the script name portion will correspond to the
chunknameargument supplied to loadstring. If not supplied, this will typically expand to a leading portion of the script body.
- Texture and fontstring regions created through script APIs at-present report the source location of their initial parent frame, whereas those created statically in XML will be correct.
- Patch 9.2.5 (2022-05-31): Added.