Stride Forums Archive

I want to start several games in my own launcher, but I receive exception

4 posts, 1606 views, 2016-01-25 to 2016-01-26

siziakov (Ram Siziakov) 2016-01-25 #1

I want to start games from my own launcher on C#. I create new project, add a reference to SpaceEscape2 project (from examples) and I try to start game by clicking my button. But I receive System.NullReferenceException in SiliconStudio.Xenko.Engine.dll. What’s wrong? I don’t want to run it from exe file, I need to run it as my code.

xenux 2016-01-26 #2

Hi siziakov,

Could you give us a little bit more details?
It would be good to have the stack trace or a reproduction project.

Thanks!

siziakov (Ram Siziakov) 2016-01-26 #3 in reply to #2

I install the xenko engine at D:\3D Engines\Xenko.
For my projects and examples I use D:\3D Engines\Xenko\Projects folder.
From Xenko Studio I build the SpaceEscape2 example to the folder D:\3D Engines\Xenko\Projects\SpaceEscape2.
My own solution I place to D:\3D Engines\Xenko\Projects\TestLauncher (the solution of my project in attachment Download my project for Vusual Studio 2015 Express).
When I try to run game by pressing my button “Game 1” I have exception.
I need to run several games from one application, and I need to change some parameters of game in my own application. I find the game engine for this purposes and I try the xenko engine.
How I can to do this?

Kryptos (Nicolas Musset) 2016-01-26 #4 in reply to #3

I think it would be better to start the games in another process (see Process.Start).