Hi, I’d like to customize the TimeSynthComponent. What’s the best way? I tried sub-classing it (Content Browser->Engine C++ Classes->Create Derived…), but got a bunch of compiler errors for private members. I’m using the 4.24.3 binary from the EpicLauncher on Windows.
#include "CoreMinimal.h"
#include "TimeSynthComponent.h"
#include "BeatDropTimeSynthComponent.generated.h"
/**
*
*/
UCLASS()
class WEDROPPINUPS_API UBeatDropTimeSynthComponent : public UTimeSynthComponent
{
GENERATED_BODY()
};
>Using Visual Studio 2017 14.16.27034 toolchain (C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023) and Windows 10.0.17763.0 SDK (C:\Program Files (x86)\Windows Kits\10).
2>Building 5 actions with 12 processes...
2> [1/5] BeatDropTimeSynthComponent.cpp
2>c:\unreal projects\wedroppinups\source\wedroppinups\BeatDropTimeSynthComponent.h(17): error C4624: 'UBeatDropTimeSynthComponent': destructor was implicitly defined as deleted
2>c:\unreal projects\wedroppinups\source\wedroppinups\BeatDropTimeSynthComponent.h(17): error C2282: 'UBeatDropTimeSynthComponent::~UBeatDropTimeSynthComponent' cannot override 'UTimeSynthComponent::~UTimeSynthComponent'
2> C:\Program Files\Epic Games\UE_4.24\Engine\Plugins\Runtime\TimeSynth\Source\TimeSynth\Classes\TimeSynthComponent.h(426): note: 'UTimeSynthComponent::~UTimeSynthComponent' is not deleted
2>c:\unreal projects\wedroppinups\source\wedroppinups\BeatDropTimeSynthComponent.h(15): error C2248: 'UTimeSynthComponent::UTimeSynthComponent': cannot access private member declared in class 'UTimeSynthComponent'
...
My game needs to Start/Stop the beat and music from game events to work, so I’d like to add a “NumFramesOffset” to PlayClip()'s parameters and StopClips()'s return value.
My plan was to start around here by copy/pasting PlayClip() to PlayClipOffset(). Is there a better place to start?
If I can’t subclass UTimeSynthComponent, then my options seem to be: a) hack the plugin source or b) fork a plugin copy.
Any advice?
Thank you!
Michael