C#SharpDevelop如何开发插件详细记录
当年too young too simple,留下不少遗憾
加上用了Unity几年后,觉得Unity这种框架模式真心不错,并不是要吹Unity。
Unity是c++底层,c#上层,这样的结构就是。。。。。。挺不错的;虽然有千千万万这样的框架,可成功的就那一辆款。
所以试试能不能SharpDevelop做到同样的效果(答案是肯定的,甚至更好,但Unity是爆款,这不是)
在飞机飞行中建造飞机
Unity用反射或者Assemble就可以做到了,而不需要反射自身,其实这挺危险的。但我们只需要反射插件
SharpDevelop的源码
打包后用自身的IDE创建插件项目
官网说可以参考这个模板
如UnityEditor 般的一些GUI插件和Core内核
不用怀疑,大家都是程序员Unity里面命名GUI, SharpDevelop里面的命名也是GUI
只不过实现代码不同
暂时跳过
生成插件
项目输出配置一下
We need to tell SharpDevelop to output the binary version of our plugin into the AddIn folder of the target SharpDevelop instance. To do this, right click on the MyTestAddin project node in the project scout (the tree control on the left of the IDE). Then choose "properties" from the pop-up menu. This allows us to edit the build settings for our new addin project.
Move to the "Compilation" tab and find the "output path" field in the "output" section and click the "..." button. Navigate to the Addins directory under the target copy of SharpDevelop (C:\Dev\Target\Addins) and create a new folder to hold our new Addin called MyTestAddin. Click OK.
需要加上2个dll 引用
We are still not quite done, if you click now you will see that you get a whole pile of build errors. This is because we have not yet told our development copy of SharpDevelop where to find our target copy.
Right click the MyTestAddin project again and select "Add Reference". In the dialog select the ".Net Assembly Browser" page and click "Browse".
Then goto the bin directory of your target SharpDevelop instance (C:\Dev\Target\Bin) and select two assemblies: ISharpCode.Core.dll and ISharpCode.SharpDevelop.dll.
因为是外部项目,这些引用不需要copy,可以共用
所有所有的一切,都是那么熟悉,
都和Unity开发插件差不多,就是和Java开发插件不同就是了
在火箭升空中创造火箭
自己写的插件一开始编译不过
肯定还有不可控力的问题,默认用compile 5.0编译, 然而最新源码worker builder没有支持,
结果就崩溃了,还是不是真的在火箭上,没那么可怕
换一个低版本的编译OK
编译完成后,不需要手动导入,
就算你想手动导入,也会提示
重启或者重新Run一下SharpDevelop本体
捣鼓一下火箭零件
试一下,开发一下,官方的html preview扩展
十五年前的IE,哈哈哈,就好像昨天的影像,昨天发生的事情一样