Search Unity

Editor Should Attempt To Match Multiple DLLs By Metadata

Discussion in 'Editor & General Support' started by LacunaCorp, Nov 4, 2019.

  1. LacunaCorp

    LacunaCorp

    Joined:
    Feb 15, 2015
    Posts:
    147
    I'm building a plugin for the asset store which uses it's own crossplatform native rendering library on top of Unity. The native plugin is built for Windows, Linux, Mac, on x86, x86_64, and ARM variants where applicable. These are shared between the editor and builds, as they work independently of Unity.

    In other words, when I put this on the asset store, it's going to ship with all of these plugin variants, and the Windows, Linux and Mac variants will also need to be loaded in the editor where applicable.

    Unity throws, complaining that there are multiple plugins found for the Editor with the same name. Obviously this can be fixed by disabling every plugin but the required editor variant, but I don't want users to have to do this. I'm probably just going to have CMake spit out names based on the architecture and then map this to imports at runtime, but I'd rather keep the names the same.

    Suggestion; Unity should attempt to map any "duplicate" plugins found for the Editor to the active platform and architecture. Each plugin has metadata describing it's supported targets, i.e. there is a Windows x86 and Windows x86_64 DLL, but Unity immediately throws rather than attempting to load the correct one. The Editor should only throw if it can't match any of the targets (i.e. if there is no metadata available, or if the metadata defines conflicting targets) to the active system.
     
    Last edited: Nov 22, 2019