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"

Probably UHT bug, while exposing Static Array[Enum::MAX] to BP

I've been trying to solve this problem for a while and i finally got the idea why it didn't work.

 **MyGameplayTypes.h**

 #pragma once
 #include "MyGameplayTypes.generated.h"

 UENUM(BlueprintType)
 enum class ETileType : uint8
 {
     Border,
     Hole,
     Neutral,
     Player,
     Enemy,
     MAX
 };

 **MyGameSettings.h**
 
 #pragma once
 
 #include "GameFramework/Actor.h"
 #include "MyGameplayTypes.h" //<-- THERE, project compiles fine without this include, but if i don't include this header, the array in BP show only numbers instead of enum names. It was also included in Main.h project file.

 #include "MyGameSettings.generated.h"
 
 UCLASS(Blueprintable)
 class BLABLA_API UMyGameSettings : public UObject
 {
     GENERATED_BODY()
     
 public:    
     UMyGameSettings(const FObjectInitializer& OI);
 
     UPROPERTY(EditAnywhere, Category = "GameSettings")
     UStaticMesh* TileMeshes[ETileType::MAX];
 };
Product Version: UE 4.14
Tags:
more ▼

asked Dec 15 '16 at 08:41 PM in Bug Reports

avatar image

ThePassenger
155 6 9 17

avatar image Sean L ♦♦ STAFF Dec 22 '16 at 03:40 PM

Hey ThePassenger,

Sorry for the delay. Are you still experiencing this issue? I haven't been able to reproduce the same behavior on my end, so if you could, please recreate the issue in a clean test project and provide me with a download so I can take a closer look.

Thanks

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

1 answer: sort voted first

Hey, strangely everything is fine in clean project, even now when i removed the include in the old project it works fine. Maybe it had something to do with the cached files or sth but i tried to clean, rebuild, removing files manually and nothing worked until i included the "types" header in "gamesettings" file.

more ▼

answered Dec 22 '16 at 06:04 PM

avatar image

ThePassenger
155 6 9 17

avatar image Sean L ♦♦ STAFF Dec 22 '16 at 07:15 PM

Glad to hear that it's working properly in a clean project. Let me know if the issue pops up again in the clean project and we can continue to investigate if needed, but since it's working in a clean project I do not believe that this issue is a bug at this time.

Thanks!

(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