-
Notifications
You must be signed in to change notification settings - Fork 38
3.5.X 3.6.X Version
Hendrik Polczynski edited this page Oct 11, 2015
·
1 revision
Follow these steps to integrate the Plugin SDK into your GameDLL.
- Clone the repository to your local machine to your Code directory e.g.
C:\CryENGINE_PC_vX.X.X\Code
orC:\Program_Files_(x86)\Steam\steamapps\common\CRYENGINE\Code
(when using EaaS). - Use a github UI version like Github for Windows or the VS2013 integration
- or if you already have git installed
git clone https://github.com/hendrikp/Plugin_SDK.git
- Open the Solution
CryEngine_GameCodeOnly.sln
- Open
CryGameSDK
Properties - Set the Dropdowns to All Configurations, All Platforms
- Add to C/C++ -> General -> Additional Include Directories (Important to add it as last directory):
;$(SolutionDir)..\Plugin_SDK\inc
- Apply those properties and close the dialog
- Inside the
CryGameSDK
project (Solution Explorer) open the following file:Startup Files / GameStartup.cpp
- Add behind the existing includes the following:
#include <IPluginManager_impl.h>
- Find the function
CGameStartup::Init
- Add in the middle of the function (after
InlineInitializationProcessing("CGameStartup::Init LoadLocalizationData");
) the following:
InlineInitializationProcessing("CGameStartup::Init LoadLocalizationData"); // <--
PluginManager::RememberStartupParams(startupParams);
- Add at the end of the function (before
return pOut;
) the following:
PluginManager::InitPluginsLast();
return pOut; // <--
- Inside the
CryGameSDK
project (Solution Explorer) open the following file:Game Files / Game.cpp
- Add behind the existing includes the following:
#include <IPluginManager_impl.h>
- Find the function
CGame::RegisterGameFlowNodes
- Add at the end of the function the following:
PluginManager::RegisterPluginFlownodes();
} // <--
- Find the function
CGame::Init(IGameFramework *pFramework)
- Add in the middle of the function (after
RegisterGameObjectEvents();
) the following:
RegisterGameObjectEvents(); // <--
PluginManager::InitPluginManager();
PluginManager::InitPluginsBeforeFramework();
You already downloaded the latest Plugin_SDK version during repository setup. Now you need to build it once before building the CryGameSDK project. Open an additional visual studio and build the Plugin_SDK project once, after this you can now build the CryGameSDK without errors. (This requires the CrySystem.dll to be in the correct relative directory to the Plugin SDK, If you have renamed/moved your Gamefolders etc. it will not work and the build scripts will need to be adjusted manually)
At this point no plugin is using this, but its integrated in the prebuilt version:
- If you want to use the WinProc Injector to query or block window messages the game receives follow this guide: GameDLL Integration Winproc Injector