VoiceInterface.h requires OnlineSubsystem.h

Everything is in the title.
Including VoiceInterface.h in your project won’t compile without including OnlineSubsystem.h first.
It fails at the line declaring a delegate:

DEFINE_ONLINE_DELEGATE_TWO_PARAM(OnPlayerTalkingStateChanged, TSharedRef<const FUniqueNetId>, bool);

Hey LNaej,

Make sure that you’ve uncommented the line below in your project’s Build.cs file:

	// Uncomment if you are using online features
	// PrivateDependencyModuleNames.Add("OnlineSubsystem");

That should take care of your issue, but let me know if it doesn’t and I’ll continue to investigate.

Thanks

It doesn’t solve it, it was already uncommented. :slight_smile:

I’ve reproduced the issue and have entered a bug report, which you can track using the link below:

Thanks for your report!

Have a great day

This is because I’ve violated the “include what you use” rule and not included OnlineDelegateMacros.h in that header file. If you would try adding that (or leaving OnlineSubsystem.h) as a workaround that would be appreciated.

I’ll make the changes and get it out in a new version of the engine.

No problem, I already use the workaround but as it did not seem to be a desired behavior I thought it would be good to signal it. :slight_smile: