mirror of
https://github.com/storytold/UE4-OSC.git
synced 2026-10-19 07:43:22 +00:00
can bind OSC message to game inputs
This commit is contained in:
@@ -1,10 +1,11 @@
|
||||
// Copyright 1998-2014 Epic Games, Inc. All Rights Reserved.
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <utility>
|
||||
#include "OscSettings.generated.h"
|
||||
|
||||
class OscReceiverInputKey;
|
||||
class UOscDispatcher;
|
||||
|
||||
|
||||
UCLASS(config=Engine)
|
||||
class UOscSettings : public UObject
|
||||
@@ -27,11 +28,24 @@ public:
|
||||
UPROPERTY(Config, EditAnywhere, Category=Send)
|
||||
TArray<FString> SendTargets;
|
||||
|
||||
/**
|
||||
* List of the messages treated as inputs.
|
||||
*
|
||||
* Every entry adds a key in the input mapping project setting.
|
||||
* e.g. "/position/x" -> "OSC_position_x"
|
||||
*/
|
||||
UPROPERTY(Config, EditAnywhere, Category=Input)
|
||||
TArray<FString> Inputs;
|
||||
|
||||
public:
|
||||
void UpdateSendAddresses();
|
||||
|
||||
void Send(const uint8 *buffer, int32 length, int32 targetIndex);
|
||||
|
||||
void ClearKeyInputs(UOscDispatcher & dispatcher);
|
||||
|
||||
void UpdateKeyInputs(UOscDispatcher & dispatcher);
|
||||
|
||||
public:
|
||||
|
||||
/**
|
||||
@@ -43,4 +57,5 @@ public:
|
||||
private:
|
||||
TSharedRef<FSocket> _sendSocket;
|
||||
TArray<std::pair<FString, TSharedRef<FInternetAddr>>> _sendAddresses;
|
||||
TArray<OscReceiverInputKey> _keyReceivers;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user