Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

THIS IS A BETA FEATURE

Overview

The CRYENGINE plugin system exposes support for creating plugins in both C++ and C# and allows users to simply drop a plugin into their project and instantaneously see the benefits.

Intended Benefits

  • Buy/Sell Plugins on the marketplace
    In the future we want to be able to offer a variety of plugins on the marketplace, developed both by Crytek and 3rd parties on the marketplace that will give you all the functionality you need to create your project. 

  • Simplify game code creation
    Size down the scope of code you have to touch to implement elemental features for your project. You can use C++ as well as C# to achieve this.

  • Create a custom project without even touching code once
    The days of having to modify legacy game projects are past, with the new system you can create a project by just adding pre-written plug-ins too it. 
  • Making more parts of the engine optional
    Gain performance by getting rid of systems that are not required by your project. No need to maintain dead code.

  • More control/info about features used by your project
    Get proper information about the plugins loaded at runtime, increase iteration time by being able to hot-reload any plugin while the engine is running.

  • Easier engine customization for your project
    Make your project changes more accessible to your team members by using a completely dynamic working environment for the plugins.

Changes

Changes to ExtensionSystem:

There are no compatibility issues with existing extensions.

Changes to CryMonoBridge & MonoRuntime:

CryMonoBridge is now part of every Windows project. This will increase compile times because of the swig-process but it also ensures that C# support can be easily enabled without any further changes or special configurations. The MonoRuntime has changed a lot. The MonoLauncher is not loaded anymore but all the C# plugins are managed directly from the plugin manager. This allows users to keep control over every single binary loaded.

Changes to C# projects/plugins:

To make your C# binary compatible with the new plugin system, just write a wrapper class around it that inherits from ICryEnginePlugin. ICryEnginePlugin offers you all the necessary interfaces to CRYENGINE. The plugin system takes care of calling the methods mentioned below:

  • void Initialize()
    Gets called whenever the plugin manager initializes your plugin for the first time.

  • void OnGameStart()
    Gets called whenever the engine starts your game (either after initialization in the Launcher or when switching in-game mode in the sandbox)

  • void OnGameStop()
    The equivalent for OnGameStart()

  • void Shutdown()
    Gets called whenever the plugin system is trying to shutdown your plugin. Every engine-related allocation should be removed here. After shutdown the class will await clean up by the framework garbage collector.

 

On top of this, the plugin manager takes care of setting up a link to the global DomainHandler as well as setting the specified Binary- and Asset directories for this plugin. Can be accessed within the plugin through the following methods:

  • const char* GetBinaryDirectory()
    Retrieves the binary directory for this plugin on your local machine.

  • const char* GetAssetDirectory()
    Retrieves the asset directory for this plugin on your local machine.

 

All these methods are also available to native C++ plugins. In the future, we plan to match them even closer in functionality and have an identical workflow on both sides.

Feedback

As this is a Beta Feature, it is still in development and we would love to hear what you think about it. Please provide us with any feedback you have through the CRYENGINE Community forum!

  • No labels