A React renderer for Unreal Motion Graphics With Unreal.js
This repository is a fork of react-umg whose original author is Wolfgang Steiner
A React renderer for Unreal Motion Graphics (https://docs.unrealengine.com/latest/INT/Engine/UMG/)
This project is dependent on Unreal.js
To install React-UMG with npm, run:
npm i --save react-umg
class MyComponent extends React.Component {
constructor(props, context) {
super(props, context);
this.state = {text:"MyComponent"};
}
OnTextChanged(value) {
this.setState({text: value});
}
render() {
return (
<div>
<uEditableTextBox Text={this.state.text} OnTextChanged={value=> this.OnTextChanged(value)}/>
<text Text={this.state.text}/>
</div>
)
}
}
let widget = ReactUMG.wrap(<MyComponent/>);
widget.AddToViewport();
return () => {
widget.RemoveFromViewport();
}