Giter VIP home page Giter VIP logo

unrealwidgetgencode's Introduction

DeepL translation generated from Readme.jp 

日本語

UnrealWidgetGenCode

UnrealEngine sometimes needs to be implemented in C++ for UMG optimization.
However, UMG UI parts and animations cannot be accessed from the C++ side.
It takes time and effort to retrieve them from C++ using reflection, or to implement the setting process from the Blueprint side.
The goal of this plugin is to eliminate this implementation effort by generating code.

Example of code generation

UMGDesigner

BlueprintDesigner

Parts of UMG

Things that are registered in the hierarchy + things that are published as variables with IsVariable checked will be published as variables.

Animation

All the items prepared in the Animation tab will be published as variables.

Code generated on the C++ side

There are two types of generated code.
A Base class in which only member variables are defined and an Impl class for logic implementation are generated.
Since the logic code is deleted by re-generating, the code is divided into two types: the Base class and the Impl class, which may be deleted by re-generating.

Sample of Base class for defining variables

The following will generate a class with variable definitions.
The variables of TWeakObjectPtr are initialized by the Initialize function.
The reason why it is not written in UPROPERTY is because the variable names on the UMG side are covered.

UCLASS(meta = (WidgetGenBase, WidgetGen = "/Game/WBP_Test"))
class WIDGETGENCODE_API UWidgetGenBaseWBP_Test : public UMyUserWidget
{
	GENERATED_UCLASS_BODY()

public:	
	virtual bool Initialize() override;

public:	

	TWeakObjectPtr<UWidgetAnimation> NewAnimation_3;
	TWeakObjectPtr<UWidgetAnimation> NewAnimation_2;
	TWeakObjectPtr<UWidgetAnimation> NewAnimation;
	TWeakObjectPtr<UButton> Button_0;
	TWeakObjectPtr<UCheckBox> CheckBox_47;
	TWeakObjectPtr<UEditableTextBox> EditableTextBox_0;
	TWeakObjectPtr<UImage> Image_56;
	TWeakObjectPtr<USlider> Slider_24;
};

Sample Impl class for logic implementation

This is the code for the logic definition.
Implement your logic code here.

UCLASS(Blueprintable, meta = (WidgetGenImpl, WidgetGen = "/Game/WBP_Test"))
class WIDGETGENCODE_API UWidgetGenImplWBP_Test : public UWidgetGenBaseWBP_Test
{
	GENERATED_UCLASS_BODY()

public:	

};

unrealwidgetgencode's People

Contributors

laycnc avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.