Lore archive · Warcraft Wiki, 2023 dump
API Model SetModel
Last wiki revision 2023-08-19
Sets the model to display a certain mesh. Model:SetModel(asset [, noMip])
- asset: - The path to the meshfile you want to display.
- noMip:
- You will find most of the meshes that are shipped with the game inside of model.MPQ. Theoretically you may also load additional meshes provided through AddOns using this function, although there are almost no AddOns out there that make use of this technique at the time.
- Notice that WoW addresses its meshes with a .mdx ending, although they have a .m2 ending in the model.mpq. This is probably due to historical issues that emerged while the game was developed. A side effect of this function is that it seems to preload the specified mesh into some internal cache. When you're trying to load a mesh that's not shipped with the game, you'll might be forced to call a SetModel at startup or your mesh won't load at all.
MyModel:SetModel("Character\\NightElf\\Female\\NightElfFemale.mdx")
Source
https://warcraft.wiki.gg/wiki/API_Model_SetModel · retrieved 2023-11-13 · CC BY-SA 4.0
Converted from wikitext with templates, tables and images removed, so some sentences may be missing values.
This archive predates WoW: Forever. For collected gameplay facts see the Forever database. Search the archive.