Archive 17/01/2023.

What is the engine pointer supposed to point to?

archwind

IntPtr handle = new IntPtr (????);
Engine engine = new Engine(handle); -- throws a null pointer assignment;

What is the context to point to? It obviously does not return a pointer to itself which I made that assumption.

JTippetts

Subsystem objects such as Engine take a pointer to a Context object, ie:

SharedPtr<Context> ctx(new Context());
SharedPtr<Engine> eng(new Engine(ctx));

You can take a look at how Application.h defines URHO3D_DEFINE_APPLICATION_MAIN for how it’s done for the samples and Urho3DPlayer application.

Edit: fixed

archwind

Oh, Okay it needs a pointer not returning one. Thanks!

Always fun in C# BTW. :slight_smile:

archwind

Okay. I have it working now. Thanks @JTippetts

My current project here. Once I get the engine up and going 100% I’ll fixed the mess there.