SetNativeMethod on GenerateFunc