Replies: 1 comment 7 replies
-
Hi. Thanks for the question. Let me explain it as best as I can. ReactUnity works similarly to how a regular React Web application built with Webpack works. Therefore, it is best if I explain it by making an analogy between React Web application and React Unity application. In a React Web application, you have a React project, which has a Web applications often use a framework (Angular, Next.js etc.) or a bundler (Webpack, Vite, Rollup etc.). ReactUnity uses Webpack. In fact, it uses a Webpack config very similar to Create React App. Anyway, Webpack has something called a dev-server. When you run it, it serves your Html and Javascript files so that you can preview your application by going to a URL (for example Note though, ReactUnity doesn't have HTML files. It works with Javascript and CSS. You can also build your project with Webpack, which generates static Html/Javascript/Css files. These files can then be served with any web server you want (Nginx, IIS, Apache, Express, etc. there are too many). When you serve them, someone on internet can go to the URL of your server and see your website. We don't need that in ReactUnity. In ReactUnity, when you build your static Javascript/Css files, you build them into your Unity project. In short, a ReactUnity UI is similar to a React Website. React Websites are rendered in a browser, but ReactUnity UI is rendered using the The renderer boots up a Javascript Runtime inside unity and executes the Javascript built by your project. This is similar to a browser's Javascript engine. In ReactUnity, you can select one of the three JS runtimes you want to run your UI in, QuickJS (recommended), Clearscript, and Jint. Each has advantages and disadvantages. I won't go into details. Let me know if there is a gap. |
Beta Was this translation helpful? Give feedback.
-
Hello! I'm trying to understand how this framework works but I can't understand it, basically I know that I have "a task" that executes and exposes "html" and this "html" is used to recreate the UI using (Unity UI or *UIElement). Can provide macro (simple) details about how project execution works (*if possible), how react running in "background", etc.
Beta Was this translation helpful? Give feedback.
All reactions