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 use the SkeletalMesh User Asset Data

I would like to associate a string with each of my meshes.

I found the Asset User Data which sounded like it would do the job. I can add elements to the collection but I cannot edit the elements. Each element is read only and set to 'None'

Is there anyway to edit these in the editor.

Thanks

alt text

Product Version: UE 4.9
Tags:
sm.png (9.2 kB)
more ▼

asked Oct 27 '15 at 04:52 PM in Using UE4

avatar image

TheZMan
86 6 9 12

(comments are locked)
10|2000 characters needed characters left

2 answers: sort voted first

Quite some time has passed, but I'll post a solution here for anybody who stumbles upon this page in the future.

You'll need to create a subclass of UAssetUserData to hold any properties you'd like to store. If you add the 'EditInlineNew' class specifier to your subclass, you'll be able to create a new instance of the class within the dropdown menu pictured and modify the properties within the editor.

more ▼

answered Apr 05 '16 at 08:09 PM

avatar image

Cody.Albert STAFF
126 5 2 1

(comments are locked)
10|2000 characters needed characters left

I tried and tried to get something to work with this, but in the end I was unsuccessful. No matter what I tried (creating a sub-class of UAssetUserData in c++, etc) this element won't populate, it doesn't want any sub-class.

I ended up just adding an array of ints (which I needed for material reference purposes) directly to USkeletalMesh. What sucks is that with every release, I'll have to re-add that parameter. But it is what it is, one line of code, no big deal.

If anyone has any way to use this property, I'd love to know.

more ▼

answered Mar 01 '16 at 05:04 PM

avatar image

devlyn811
344 17 16 33

avatar image VictorSoulbound Dec 06 '18 at 07:51 PM

Necro, but this was partially helpful for me, with an additional note. I created a simple code plugin, added a header:

 UCLASS(BlueprintType, editinlinenew, meta = (ScriptName = "PropUserData", DisplayName = "Prop User Data"))
 class YOUR_API UPropAssetUserData : public UAssetUserData
 {
     GENERATED_BODY()
 
 public:
     UPROPERTY(EditAnywhere, Category = "Prop User Data")
     FString MyVariable;
 };

The important elements for me were:

  • UClass flag BlueprintType for it to show up in-editor

  • UClass flag editinlinenew for it to editable at all, since the user asset arrays seem to always be 'instanced'

  • UProperty flag EditAnywhere for the actual property to be editable in places like the static mesh UI.

Once the plugin was loaded ,the dropdown included the 'PropUserData' option, and expanding it let me edit my variable(s).

(comments are locked)
10|2000 characters needed characters left
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