Создал новый Blueprint Function Library class.
В .cpp добавил:
Код:
#include <XInput.h>
#pragma region Method Calls
// Calls the method XInputVibration that was imported from the DLL.
void UALLInput::XInputVibration(int32 DeviceIndex, float leftMotor, float rightMotor)
{
// Create a new Vibraton
XINPUT_VIBRATION Vibration;
int leftVib = (int)(leftMotor*65535.0f);
int rightVib = (int)(rightMotor*65535.0f);
// Set the Vibration Values
Vibration.wLeftMotorSpeed = leftVib;
Vibration.wRightMotorSpeed = rightVib;
// Vibrate the controller
XInputSetState(DeviceIndex, &Vibration);
}
#pragma endregion Method Calls
В .h Добавил:
Код:
UFUNCTION(BlueprintCallable, Category = "XInput Library")
static void XInputVibration(int32 DeviceIndex, float leftMotor, float rightMotor);
Жму на компиляцию. Ошибок в строчках кода не находит.
Но компиляция не проходит. Пишет что то типа модуль не собирается.
Почему так? Не подскажете куда копать? Как правильно подключать дополнительные .h?