C4 Engine
C4 Engine API Documentation

EditorPlugin::InitializeEditorPlugin

Defined in:  C4EditorPlugins.h
Initializes a plugin for a new editor window.
Prototype

virtual void InitializeEditorPlugin(EditorSupplement *editorSupplement);

Parameters
editorSupplement A pointer to the editor object for a newly created World Editor window.
Description
The InitializeEditorPlugin function is called for each World Editor plugin when a new editor window is created, but before the world data is loaded. The plugin can do anything that it needs to do in order to be used with the window as int32 as it doesn't require access to the world itself or any editor facilities. Any initialization that does require more access should be implemented in the EditorPlugin::PreprocessEditorPlugin function.

A typical use for the InitializeEditorPlugin function is to create one or more instances of custom EditorPage subclasses and add them to the editor window using the EditorSupplement::AddEditorPage function. Custom pages should be created at this time so that any data they save is properly reloaded when the world data is read from the disk.

The default implementation of the InitializeEditorPlugin function does nothing.
See Also

EditorPlugin::PreprocessEditorPlugin

EditorSupplement