Game Development Reference
In-Depth Information
Note
For the DLL that is going to be placed in Assets\Plugins , it must be a .NET 3.5
Framework class library. Just be sure to select this framework while creating the editor
Plugin DLL.
As a simple example, create a new Class Library project in your code editor (Visual
Studio or MonoDevelop), and then create a new C# class (usually, there is a default
Class1.cs class created with the class library). You can then define a plugin interface
in the new class for the editor that looks like the following code:
namespace MyAwesomePlugin
{
public class MyPluginClass
{
public static string GetPlatform
{
get
{
return "This is the Editor";
}
}
}
}
This simple class just exposes a static string to return the name of the platform.
The platform plugin
For the platform plugin, we will create another Class Library, which targets the level of
framework required by the target platform. For example, a Windows 8 (store app) class
library for the Windows 8.0 platform.
Then, create a new class (or reuse the default class) and enter the following code:
namespace MyAwesomePlugin
{
public class MyPluginClass
{
public static string GetPlatform
Search WWH ::




Custom Search