C++ equivalent to "expose on spawn"

In C++ you can call NewObject and set your variables or you can try this approach.