Why we can’t reference the turret and the barrel in C++
I did some research but I found nothing. can you give me a resource/s to dive in?
Thanks in advance
Edit: I think I can get the reference of barrel and turret by adding a tag name to each and in C++ I can call GetComponents() then we need to filter it to get the components that have the exact tag name we set it in the Editor, am I right?
You can just use FindComponentByClass instead of GetComponents.
To be honest I’m not sure what Ben is talking about . I never liked the design of these classes. It’s far easier to just create the components in C++ with CreateDefaultSubobject, you don’t have to find components that way as they’re there on the tank class.
I searched again about soft-ref, but still struggling with it.
resources:
At 15:33
is Soft-Ref relate to C++ or UE4?
All I want is to know Why Ben DID NOT explain what they are? and Why did Ben mention Soft-Ref in the lecture?
→ SHOULD I WORRY ABOUT THEM? ←
AFTER SEARCHING, all I know is the soft-Ref is just a path or like a web address that is loaded without its value(they won’t exist in the memory), so I can call it whenever I need it. but Hard-Ref will load all its dependencies and it will exist in the level(they will exist in the memory). How does this relate to the lecture or Aiming Architecture?