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"

Procedurally generated components randomly reattaching after BeginPlay()

Hello,

I'm having an odd Issue with procedurally generated components(see also this): when i press play in the editor, the attachments get rearranged randomly, resulting in odd behaviour. once every few plays however it just works fine.

Help is, as always, appreciated.

Product Version: UE 4.9
Tags:
more ▼

asked Aug 31 '15 at 09:19 PM in C++ Programming

avatar image

Baribal
36 4 3 11

avatar image mrooney Aug 31 '15 at 10:12 PM

What do you mean the attachments get rearranged? Like they are attaching to different things than the thing you are trying to attach it to?

Could you copy your attaching code with renamed variables/classes if you can't share it and then say what your expected result and actual results are?

avatar image Baribal Aug 31 '15 at 10:21 PM

Yes. I havn't checked wether some child components disappear, but there are definitely some components that don't have any children anymore at all(They should all have 6) and there are some, that have children of another parent component. After creation in the editor everything is fine, but as soon as i press play they go crazy

This is my attachment code:

  tmpComponent = NewObject<UCV_CubeComponent>(this);
  tmpComponent->AttachTo(RootComponent);
  tmpComponent->RegisterComponent();

Note that these components are NOT UProperty components. They are procedurally generated and referenced in an array. I don't really think that this should be a problem.

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

1 answer: sort voted first

Solved it.

I had not given my components unique names. i gues it might have mesed with serialization somehow.

SOLUTION: Always give your components unique names.

more ▼

answered Sep 01 '15 at 10:11 AM

avatar image

Baribal
36 4 3 11

(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