Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Plugins Create Namespace Errors

Discussion in 'Windows' started by amrakdab, May 6, 2014.

  1. amrakdab

    amrakdab

    Joined:
    May 23, 2013
    Posts:
    13
    I have just started a new project targeting windows phone. One of the first things I did was import the HOTweenMicro plugin. As soon as I started to try and use it in a script, I got a namespace not found error back in Unity. At first I thought it was a problem with the plugin, but as pointed out by the developer, it works fine when I target another platform.

    Since then, I have tried importing other plugins which give the same type of error. They work fine when targeting another platform, but as soon as I switch to Windows Phone 8, I get namespace errors.

    I played with the HOTweenMicro library in another project last year, which worked fine at the time. Now that old project does the same thing as my new project.

    I have the windows phone 8.0 sdk installed, I am running Windows 8 and Visual Studio 2013 (Update 2). I have tried on two different computers with same result.

    My google-fu has failed me big time on this one, I am at a loss. Any suggestions, no matter how small would be appreciated, I may have done something really dumb, I am pretty much a newbie.
     
  2. Aurimas-Cernius

    Aurimas-Cernius

    Unity Technologies

    Joined:
    Jul 31, 2013
    Posts:
    3,627
  3. amrakdab

    amrakdab

    Joined:
    May 23, 2013
    Posts:
    13
    I did come across that page but it didn't make much sense to me. It mentions that I need two copies of the library, one in the Plugins folder and one in the Plugins/WP8 folder. Do I just copy the HOTweenMicro plugin in to both directories? Is it only necessary to do this if I am developing for multiple platforms?
     
  4. amrakdab

    amrakdab

    Joined:
    May 23, 2013
    Posts:
    13
    An update, the developer of HOTweenMicro has noticed the plugin works fine if it is stored in a folder other than the Plugins folder, I have tested it and it works. However, I would like to know if this is considered best practice. I would like to stick to convention if possible.
     
  5. Dantus

    Dantus

    Joined:
    Oct 21, 2009
    Posts:
    5,667
    There is no need to look for best practice or anything like that. It is a Unity bug:
    http://issuetracker.unity3d.com/iss...ic-and-editor-plugin-dlls-in-the-same-project
     
  6. amrakdab

    amrakdab

    Joined:
    May 23, 2013
    Posts:
    13
    I don't believe the plugin I am using has separate platform specific and editor dll files, although the problem might be related.
     
  7. Dantus

    Dantus

    Joined:
    Oct 21, 2009
    Posts:
    5,667
  8. Aurimas-Cernius

    Aurimas-Cernius

    Unity Technologies

    Joined:
    Jul 31, 2013
    Posts:
    3,627
    If it's a .NET/Mono dll and is compatible with the platform (does not use the unavailable APIs), then yes, you put it in both directories.
    The requirement is to have dlls with same API. Dll in plugins folder will be used by editor, while dll under plugins/wp8 will be used on WP8. This allows the second dll to use Windows Phone platform specific APIs (in editor a dummy dll would be used).