Using Data Assets in C++

Hello everyone, I have been trying to develop an AR App completely in C++, which requires an ARSessionConfig data asset to start an AR Session. I tried:

UARSessionConfig SessionConfig = UARSessionConfig();
UARSessionConfig* Ptr = &ARSession;
UARBlueprintLibrary::StartARSession(Ptr);

This doesn’t work as I keep getting an error with this message:

Error C2248: ‘UARSessionConfig::UARSessionConfig’ : cannot access private member declared in class ‘UARSessionConfig’

… note : see declaration of ‘UARSessionConfig::UARSessionConfig’

At this point I do not understand why this error occurs. The constructor of UARSessionConfig is defined as public:

Where did I make a mistake? I’d really appreciate your help. Thank you in advance.

Best regards

That is trying to call the copy constructor.

UARSessionConfig SessionConfig;

Would call the default constructor which is what you’re showing as being public.

Thank you!

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms