Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Method is asking for FName of a Component, what should I put in?

Hey All!

I'm currently using the Cable Component for my project, and am trying to use the SetAttachEndTo method in my code.


The method requires two parameters: an AActor and an FName that is the name of the component to attach to.

I am stuck in that I am not sure what to put for the FName of the component I would like to attach to, I.E. the root component of my input Actor. Anyone have any experience with this type of parameter?

Product Version: UE 4.8
more ▼

asked Jul 17 '15 at 03:21 AM in C++ Programming

avatar image

6 3 3

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

2 answers: sort voted first

Every component attached to an actor in the world will have an FName. To get the root component's FName, use the method GetDefaultSceneRootVariableName(). So your final code might look something like:

 MyCable->SetAttachEndTo(this, RootComponent->GetDefaultSceneRootVariableName());

For more on FNames, and how they are different from normal strings, check out this documentation page: FName | Unreal Engine

more ▼

answered Oct 26 '16 at 08:12 PM

avatar image

11 1 2 4

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

,I am having a lot of problems with this function, it simply does not work, no matter witch actor I provide or what FName, I spawned in c++ a CableActor and tried, do not work, verstion 4.21.2

more ▼

answered Mar 20 '19 at 04:43 PM

avatar image

Daniel Ocheda
26 3

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question