7
\$\begingroup\$

Is there possiblity to write my own plugin/extension to Unity editor ? I want to write plugin to generate map for me from xml file.

\$\endgroup\$

3 Answers 3

8
\$\begingroup\$

"Plugins" in Unity nomenclature mean native code (read: written in C/C++/Objective-C) DLLs. For what you want to do you more than likely don't need (or want, really) to use plugins.

For extensions, the Unity editor is very scriptable.

Are you asking if you can

  1. Populate a unity scene at editor time from an XML file
  2. Replace unity's default scene format entirely with an xml file.

Either way, what you're asking is more than possible. Here's an example of somebody completely replacing Unity's binary scene file format with a text representation: https://github.com/terravision/UnityTextScene

What you probably want to do is more likely just take advantage of their editor scripting tools. For example, look at ScriptableWizard. You can take that base code and then do something like load an XML file and spawn a bunch of prefabs, or whatever.

Pretty much the vast majority of things you see in the editor is scriptable. You can attach components, move/rotate/scale things, spawn prefabs, edit materials, all sorts of things.

\$\endgroup\$
0
\$\begingroup\$

Yes - look on the Unity Manual:

http://unity3d.com/support/documentation/Manual/Plugins.html

The manual also points you to further reading by providing things like the simplest plugin project - you could use this as a starting framework

\$\endgroup\$
1
  • \$\begingroup\$ That section of the manual is about extending the engine, not the editor as the OP asked. \$\endgroup\$
    – U62
    May 24, 2015 at 0:53
0
\$\begingroup\$

Chances are that you are using the free version of Unity. As such, you cannot write plugins unless you use the Pro version.

If you are using the Pro version, then check the manual.

\$\endgroup\$
4
  • \$\begingroup\$ I'm use free :/ \$\endgroup\$
    – piotrek
    Feb 13, 2011 at 16:31
  • \$\begingroup\$ Why can't you just script it? \$\endgroup\$ Feb 13, 2011 at 16:41
  • \$\begingroup\$ I want to generate map with prefabs, and add something with mouse in editor:/ Mayby I will thing about script all ;) \$\endgroup\$
    – piotrek
    Feb 13, 2011 at 16:52
  • \$\begingroup\$ I don't know if this was ever true, but it certainly isn't now. \$\endgroup\$
    – U62
    May 24, 2015 at 0:54

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .