User:Paradox19/scratch space: Difference between revisions

From Resonite Wiki
reorganise
No edit summary
 
(3 intermediate revisions by the same user not shown)
Line 2: Line 2:


: ''an empty space? perhaps.''
: ''an empty space? perhaps.''
 
{{#Invoke:Paradox19/ProtoFlux|GenerateUI
<languages />
|Name=Example Name
{{Technical}}
|Category=Example Category
<translate>Plugins are used to add more [[Component|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#Mods_VS_Plugins|Data Model]].</translate>
|Inputs=
 
[
: ''<translate>This page is about '''writing plugins''' and should not be confused with the [[Plugins|Plugin overview]] page.</translate>''
{"Name": "Input1", "Type": "Call"},
 
{"Name": "Input2", "Type": "String"}
<translate>Please see [[Plugins#Plugin_Guidelines|the plugin guidelines]] before getting started, to familiarize yourself on what is and is not allowed.</translate>
]
 
|Outputs=
== <translate>Getting started</translate> ==
[
''<translate>You will need to know the basics of the [https://learn.microsoft.com/en-us/dotnet/csharp/ C# Programming Language] to write plugins.</translate>''
{"Name": "Output1", "Type": "bool"},
 
{"Name": "Output2", "Type": "bool"}
# <translate>Download [https://visualstudio.microsoft.com/vs/community/ Visual Studio Community edition], which allows for easier programming and compilation of plugins.</translate> ''<translate>However, you can use your favourite code editor as long as you know how to compile C# into a</translate> <code>.dll</code>''
]
#* <translate>During installation, ensure to select .NET desktop development which will give you the .NET Framework development tools, which are required to compile the plugin</translate>
|Globals=
# <translate>Create a new project using the <code>Class Library</code> template (please ensure it is the C# option). Guidelines follow:</translate>
[
## <translate>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 [[How_To_Write_Plugins/ProtoFlux_Binding|ProtoFlux Binding]] generator.</translate>
{"Name": "Global1", "Type": "User"},
## <translate>Select the default framework, we'll be manually editing this later.</translate>
{"Name": "Global2", "Type": "User"}
# <translate>Add references to the following libraries by right clicking on <code>Dependencies</code>, clicking <code>Add Project Reference</code> and then <code>Browse</code>.</translate>
]
## FrooxEngine.dll - <translate>Found in</translate> Resonite/Resonite_Data/Managed/FrooxEngine.dll
|Custom=TRUE
## Elements.Core.dll - <translate>Found in</translate> Resonite/Resonite_Data/Managed/Elements.Core.dll
|}}
# <translate>Change the referenced framework to</translate> <code>net462</code>. <translate>To do this:</translate>
## <translate>Double click on your project name, this will be under your solution</translate>
## <translate>Change the line</translate> <code><TargetFramework><translate>whatever_you_selected_earlier</translate></TargetFramework></code> <translate>to</translate> <code><nowiki><TargetFramework>net462</TargetFramework></nowiki></code> <translate>and save the file</translate>
# <translate>Change Your Assembly Info file to tell [[FrooxEngine]] what type of plugin you are making.</translate>
## <translate>Create a folder inside your project called</translate> <code>Properties</code>
## <translate>Create a file called</translate> <code>AssemblyInfo.cs</code> <translate>which contains the line</translate> <code><nowiki>[assembly: DataModelAssembly(t)]</nowiki></code><translate>, where <code>t</code> is a [[How_To_Write_Plugins/DataModelAssemblyType|DataModelAssemblyType]].</translate>
 
{{Note|<translate>The framework <code>net462</code> (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>Please see the following pages for in depth guides on how to code individual parts of plugins:</translate>
* <translate>Creating custom [[How_To_Write_Plugins/Creating_Components|Components]]</translate>
* <translate>An introduction to creating custom [[How_To_Write_Plugins/Creating_ProtoFlux_Nodes|ProtoFlux]] nodes</translate>
* <translate>Creating a [[How_To_Write_Plugins/Creating_Bindings|ProtoFlux Binding]]</translate>
<translate>''Please note: you are not limited to these guides, you may use any C# syntax.''</translate>
 
== <translate>Object Reference</translate> ==
{| class="wikitable sortable"
|-
! <translate>Object</translate>
! <translate>Description</translate>
|-
| [[How_To_Write_Plugins/Custom_Components|Components]]
| <translate>Used to create custom components</translate>
|-
| [[How_To_Write_Plugins/DataModelAssemblyType|DataModelAssemblyType]]
| <translate>The type of assembly you are making. Used in your</translate> <code>AssemblyInfo.cs</code> <translate>file.</translate>
|-
| [[How_To_Write_Plugins/ObjectFunctionNode|ObjectFunctionNode]]
| <translate>A ProtoFlux Node which returns a singular object</translate>
|-
| [[How_To_Write_Plugins/ProtoFlux_Binding|ProtoFlux Binding]]
| <translate>The binding for a ProtoFlux Node. Without this, a node cannot be loaded into Resonite.</translate>
|-
| [[How_To_Write_Plugins/ValueFunctionNode|ValueFunctionNode]]
| <translate>A ProtoFlux Node which returns a singular value</translate>
|-
| [[How_To_Write_Plugins/VoidNode|VoidNode]]
| <translate>A ProtoFlux Node which doesn't use <code>return</code> to give an output. Used for nodes with multiple outputs.</translate>
|-
|}
 
== <translate>See also</translate> ==
* <translate>[https://learn.microsoft.com/en-us/dotnet/csharp/fundamentals/types/#custom-types Creating custom types in C#]</translate>
<!-- i plan to make a youtube tutorial series at some point! ~ paradox19 (User:Paradox19) -->

Latest revision as of 20:50, 22 August 2024

This is a scratch space for Paradox19. Do not link to it as its contents are transient in nature. Also, please do not edit this page without permission.
an empty space? perhaps.
Example Name
Input1
Output1
Input2
Output2
Global1
null
Global2
null
Example Category