Error trying to use runtime mesh component(from a plugin)

Break on that line…see what items are invalid.

I would guess that your ‘mesh’ is null.