FSupportedAreaData not exported

Currently, FSupportedAreaData is not marked as ENGINE_API and therefor it leads to an unresolved linker error when trying to use it.

Steps are easy to reproduce:

  1. Include Engine in your
    game/plugin/whatever module.build.cs (If it isn’t already there…)
  2. Attempt to create FSupportedAreaData instance.
  3. Get unresolved linker error.

Why should this be fixed:

  1. Creating custom navigation data is rather hard (impossible) without having the ability to add supported areas.

For example, in my current use case I’m deriving from AAbstractNavData to create a custom waypoint graph to be used by Flying AI. I’m fairly sure that adding SupportedAreas is something anyone trying to create custom NavigationData (without circumventing the navigation system entirely) is going to need.

Hey zacharymwade,

Could you provide the related code that you’re using to create your FSupportedAreaData instance so I can ensure we’re using the same setup?

Sure, no problem at all. The commented line throws the unresolved linker error.

AWaypointGraph::AWaypointGraph() 
{
	RuntimeGeneration = ERuntimeGenerationType::Static;

	if (HasAnyFlags(RF_ClassDefaultObject) == false)
	{
		FindPathImplementation = &FindPath;
		TestPathImplementation = &TestPath;

		FindHierarchicalPathImplementation = &FindHierarchialPath;
		TestHierarchicalPathImplementation = &TestHierarchialPath;

		RaycastImplementation = &Raycast;

		//SupportedAreas.Add(FSupportedAreaData(UNavArea_Default::StaticClass(), WAYPOINTGRAPH_DEFAULT_AREA));
	};
};

Thanks for providing the code.

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

Have a great day!