I’m writing a custom LiveLink plugin based on JSONLiveLink, and I’ve manually re-written a lot of the plug-in by hand copying the code because I’m renaming the plug-in and want the classes to reflect the narrower scope of the JSON that it can properly read from, and in the SourceFactory class I get errors in the CreateSource and OnOkClicked functions.
Where in the original code in CreateSource it has
return MakeShared<FJSONLiveLinkSource>(DeviceEndpoint);
and works fine, in my code
return MakeShared<FMyLiveLinkSource>(DeviceEndpoint);
gives me a ‘No suitable user-defined conversion from TSharedRef<FMyLiveLinkSource, ESPMode::ThreadSafe> to TSharedPtr<ILiveLinkSource, ESPMode::ThreadSafe>’ error.
I get more or less the same thing in OnOkClicked with the ExecuteIfBound call.
The constructor for FMyLiveLinkSource is identical to the constructor for FJSONLiveLinkSource, and FMyLiveLinkSource inherits from ILiveLinkSource exactly like FJSONLiveLinkSource does, but for some reason the compiler is treating it differently and I can’t figure out why.
(as a side note, it is super annoying that I wasn’t able to create a class deriving from ILiveLinkSource via the Make C++ Class menu.)