- Home /
Unity Editor Extension development issue
Hi All,
I am a new user of unity. My aim is to create unity editor extension MenuItem which will have some labels and buttons and on click of these buttons i need to support some backend functionality. While doing this I am facing a strange issue.
When i write a solution in monodevelop tool, I am able to parse json string using System.Runtime.Serialization.json and Unzip file using ZipClass as it is supported by .Net framework 4.0. I wanted to call the same functions from Menu Item created on unity IDE writing c# file inside Project/Assets/Editor directory. When I sync it with monodevelop tool and build on monodevelop tool, json parser and Zipclass are not supported as the .net framework used by unity is 3.0. I am seeing even the assembly references are lost. I tried to make the .net package configuration under unity as 4.0 but still after syncing the same issue is happening. Please help me to resolve these issue as i am stuck due to this issue.
Is there a way to write code outside unity or by using monodevelop solution and create and copy the dll into unity. Can i create dll for the Project/Assets/Editor directory(Where i am creating my MenuItem) and copy at unity location to view the MenuItem and perform backend functionality? Please let me know the locations also.
Or is there any setting i need or directory structure i need to follow on unity and then sync it to mono? Please let me know the process then.
Help will be highly appreciated.
Thanks & regards, Anoop.
Answer by Unitraxx · Nov 28, 2014 at 07:36 PM
I had the exact same problem. You can create .dlls with Monodevelop and then use them in Unity scripts, but you need to target .NET 3.5. So if you are using .NET 4.0 features, it simply won't work inside Unity.
Hi,
Thanks a lot for answering. Could you please tell me where to copy dlls in Unity? I mean if i want to create editor extension in unity, i need to copy c# files in Project/Assetss/Editor. But If I create c# file in monodevelp tool and run which dll i need to create and where to copy this dll in unity to make it work as unity editor extension.
One more question, I am not able to download file from url when i call any function from editor extension button. Whereas if i create console solution in monodevelop i am able to do. Do i need to set any proxy in unity or any other configuration needed? I don't see any packets sent from unity also?
Please help.
Thanks & regards, Anoop.
I drop my .dlls in Assets/. However keep in $$anonymous$$d that .dlls are just libraries. I don't have editor specific code in those.
Answer by _dns_ · Nov 29, 2014 at 06:33 PM
Editor dlls must be in a directory named "Editor" somewhere inside the "Assets" folder.