I’d like why am I using Socket Name on the scope resolution because I don’t have any function or variable with this name and I couldn’t find anything about this.
USpringArmComponent::SocketName is static. It’s not really a “Socket” in the sense of static mesh/skeletal mesh sockets, you can look at the spring arm source to see how it’s used.
You can’t do the same for meshes, because the mesh will be null at the time of construction for the class-default object, it’s just an empty component with no mesh unless you also force a default mesh (which is a terrible idea). If you want to attach to sockets, you can wrap that code with something that protects against the CDO, such as:
Ive come across this before, but I have no issues so far when attaching my camera to the springarm just like any other component heirarchy. Is there some advantage to using sockets?
For some reason the SpringArmComponent actually just returns the end-of-arm position for all sockets, even the “None” one - so anything attached to it even if not using the static SocketName presumably is treated as if it was attached via the socket anyway.