Skip to content

Migration 3.4.X to 3.5.X

Hendrik Polczynski edited this page Nov 4, 2013 · 1 revision

General

In general make sure to use the latest Plugin SDK version. Some of the CryEngine CryCommon APIs changed, i can't explain all those changes here. This is a guide focusing on the plugin related changes you might run into.

  • follow the updated GameDLL Integration Guide
  • The Plugin SDK supports backward compatibility so if you want to use the same sourcecode of your plugins also in old versions of CryEngine be sure to use the CDK_VERSION definition. This is achieved through the Plugin SDK header file CDKVersion.h that will be included automatically in all plugins.
#if CDK_VERSION < 350
 // your old code
#else
 // your new code
#endif

MAX_PLAYER_LIMIT Error:

Fully backward compatible fix:

  • Search in all your header/source files where Game.h or G2FlowBaseNode.h is included.
  • Make sure to move your plugin header include in front of the original include:
#include <StdAfx.h>
#include <CPlugin______.h> //<!--

#include <Nodes/G2FlowBaseNode.h>

#include <Game.h>
#include <IPluginBase.h> // <!---
#include <Game.h>

#include <IPluginManager.h>
#include <CPluginBase.hpp>

#include <IPlugin______.h>
  • After that the error should disappear or you forgot a file

pGameFramework Error:

Fully backward compatible fix:

  • For conditions replace with gEnv->pGame && gEnv->pGame->GetIGameFramework()
  • For assignments replace with gEnv->pGame ? gEnv->pGame->GetIGameFramework() : NULL

Unload Crash

Fully backward compatible fix, make sure of the following:

  • implement Release() and RegisterTypes() unregistering
  • check if gEnv and all used pointer are valid
  • release all listeners you registered
  • release all plugins you are using with your plugin