x

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"

How to create UPROPERTY that can select from available sockets

Hi Community!

I am looking into defining a Character class that will expose a property to blueprints to allow someone to defined which socket a weapon can be attached to.

One solution I see is to defined a member variable as such:

 UPROPERTY(EditDefaultsOnly, Category = "Equipment")
 FName PrimaryWeaponSocket;

This will work as I can use the FName to setup attachments. This is great an all but I would like to make this more user friend and provide a Dropdown list of available sockets. The idea is the PrimaryWeaponSocket property in the details pane will have a drop down of all sockets of the character static mesh, and the user would be able to select the socket they want. This behavior is exactly like how "Parent Socket" works in the Blueprint editor.

alt text

I went down the rabibit hole of looking into the source code and found where this custom details property is being created, but it doesn't appear to be reusable/not really sure how I can apply what's there into making it reusable. Does anyone know of any useful resources or advise on tackling this issue?

Product Version: UE 4.18
Tags:
sockets.png (52.9 kB)
more ▼

asked Jan 13 '18 at 05:58 PM in C++ Programming

avatar image

Impulse21
156 4 12 15

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

0 answers: sort voted first
Be the first one to answer this question
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