Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Plugin Special Names Suggestion

Discussion in 'Editor & General Support' started by nventimiglia, Sep 2, 2014.

  1. nventimiglia

    nventimiglia

    Joined:
    Sep 20, 2011
    Posts:
    153
    (Case 630693) Editor is loading Standalone dll in mobile

    http://answers.unity3d.com/questions/756779/unity-exclude-dll-by-platofrm-x86-64-special-names.html

    I spend allot of my time writing plugins for unity. The plugin / special name system works fine for the most basic of cases, but falls apart in advanced situations. Here are some issues I have run into.

    • Poor documentation on what special names there are
    • The x86_64 and Standalone folders are loaded when building for mobile. This causes the editor to halt if the standalone version of the plugin uses System.Net.
    • No Editor only plugin. This makes a x-platform plugin impossible to test in the editor when targeting mobile.
    Here is a solution I have come up with. It is a new Plugin / Special names hierarchy.

    • Plugins
      • Free
        • Editor, Standalone, iOS, Android, WindowsRT, ect...
      • Pro
        • Editor, Standalone, iOS, Android, WindowsRT, ect...
      • Editor, Standalone, iOS, Android, WindowsRT, ect...

    Rules
    • Plugins in the root "Plugin" folder are always loaded
    • Plugins in Pro are only loaded if Unity Pro
    • Plugins in Free are only loaded if Unity Free
    • Plugins in the platform specific directories are only loaded if in that platform
    • Plugins in the Editor folder are only loaded if in the editor regardless of platform
    This should solve most every conceivable 'gotcha' situation I can think of.

    p.s. Unity User Voice sucks. The limited votes makes it of limited use. Every time I go to use it I have to go around and delete my old votes. Really ? just make it a simple up-vote or 0-5 star rating system.
     
    Last edited: Sep 2, 2014