Comments (8)
Right way:
/**
* Note that the Demo() function must be a child of the MetaEditor component.
* <MetaEditor {{...}}>
* <Demo />
* </MetaEditor>
*/
import Button from '@mui/material/Button';
import { usePlayer } from 'components/MetaEditor/context/'
function Demo() {
const player = usePlayer()
const handleCommand = (type, value, verification_id = null) => event => {
player.cmd.emit(type, value, verification_id).then(res => {
//...
})
}
return (
<Button onClick={handleCommand('demo_command', { anyObject: [.1, 3.14] })}>
Send command to Unreal Engine
</Button>
)
}
from metaeditor.
How to send command into PixelStreaming
from metaeditor.
Is it possible to just send a string instead of a JSON object with a verification type and initiator in the message? This is what I see:
I would rather be able to just send "yooyoyoyo" without everything else. Is this possible?
from metaeditor.
@jjohnson5253 Sending data as a string is a bad way. One of these days we will publish a plugin for Unreal Engine, please wait.
from metaeditor.
@markolofsen How would you suggest sending data then? As JSON?
from metaeditor.
@markolofsen How would you suggest sending data then? As JSON?
Check out are here
https://metaeditor.io/docs/metaeditor/methods/commands
from metaeditor.
@markolofsen How would you suggest sending data then? As JSON?
Check out are here https://metaeditor.io/docs/metaeditor/methods/commands
So just JSON?
from metaeditor.
@markolofsen How would you suggest sending data then? As JSON?
Check out are here https://metaeditor.io/docs/metaeditor/methods/commands
So just JSON?
Exactly!)
from metaeditor.
Related Issues (15)
- Unable to add new project HOT 1
- how to connect the localhost from unreal pixel stream project? HOT 1
- Could be MetaClient open source? HOT 1
- How to Override MetaEditor Tag Style HOT 7
- Receiving from unreal HOT 1
- How to use MetaEditor Pixel-Streaming in react 17.0.2? HOT 1
- Stream is not active. Can not emit UI interaction. HOT 1
- Operable area error HOT 5
- Infinte Logging errors while pixel-streaming is on HOT 3
- Stream not active errors
- this.preferredCodec.split is not a function HOT 1
- The mouse is not aligned correctly HOT 20
- Problems with the latest version of pixel-streaming HOT 5
- Is source available? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from metaeditor.