New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compile Errors in Unity Editor #9
Comments
Here's some documentation on how to modify the compile options in Unity: gmcs.rsp and smcs.rsp seem to be used to add additional compiler switches (in this case '-unsafe') to the calls of the C# compiler. |
Thanks for responding so quickly Banbury! Compiling the code as a DLL and copying it to the game folder does seem like an easier solution. I thought the DLL extension was windows only? Any idea if this will work on a mac too? May I ask what technique you use to compile the DLL? |
A quick search turned up these resources: http://docs.unity3d.com/Manual/UsingDLL.html http://forum.unity3d.com/threads/creatng-windows-usable-dll-in-osx.99348/ I'll see if there's a way to build it using MonoDevelop. |
DLLs in DotNet are different. They are executed on a Virtual Machine. For Unity this is called Mono. And as long as you don't use any features, that Mono doesn't support, you can use DLLs compiled with Micorsoft's .NET compiler. For PSDImporter you have to allow unsafe code. I don't know, how this is done in MonoDevelop, but in Visual Studio this is a switch in the project properties. |
Thanks again for the help on this topic Banbury - and for authoring such a great tool! For anyone else who may find this thread, I was able to get the Editor plugin working on my mac simply by going to Edit > Project Settings > Player and under the "Other Settings" adding 'unsafe' to the Scripting Define Symbols section: |
Hey Banbury!
I can't believe how difficult it is to get PSD data into Unity. You'd think they'd build it in natively. I don't want to re-position/layer all the work my designer has already done!
I'm very excited for this plugin! Unfortunately, I can't get it to compile correctly in the Unity Editor. Unity keeps displaying console errors:
I tried to follow your readme.md but I didn't quite understand this paragraph:
When I moved gmcs.rsp and smcss.rsp to my projects root directory, it had no effect. Should I be adding the unsafe comment to every .cs file affected?
I should mention I'm on a MacBook Pro running OS X 10.10.2 and Unity 4.6.2f1
The text was updated successfully, but these errors were encountered: