UE5 Slate类的基础创建
创建一个slate类的基础代码
#pragma once class SCustomDetailPlane : public SCompoundWidget { SLATE_BEGIN_ARGS(SCustomDetailPlane) { } SLATE_END_ARGS() public: SCustomDetailPlane(); ~SCustomDetailPlane(); void Construct(const FArguments& InArgs); };
*************************
#include "CustomDetailPlane.h" SCustomDetailPlane::SCustomDetailPlane() { } SCustomDetailPlane::~SCustomDetailPlane() { } void SCustomDetailPlane::Construct(const FArguments& InArgs) { }
/
然后这个类中你想创建什么控件就添加什么类型的控件