Hey! I’m trying to figure out what’s a problem here. I just created UPositionReport class like a subclass of UActorComponent without any additional logic and here is a strange error.
Cannot initialize object parameter of
type ‘UActorComponent’ with an
expression of type ‘UPositionReport’
Before this issue I had another one - SEARCH PATH in Xcode settings wasn’t configured correctly and I fixed it, but this issue remains.
Well, it’s the tutorial code from a learning course. The process is quite simple — create new component in the editor, then complete the generated boilerplate code with a couple lines. As I said previously, the code builds and works just fine (in my case, at least) — these warning messages are just an annoyance from an Xcode side. So I wonder is it because Xcode doesn’t get some pieces of code intel from Unreal and whether is it possible to fix this behaviour.
Oh that no clue than but happens in VS too (not that specific error though) but you can safly ignore it as long as it compiles you´re good to go.
(In VS all errors disapear after a restart, I assume because intellisense gets a refresh of the generated code, might be the same for Xcode but cant help you there since im only working on Windows)