Adam's Lair Forum

game development and casual madness
It is currently 2019/12/12, 08:15

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 6 posts ] 
Author Message
PostPosted: 2015/03/05, 21:53 
Forum Adept
Forum Adept

Joined: 2014/12/13, 00:11
Posts: 398
Location: Brazil
Role: Gamer
I am trying to make my own editor plugin, and after designing it and coding it, looks like I did the wrong way.

I've renamed the CorePlugin project to my plugin name, but now my plugin wont load because it's missing the CorePlugin project.

What is the correct approach to develop a Duality plugin?

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


Top
 Profile  
 
PostPosted: 2015/03/06, 01:10 
Site Admin
Site Admin
User avatar

Joined: 2013/05/11, 22:30
Posts: 2073
Location: Germany
Role: Professional
This is a very broad question which cannot really be answered without writing a huge article on the topic. However, a first start is to add the already existing EditorPlugin.csproj file to your Visual Studio solution. It compiles out of the box and despite not adding anything, this should be a good first step, because all the basic things are already setup there. Just renaming a CorePlugin won't work, as both are depending on different Assemblies and require different build settings - that's why an empty editor plugin is provided by default.

How to proceed from there depends on what you're trying to achieve.

_________________
Blog | GitHub | Twitter (@Adams_Lair)


Top
 Profile  
 
PostPosted: 2015/03/06, 01:16 
Forum Adept
Forum Adept

Joined: 2014/12/13, 00:11
Posts: 398
Location: Brazil
Role: Gamer
Adam wrote:
This is a very broad question which cannot really be answered without writing a huge article on the topic. However, a first start is to add the already existing EditorPlugin.csproj file to your Visual Studio solution. It compiles out of the box and despite not adding anything, this should be a good first step, because all the basic things are already setup there. Just renaming a CorePlugin won't work, as both are depending on different Assemblies and require different build settings - that's why an empty editor plugin is provided by default.

How to proceed from there depends on what you're trying to achieve.

Thanks. Added it to the project, now I'm building it up.

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


Top
 Profile  
 
PostPosted: 2015/03/06, 01:32 
Forum Adept
Forum Adept

Joined: 2014/12/13, 00:11
Posts: 398
Location: Brazil
Role: Gamer
Another quick question about editor plugins:

When I enable the new window I've created, it appears without title. Why is this happening?

And how does saving data work?

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


Top
 Profile  
 
PostPosted: 2015/03/06, 11:30 
Site Admin
Site Admin
User avatar

Joined: 2013/05/11, 22:30
Posts: 2073
Location: Germany
Role: Professional
Quote:
And how does saving data work?


Here is an example on saving editor data. It will end up in EditorUserData.xml and is intended for user settings, like "is option X active" or "did the user specify to no be reminded again about Y".

Quote:
When I enable the new window I've created, it appears without title. Why is this happening?


I have no idea. :D This is not a common error with a default solution, could be anything.

_________________
Blog | GitHub | Twitter (@Adams_Lair)


Top
 Profile  
 
PostPosted: 2015/03/07, 01:04 
Forum Adept
Forum Adept

Joined: 2014/12/13, 00:11
Posts: 398
Location: Brazil
Role: Gamer
Adam wrote:
Quote:
And how does saving data work?


Here is an example on saving editor data. It will end up in EditorUserData.xml and is intended for user settings, like "is option X active" or "did the user specify to no be reminded again about Y".

Quote:
When I enable the new window I've created, it appears without title. Why is this happening?


I have no idea. :D This is not a common error with a default solution, could be anything.


Oh, fixed it. Silly me, didn't include a title in the form.

Now, another question. I have the SaveData method defined, but somehow the editor is not calling it. Is this a known issue?

EDIT: above question was fixed by including the DeserializeDockContent method.

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


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

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 2 guests


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