2018년 9월 28일 금요일

UE4 - Details Panel Customization.

Hello, for a while now I’ve been trying to customize my Details panel.

I’ve been following this guide(official unreal engine youtube) but am having some troubles.

I’ve created the custom class that extends IDetailCustomization (Note, it compiles fine, ignore the error underlines).

I’ve binded it in my GameInstance constructor. (I’ve also tried putting this in other class constructors)

But my struct is unchanged in the UE4 editor. (My struct shown below)

My understanding is that the UE4 editor category should have been changed to read ‘Extra info’, with some extra stuff added. But nothing has changed.

I know I’m doing something wrong but can’t figure out what, as there isn’t a lot of documentation on it, and what’s there is quite vague.



Answer - 1

This led me to believe that IDetailCustomization works for Structs as well, and is more powerful. But I supposed that’s for classes only?

For my dialogue system there’s really only 3 things I want to achieve.

  1. Hide/Show properties based on a selected Enum.
  2. Put properties next to each other, possible reduce their width.
  3. If possible, remove the dropdowns from Arrays, and just list the elements under each other.

(An NPC could have up to 50 messages, so it would be ideal if each one didn’t take up half the screen lol.)

Would IPropertyTypeCustomization allow these things? And if you have any other tips they’re be appreciated, as this is all new to me.


Answer - 2

Okay so no matter what I do, I still can’t get it to affect anything, despite hours and hours of trying different things, google searches, etc.

I’ve got the module in and working (displays a Log at startup)

I’ve created a class that extends IPropertyTypeCustomization, with the name FDMsgCustomization (Struct name + Cusomization).
100% of the ‘CustomizeHeader(…)’ code shown in the guide causes errors, so instead I just put a log to see if it’s actually executing.

I then implemented it in my KnightsQuestEditor module’s cpp like so:

Managed to get it compiling without errors, but no logs ever appear in unreal, thus it’s probably not executing.

I read in an Answers post somewhere that you need to put your ‘AKNIGHTSQUEST_API’ in front of the struct, but doing so also did nothing. :frowning:

Edit: Then I see stuff like this
https://answers.unrealengine.com/questions/274213/customize-detail-panel-default.html
Looks like his struct is within the customization class. Does it have to be in there?


출처 : [언리얼엔진포럼] https://forums.unrealengine.com/t/help-with-details-panel-customization/76425/7

Compiler error C4430: missing type specifier - int assumed [duplicate]

Compiler error C4430: missing type specifier - int assumed [duplicate]


C++ 기초 에러.

I have this error:
"error C4430: missing type specifier - int assumed. Note: C++ does not support default-int"
with this code example :
//A.h    
#include "B.h"
class A{
    B* b;
    ..
};

//B.h
#include "A.h"
class B{ 
    A* a; // error error C4430: missing type specifier - int assumed.
}

This is a circular dependency issue. For declaring a pointer to some class, the definition of the class is not needed; i.e. the type doesn't have to be a complete type. So you don't need to include A.h in B.hforward declaration is enough. Such as:
//B.h
class A; // change the include of A.h to forward declaration
class B { 
    A* a;
};


아마 서로를 참조하고 있어서 함수로 따지면 무한루프? 형식으 에러를 내주는거 같음. ( 내피셜... )

저렇게 사용해야 할 경우 헤더 포함하는것 보단 사용할 클래스만 선언해서 사용해주는게 좋다. ( 헤더에서 선언해줘야 할 경우 )

출처 - https://stackoverflow.com/questions/23283080/compiler-error-c4430-missing-type-specifier-int-assumed

스택오버버플로우

2018년 9월 20일 목요일

C++ Plugin Based State Machine: Game Code | 01 | Live Training | Unreal Engine

언리얼 엔진으로 플러그인으로 툴만들때 참고 영상.

영상: https://www.youtube.com/watch?v=hr9ybCCPw9Y&t=7042s
출처 : UnrealEngine