I added SpringArmComponent in my character. But I can't assign values to variables.
I have already used #include "GameFramework/SpringArmComponent.h" and #include "Camera/CameraComponent.h".
What am I doing wrong?
You are doing nothing wrong. The project will actually compile. Those errors are from intellisense because of a bug introduced with unreal 4.20. The bug is already fixed and the fix will be available with 4.20.2 hotfix.
In the meantime you can use the workaround I've posted here: https://answers.unrealengine.com/questions/810626/vs-cannot-find-generatedh-files.html
It will only fix your code related intellisense errors. It won't fix the engine ones but will let you work a little bit more comfortable.
Follow this question
Once you sign in you will be able to subscribe for any updates here