Can I use unreal as an external library?

I’d like to call unreal from within Squeak Smalltalk. In other words, I want to script it using an external scripting engine (adding Squeak to unreal is not an option unfortunately).

So is this possible or must Unreal alwas be statically linked?

I am pretty sure it isn’t statically linked by default at least. In the editor there is python scripting support.

Unreal 4.27 release notes:

Unreal Engine as a Library

Unreal Engine as a Library makes it possible to build the UE4 runtime as a library and interact with it through a minimal, built-in API with the following capabilities:

  • Runs UE4, optionally accepting a command-line and a client window where the engine should send its output.
  • Updates (or “ticks”) the engine, giving you control over when it runs.
  • Receives Windows messages for interprocess communication with the engine.
  • Shuts the engine down when you are done with it.

You can also expand the API to suit your needs, exposing existing or new functionality for external use.

They also support containers now for local or cloud use.

Oh, very cool, thanks. This may allow me to not only script Unreal from Smalltalk, but use Unreal to reflect the Smalltalk IDE “in world” and let players interact with it and program it. Fully functional ship’s computer anyone?

containers seem potentially useful. There’s a technology called Teatiime (the croquet 3D world was built on top of it) that consists of nothing but a way to put all server-like services into a client app, which broadcasts everything done within the client to other clients the web via reflectors.

Currently it is browser-based (Teatime creator David P Reed (creator of UDP) was hoping that it would replace the current model of how the web works by doing away with the client-server bottleneck) but in theory it could be rewritten as a standalone app, or perhaps there is some way to get Unreal used within a browser, leveraging the existing reflectors.

You can see demos of the current croquet browser-based technology and see the older Smalltalk-based 3D collaborative world here.

— keep in mind that the second video was running on almost 20 year old technology as a proof of concept demo. The presenter is Turing Award winner Alan Kay, inventor of Smalltalk, coiner of the term OOP, team leader for the ethernet project, etc.

Been years since I’ve heard of Smalltalk. Didn’t know there was still some usage of it.

I’ve done Docker containers so it’s nice having a full virtual machine.

Squeak is the official successor to Smalltalk-80 done by the original team led by Alan Kay.

It was named Squeak because it was done just as Kay was being hired by Disney to be the VP of Imagineering, and they were hoping that it would become the OS of the MickeyMouse PDA used at Disney theme parks. That didn’t work out, but its now in version 5.3 (soon to be 6).

Squeak Smaltalk official website

Full multimedia implementation that can call external library and provide the pointer to a bitmap object for drawing within the Squeak desktop.

An awful lot of innovative bits of modern computing were actually prototyped on Squeak over the past 2+ decades

I’m also interested in this feature, so is there any example,or more detailed document about it?

Unreal and containers:

Unreal as a library:

So the api for this lib is extensible, so in theory what I would want to use.

Thanks

I had read the doc Building Unreal Engine as a Library , but I can not find the sample project " UELibraryProject" and " UELibraryApp" in my ue4 install folder, so where can I download the 2 samples?

It doesn’t seem to be included even though the documentation says it is. I would send a note to Unreal team, or post under 4.27 here in case staff sees it. You could also check the GitHub in case it’s been posted there but not in the released package.

I had check the source tree on Github,but I can not find the 2 samples.

Hello. I’m interested in using UELibrary for use with my external app, but I also couldn’t find the sample project and app. @scottunreal did you have some progress with it? Maybe someone from Unreal team replied to you regarding this issue?

I haven’t been looking into it. Try to contact Unreal directly or post a note in the forum where they were asking about documents or consider a bug report missing samples.

Looks like someone has got it working UEAsLibrary mouse input not working as app is never active

Yep. I did it. Mostly the instructions on the docs are correct except for exporting new APIs which I needed to do manually with dllexport instead of using the macro that is explained there.

For the other things everything went pretty straightforward. Contact me if you need help.

well,can you show me Demo about UEAsLibrary ,thanks

Unfortunately not as it is an application under NDA.

好的,你能给我看看关于 UEAsLibrary 的 Demo 吗,谢谢

I’ve followed the steps in the documentation as far as building the app and running it. When I get to the part about expanding the API, I don’t understand. It says something about modifying the project’s *.target.cs file “as described above”. I don’t see where it describes that at all, maybe I’m missing something. As you mentioned, I’m also confused by the macro part. Can you give a generic example on how you use DLLExport instead?