What does it mean exactly? Should I be calling Mesh.MarkDynamic every time before I call Mesh.SetVertices? Should I call it once upon mesh creation? Or should I not bother calling it at all?
As it says, before you start changing it. It’s a performance optimization for when you intend to continually update it. It doesn’t have to be immediately after you create it.
If you were to, say, create an asset from the mesh, it doesn’t save this flag. If you’re not doing that, ignore the comment.
Looking at the implementation of Mesh::Clear, it doesn’t seem to touch the m_IsDynamic field. I would assume that once you call Mesh::MarkDynamic, it is permanent for that instance.
Mesh::MarkDynamic is part of the Unity engine code, you unfortunately won’t see it in your IL2CPP output.
The code in my post is my own decompilation of the function that I made with the assistance of a disassembler (such as IDA, Ghidra, Binary Ninja, etc). Some versions of Unity come with unstripped PDB files which significantly improve the results you can get with those tools.
The alternative is to purchase a Unity source license if you want to see the real code, but those don’t come cheap.