C
C#3mo ago
LILI

✅ Linking Projects

I'm currently having a second go at making a game engine. I'm trying to make it so that the engine is a seperate project that gets built into a dll and can be used in projects. How I want the engine to work is in the game project you have all your scripts, which implement an IScript interface and when you run the game, the engine goes through all the scripts and starts the lifecycle of the script. The way I get all the classes that implement IScript is by going through the types from the assembly. The issue I'm facing is that the Engine.dll doesn't share the same assemblies as the Game.exe and doesn't detect any of the scripts.
4 Replies
Buddy
Buddy3mo ago
And how do you load the engine dll?
LILI
LILI3mo ago
Nvm! Fixed it by changing Assembly.GetExecutingAssembly to Assembly.GetEntryAssembly
Buddy
Buddy3mo ago
$close
MODiX
MODiX3mo ago
Use the /close command to mark a forum thread as answered