better hyperlinks for distinction -- edited from my phone so might be broken |
Basic Types -> add ExternalDataModelType |
||
(11 intermediate revisions by the same user not shown) | |||
Line 27: | Line 27: | ||
{{Note|<translate>The framework</translate> <code>net462</code> <translate>(step 4) is going to be changed in the future, this will most likely happen with the switch from Unity to [[Sauce]]</translate>|warning}} | {{Note|<translate>The framework</translate> <code>net462</code> <translate>(step 4) is going to be changed in the future, this will most likely happen with the switch from Unity to [[Sauce]]</translate>|warning}} | ||
<translate>You're now ready to start writing plugins!</translate> | <translate>'''You're now ready to start writing plugins!'''</translate> | ||
== Guides == | |||
=== Components === | |||
* [[How_To_Create_Plugins/Creating_Components|<translate>Creating custom Components</translate>]] | * [[How_To_Create_Plugins/Creating_Components|<translate>Creating custom Components</translate>]] | ||
=== ProtoFlux === | |||
* <translate>An introduction to</translate> [[How_To_Create_Plugins/Creating_ProtoFlux_Nodes|<translate>creating custom ProtoFlux nodes</translate>]] | * <translate>An introduction to</translate> [[How_To_Create_Plugins/Creating_ProtoFlux_Nodes|<translate>creating custom ProtoFlux nodes</translate>]] | ||
* <translate>[[How_To_Create_Plugins/ProtoFlux_CC|Calls and Continuations]] in ProtoFlux</translate> | |||
* <translate>[[How_To_Create_Plugins/ProtoFlux_Globals|Creating ProtoFlux Globals]]</translate> | |||
* [[How_To_Create_Plugins/Creating_ProtoFlux_Bindings|<translate>Creating a ProtoFlux Binding</translate>]] | * [[How_To_Create_Plugins/Creating_ProtoFlux_Bindings|<translate>Creating a ProtoFlux Binding</translate>]] | ||
=== Misc === | |||
* <translate>[[How_To_Create_Plugins/Creating_Settings|Creating settings]]</translate> | |||
== <translate>Object Reference</translate> == | == <translate>Object Reference</translate> == | ||
{{Under construction|section|Doesn't list all types relevant for writing plugins.}} | |||
=== Basic Types === | |||
{| class="wikitable sortable" | {| class="wikitable sortable" | ||
|- | |- | ||
Line 41: | Line 50: | ||
|- | |- | ||
| [[How_To_Create_Plugins/Custom_Components|Components]] | | [[How_To_Create_Plugins/Custom_Components|Components]] | ||
| <translate> | | <translate>A custom component</translate> | ||
|- | |- | ||
| [[How_To_Create_Plugins/DataModelAssemblyType|DataModelAssemblyType]] | | [[How_To_Create_Plugins/DataModelAssemblyType|DataModelAssemblyType]] | ||
| <translate>The type of assembly you are making. Used in your</translate> <code>AssemblyInfo.cs</code> <translate>file.</translate> | | <translate>The type of assembly you are making. Used in your</translate> <code>AssemblyInfo.cs</code> <translate>file.</translate> | ||
|- | |- | ||
| [[How_To_Create_Plugins/ | | [[How_To_Create_Plugins/ExternalDataModelType|ExternalDataModelType]] | ||
| | | | ||
|- | |- | ||
| [[How_To_Create_Plugins/ProtoFlux_Binding|ProtoFlux Binding]] | | [[How_To_Create_Plugins/ProtoFlux_Binding|ProtoFlux Binding]] | ||
| <translate>The binding for a ProtoFlux Node. Without this, a node cannot be loaded into Resonite.</translate> | | <translate>The binding for a ProtoFlux Node. Without this, a node cannot be loaded into Resonite.</translate> | ||
|- | |||
|} | |||
TODO | |||
=== ProtoFlux Node Types === | |||
{| class="wikitable sortable" | |||
|- | |||
! <translate>Object</translate> | |||
! <translate>Description</translate> | |||
|- | |||
| [[How_To_Create_Plugins/ActionBreakableFlowNode|ActionBreakableFlowNode]] | |||
| | |||
|- | |||
| [[How_To_Create_Plugins/ActionFlowNode|ActionFlowNode]] | |||
| | |||
|- | |||
| [[How_To_Create_Plugins/ActionNode|ActionNode]] | |||
| <translate>A node which runs when called using an impulse</translate> | |||
|- | |||
| AsyncActionBreakableFlowNode | |||
| <translate>Async variant of [[How_To_Create_Plugins/ActionBreakableFlowNode|ActionBreakableFlowNode]]</translate> | |||
|- | |||
| AsyncActionFlowNode | |||
| <translate>Async variant of [[How_To_Create_Plugins/ActionFlowNode|ActionFlowNode]]</translate> | |||
|- | |||
| AsyncActionNode | |||
| <translate>Async variant of [[How_To_Create_Plugins/ActionNode|ActionNode]]</translate> | |||
|- | |||
| [[How_To_Create_Plugins/ObjectFunctionNode|ObjectFunctionNode]] | |||
| <translate>A ProtoFlux Node which returns a singular object</translate> | |||
|- | |- | ||
| [[How_To_Create_Plugins/ValueFunctionNode|ValueFunctionNode]] | | [[How_To_Create_Plugins/ValueFunctionNode|ValueFunctionNode]] | ||
Line 59: | Line 98: | ||
|- | |- | ||
|} | |} | ||
TODO | |||
=== Variable types relevant for Components === | |||
{| class="wikitable sortable" | |||
|- | |||
! <translate>Type</translate> | |||
! <translate>Description</translate> | |||
|- | |||
| [[Type:Sync`1|Sync<T>]] | |||
| <translate>A synced [[:Category:Type:Value|Value]] or [[:Category:Enums|Enum]]</translate> | |||
|- | |||
| [[SyncList`1|SyncList<T>]] | |||
| | |||
|- | |||
| [[Type:SyncRef`1|SyncRef<T>]] | |||
| <translate>A synced [[Reference_Type|Reference]] (object)</translate> | |||
|} | |||
TODO | |||
=== Variable types relevant for ProtoFlux Nodes === | |||
{| class="wikitable sortable" | |||
|- | |||
! <translate>Type</translate> | |||
! <translate>Description</translate> | |||
|- | |||
|} | |||
TODO | |||
== <translate>See also</translate> == | == <translate>See also</translate> == |
Latest revision as of 16:23, 6 August 2024
Plugins are used to add more Components and ProtoFlux nodes to Resonite by programming them using C#. They are not to be confused with Mods which do not add things into the Data Model.
- This page is about writing plugins and should not be confused with the Plugin overview page.
Please see the plugin guidelines before getting started, to familiarize yourself on what is and is not allowed.
Getting started
You will need to know the basics of the C# Programming Language to write plugins.
- Download Visual Studio Community edition, which allows for easier programming and compilation of plugins. However, you can use your favourite code editor as long as you know how to compile C# into a
.dll
- During installation, ensure to select .NET desktop development which will give you the .NET Framework development tools, which are required to compile the plugin
- Create a new project using the
Class Library
template (please ensure it is the C# option). Guidelines follow:- The project name should be the name of your plugin, same with the solution name. It is recommended to not check the box for Place solution and project in the same directory, as you may have multiple parts to your plugin, such as a ProtoFlux Binding generator.
- Select the default framework, we'll be manually editing this later.
- Add references to the following libraries by right clicking on
Dependencies
, clickingAdd Project Reference
and thenBrowse
.- FrooxEngine.dll - Found in Resonite/Resonite_Data/Managed/FrooxEngine.dll
- Elements.Core.dll - Found in Resonite/Resonite_Data/Managed/Elements.Core.dll
- Change the referenced framework to
net462
. To do this:- Double click on your project name, this will be under your solution
- Change the line
<TargetFramework>whatever_you_selected_earlier</TargetFramework>
to<TargetFramework>net462</TargetFramework>
and save the file
- Change Your Assembly Info file to tell FrooxEngine what type of plugin you are making.
- Create a folder inside your project called
Properties
- Create a file called
AssemblyInfo.cs
which contains the line[assembly: DataModelAssembly(t)]
, wheret
is a DataModelAssemblyType.
- Create a folder inside your project called
You're now ready to start writing plugins!
Guides
Components
ProtoFlux
- An introduction to creating custom ProtoFlux nodes
- Calls and Continuations in ProtoFlux
- Creating ProtoFlux Globals
- Creating a ProtoFlux Binding
Misc
Object Reference
Basic Types
Object | Description |
---|---|
Components | A custom component |
DataModelAssemblyType | The type of assembly you are making. Used in your AssemblyInfo.cs file.
|
ExternalDataModelType | |
ProtoFlux Binding | The binding for a ProtoFlux Node. Without this, a node cannot be loaded into Resonite. |
TODO
ProtoFlux Node Types
Object | Description |
---|---|
ActionBreakableFlowNode | |
ActionFlowNode | |
ActionNode | A node which runs when called using an impulse |
AsyncActionBreakableFlowNode | Async variant of ActionBreakableFlowNode |
AsyncActionFlowNode | Async variant of ActionFlowNode |
AsyncActionNode | Async variant of ActionNode |
ObjectFunctionNode | A ProtoFlux Node which returns a singular object |
ValueFunctionNode | A ProtoFlux Node which returns a singular value |
VoidNode | A ProtoFlux Node which doesn't use return to give an output. Used for nodes with multiple outputs.
|
TODO
Variable types relevant for Components
Type | Description |
---|---|
Sync<T> | A synced Value or Enum |
SyncList<T> | |
SyncRef<T> | A synced Reference (object) |
TODO
Variable types relevant for ProtoFlux Nodes
Type | Description |
---|
TODO