I was trying to make a small plugin for WP8.1 and conect it to unity, but i get a Reflection Exception when i add the file to the Asset/Plugins folder:
The plugin is nothing more than a dll that contains the following
using System;
using System.Collections;
namespace LocalStorager
{
public class LocalSave
{
public static void Save()
{
#if UNITY_EDITOR
#endif
}
}
}
After much breaking my head i moved started trying to add the plugins in an empty project to see why it was giving my this problem. Fially the exception stoped when i removed the Facebook plugins Editor folder
(Assets/Facebook/Editor)
This is very odd since i cant seem to figure out why that folder would conflic in a way that would raise a Reflection Exception.
I am very confused and have no idea how to fix this issue. Any help is greatly apreaciated…
Update #1
After doing some more diggin i found out that Unity does have logs when creating the assemblies. In it there was the compile error but i cant seem to understand the error.
Any ideas?
Update #2
Found out there is the same error for the Temp/Assembly-CSharp.
I wonder if its because of visual studio 2013 and the .Net framework version… Unty is supposed to be .2 but .net 2013 is 4.5 ?
Even when using VS 2013, you can specify different .NET framework in the project properties, for plugin which is only be used in the Editor, you’ll have to specify .NET 3.5
I can’t seem to be able to do that. I have Windows 8.1 and have enabled the .Net 3.5 in the control panel but i am unable to select it as a target platform.
Try reading this document for more clarity - http://docs.unity3d.com/Manual/wp8-plugins-guide-csharp.html ,while it’s for Windows Phone 8, for Windows Store Apps it’s almost identical, the only difference will be when creating plugin for Windows Store Apps, choose Windows Store instead of Windows Phone 8.
P.S You don’t need to do anything in the Control Panel
Thanks Tomas. That tutorial helped me see why i couldnt get the plugin to work.
As for future reference, I had to install visual studio 2010 express in order to compile the “fake .dll” with the 3.5 framework. And the phone plugin with Visual studio 2013 express.
The control panel thing was related about not having the Framework active in windows 8. Some sites said to check that is was enabled.