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"

TSubclassOf and TSoftClassPtr parameters becomes empty on rebuild project

Good day!

I've created custom UStaticMeshComponent called UGunComponent and there I have this:

 UPROPERTY(BlueprintReadWrite, EditAnywhere)
 TSoftClassPtr <class ABaseProjectile> ProjectileType;

I'm using this variable for spawning ABaseProjectile's. In blueprint editor I'm assigning to this variable desired ABaseProjectile and everything works fine. But when I'm trying to rebuild visual studio project - that variable becomes empty, like it was never assigned!

I tried use TSubclassOf but achieve same results. Maybe I've missed something?

Product Version: UE 4.20
Tags:
more ▼

asked Nov 02 '18 at 09:15 AM in C++ Programming

avatar image

yarpoplar
132 26 28 33

avatar image yarpoplar Nov 02 '18 at 09:29 AM

I noticed that it's applies only to UStaticMeshComponent. I created this variable in my custom APawn class and everything works fine, variables are stored after rebuild as it supposed to be. What's wrong with UStaticMeshComponent?

avatar image yarpoplar Nov 02 '18 at 09:48 AM

Don't know how, but I managed to fix it. I just removed my component and added it again. Why this is happens and what to do to not meet this bug again?

avatar image Shadowriver Nov 02 '18 at 04:06 PM

you hoy reloading when this occures?

(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