Code Monkey home page Code Monkey logo

unitywebbrowser's Introduction

Unity Web Browser

License Unity Package Discord YouTube

Adds a functional web browser to Unity without any issues or hassle.

This web browser uses CEF and CEFGlue to render the page to a texture and display it in Unity. This project also doesn't crash when you play in the editor for a second time.

Features

  • Displays the web using a modern web browser engine (Chromium)
  • Load web pages from URL or HTML
  • Controls and inputs
  • Execute JS code
  • Install as an Unity package
  • Doesn't crash the entire editor
  • Free and open-source

Getting Started

How does this work?

If you ever tried to use CEF in Unity, you know it doesn't go well, it always crashes due to how CEF works, and how Unity handles native plugins.

This project avoids these issues by running CEF in a separate process and using IPC to communicate data between Unity and the process.

Package Installation

Prerequisites

Unity 2020.2.x

To install it via the package manager you will need to:

  1. Open up the package manager via Windows -> Package Manager
  2. Click on the little + sign -> Add package from git URL...
  3. Type https://gitlab.com/Voltstro-Studios/WebBrowser/Package.git and add it
  4. Unity will now download and install the package

Contributing

Please READ ALL OF THIS if you want to contribute or work on the project.

Prerequisites

Unity 2020.2.x
.NET 5 SDK
Powershell Core
  1. Clone the repo with git clone --recursive https://github.com/Voltstro-Studios/UnityWebBrowser.git (Clone with sub-modules!)

  2. Run scripts/download-cef-binaries.ps1 with PowerShell.

  3. Run scripts/publish-browserprocess-and-copy-win64.ps1 with PowerShell.

  4. Add src/CefBrowser/ as a package in Unity.

Operating System Support

Right now we only support Windows, however a Linux version is on the TO-DO. MacOS may be supported in the future, but right now, it is too much work to support due to the lack of real-life hardware and having to use a virtual machine to test stuff for MacOS.

Other OSes such as Android and IOS cannot be supported due to the lack of knowledge on how to develop for this OSes.

Screenshots

Click to expand!

Screenshot 1 Screenshot 2 Screenshot 3 Screenshot 4

Authors

License

This project is licensed under the LGPL-3.0 License - see the LICENSE file for details.

unitywebbrowser's People

Contributors

voltstro 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.