Upgrading to PhysXVehicles plugin

Hi,
Let’s say I had a plugin upgrading the PhysX vehicles with some extra classes. Now with PhysX Vehicles as a plugin in 4.15, I have two questions:

  1. What is the best way to add more classes two the plugin, as I think a plugin loading a plugin is not the best behavior.
  2. How I should include the headers?
    In 4.14 I had,
    #include “Vehicles/WheeledVehicleMovementComponent.h”

It is this example a good way to call a plugin header or there is a better one?
#include “…/…/…/Plugins/Runtime/PhysXVehicles/Source/PhysXVehicles/Public/WheeledVehicleMovementComponent.h”

Thank you!!

EDIT:
Added “PhysXVehicleLib” to my .cs file under, PublicDependencyModuleNames and PrivateDependencyModuleNames and it works now. But will be great to know if
#include “…/…/…/Plugins/Runtime/PhysXVehicles/Source/PhysXVehicles/Public/WheeledVehicleMovementComponent.h”
is a good way to call the header.

Thanks again!

You should probablly rename the title “Upgrading to PhysXVehicles plugin” as it sounds now, it sounds like you want the plugin updated, and not that your updating to the plugin.

Thank you very much for the correction :slight_smile:

Also it seems like something is broken in UnrealBuildTool.exe, as it points to the correct include search path, so you should be able to use just #include “WheeledVehicleMovementComponent.h” but when ubt is compiled it can’t find those files even though the include search path is set.

I got it working, just wanted to know about the best way to use it.
You should add the library to your build.cs file:

PublicDependencyModuleNames.AddRange(
			new string[]
			{
                ...,
                "PhysXVehicleLib"
			}
			);
			
		
		PrivateDependencyModuleNames.AddRange(
			new string[]
			{
                ...,
                "PhysXVehicleLib"	
			}
			);

In your projects ${ProjectNamd}.Build.cs change PhysXVehiclesLib to PhysXVehicles, and in your source/header files remove any reference to Vehicles/ in your inclusions. So

#include "Vehicles/WheeledVehicleMovementComponent.h"

now becomes

#include "WheeledVehicleMovementComponent.h"

UnrealBuildTools.exe points to the correct include search paths, but you need to point to the correct module name for it to linkage and passing include paths to the compiler.

Also its Plugin not pluging

On a funny side note, had you created a new Advanced Vehicle project it would have showed you what you needed to add in the *.Build.cs file.