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"

Set, structs and rotators: weird behaviour?

I have been having a little problem with the sets in Unreal Engine 4.15.3 (Using blueprints) I was creating a set of structs for use in some experiments I was doing, when I encountered an odd issue with structs that contain rotators. I found that after adding a rotator to one of my structs all sets that contained that struct broke. I then set out to try to recreate the issue and found the following:

  • Sets of rotators don't seem to work - changing a set type to a rotator clears the set and returns it to a normal rotator variable

  • Sets of structs that contain rotators also won't allow me to make a set of them. Changing the struct to add a rotator to it will then create compile errors on any blueprint that has a set of that struct.

  • Structs that contain a different struct that contains a rotator does seem to allow sets? At least I haven't got it to break with that yet

When changing a set to a struct that contains a rotator, or selecting a rotator directly the following error appears and the variable gets changed to a normal variable instead of a struct. Error:

container type cleared because 'RotatorStruc Structure' does not have a GetHashType function. Maps and sets require hash functions to insert and find elements.

My question(s) are the following:

  • Why does it do this? is there something I dont know about sets that gives this kind of behaviour.

  • Why do rotators that break it? I haven't tested it with every different variable type so there may be more, I think I got it to break with one of the built in structs as well. Is there anything I should steer clear of using with sets?

  • What is be best way arround this? Nesting the rotators in a separate struct prevented the compile errors but will this create additional issues?

  • Is there any proper documentation on sets (documentation on maps would be nice as well)? I tried searching for something but couldn't really find anything in the unreal wiki. This behaviour seems a little random and I am concerned that attempting to build my system using sets may run into issues without knowing what is going on. Sets and maps are ideal for what I am building and I am concerned that I will keep running into issues if I can't check documentation to work out what their behaviour

  • Is this a bug or a feature?

Sets seem to be ideal for what I want especially with the set union feature but I ideally need rotators. Till I get an answer I will be experimenting with workarounds but without any documentation to go off I may be unable to work out a good solution.

Product Version: UE 4.15
more ▼

asked Jun 17 '17 at 04:05 PM in Blueprint Scripting

avatar image

23 1 5

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

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