Adam's Lair Forum

game development and casual madness
It is currently 2019/12/12, 07:49

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Plugin tutorial, please?
PostPosted: 2015/05/15, 23:46 
Forum Adept
Forum Adept
User avatar

Joined: 2015/03/15, 02:49
Posts: 354
Location: Out there
Role: Hobbyist
Could someone out the explain how can one go about creating a plugin?

I cloned the source code from github, but it's just way over my head.

I'm interested on how to create a new docking window and how to mess about with the rigidbody editor...

Just a "open this file and tamper with it" is ok.

This thread here was my hope, but my limited capabilities left me the same...

Thank you.

_________________
Hello there! Nice to meet you!
I have github. Apologies in advance for bad coding practices.


Top
 Profile  
 
PostPosted: 2015/05/16, 03:05 
Forum Adept
Forum Adept

Joined: 2014/12/13, 00:11
Posts: 398
Location: Brazil
Role: Gamer
eyeliner wrote:
Could someone out the explain how can one go about creating a plugin?

I cloned the source code from github, but it's just way over my head.

I'm interested on how to create a new docking window and how to mess about with the rigidbody editor...

Just a "open this file and tamper with it" is ok.

This thread here was my hope, but my limited capabilities left me the same...

Thank you.


Pro tip: don't fork existing plugins. Start one from scratch.


Well, I had this issue when I tried to create a plugin, because Duality has very few documentation and tutorials.

EDIT: first step is to add your project's EditorPlugin project (located at Source/Code/EditorPlugin/EditorPlugin.csproj if I recall correctly) to the solution (if you don't know how to do this, just right-click the solution in VisualStudio and select Add - Existing Project).

To get started, I'd suggest taking a look at this.

A few things you need to know:
  • Lines 44-56 of the link above define the button that appears in the editor's toolbar;
  • It is recommended for a form to implement the DockContent class;

You could also take a look at existing plugins code and see how the plugins are registered. Check the HelpAdvisor one, for example.

That's all I could think of. I hope that it can give you a heads up on editor plugins.

_________________
I only know the basics of C#. I have no advanced knowledge.


Top
 Profile  
 
PostPosted: 2015/05/16, 15:47 
Forum Adept
Forum Adept
User avatar

Joined: 2015/03/15, 02:49
Posts: 354
Location: Out there
Role: Hobbyist
Is the file you linked the one I should use as a template?
I can't find EditorBase.csproj anywhere.

There is a EditorBasePlugin.csproj there, though...

It is my very first time doing this, so apologies for being dense...

I'm only used to making my own simple tools, so Github, and customizing other tools written by others is a bit alien to me. Sorry again.

_________________
Hello there! Nice to meet you!
I have github. Apologies in advance for bad coding practices.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group