Possible design of the "Unity CEF Plugin"

Having problems with building or using CEF's C/C++ APIs? This forum is here to help. Please do not post bug reports or feature requests here.

Possible design of the "Unity CEF Plugin"

Postby F32 » Sun Aug 23, 2020 10:35 pm

Unity3D is a popular game engine. Though it has a flexible scripting (plugin) system based on c#, there's no builtin webview control.

I'm thinking about implementing a "Unity CEF Plugin" so that users can view web pages in the game.

Game develops configure game objects in different scenes, attach c# scripts to different game objects in an IDE called "Unity Editor". When everything is done, they cross-build the game for different platforms.

Since the build procedure is automatic, we have no control over the entry point (main function) in the binary. So it's difficult to embed CEF into Unity applications directly.

The only solution I can think about is to split "Unity CEF Plugin" into two parts:
- Part one is a standalone CEF executable that does off-screen rendering and sends screenshots by tcp
- Part two is a standard unity plugin (c# or c/c++ native) that receive browser screenshots from tcp and put into game scene

I believe that there are also other cases like this, where it's difficult to embed CEF into application's entry point. Is it the proper way to solve this problem?
F32
Newbie
 
Posts: 3
Joined: Wed Aug 19, 2020 7:04 am

Return to Support Forum

Who is online

Users browsing this forum: rjxray and 46 guests