• When userdata is registered, we can use the new operator to call the constructor function
local data = new RawData()
  • Now we can call registered functions on this object
  • And if the class has registered members or operators, you can also use them. CVector is a custom class as used in the implementation docs
local vec = new CVector()
vec.x = 15

vec = new CVector(40, 40, 40) + new CVector(2, 2, 2)