Search Unity

  1. Unity 2019.1 is now released.
    Dismiss Notice
  2. We've opened up a space to discuss, share feedback, and showcase everything related to the Unity Shader Graph! Come show us what you've made.
    Dismiss Notice

Execute editor window scripts when project errors are present

Discussion in 'Extensions & OnGUI' started by Aridez, Feb 2, 2019.

  1. Aridez

    Aridez

    Joined:
    Feb 12, 2014
    Posts:
    9
    Hi!

    I'm trying to publish another asset to the asset store, but this one integrates some third party libraries. I was told that I couldn't submit these libraries directly within my package (even with their licenses) so I wanted to allow the users to download the dependencies with just a click through an editor window.

    But I found that when there are errors on the project the editor window scripts won't run, and of course, without these third-party dependencies the project has some errors upon being downloaded. I was told to just put a disclaimer on the page and on the README file, but I'd really like to make things easier for anyone downloading this asset.

    Is there any way to force the execution of editor window scripts? Or is there any way to ignore the "missing assembly reference" errors?
     
  2. Madgvox

    Madgvox

    Joined:
    Apr 13, 2014
    Posts:
    584
    You'd have to wrap your third party code in conditional execution statements, then try to detect the existence of the third party libraries on initialize and inject the conditional statement into the project settings, then trigger an assembly reload.
     
  3. MrMatthias

    MrMatthias

    Joined:
    Sep 18, 2012
    Posts:
    143
    or you have some bootstrap code that will install your asset which is in a unity package. But I would probably choose a different library, since the license of your library will extend to the content of your customers, at least that's what i assume is the reason for rejecting your asset.

    The relevant section in the asset store provider agreement states:
     
    Last edited: Feb 3, 2019
  4. Aridez

    Aridez

    Joined:
    Feb 12, 2014
    Posts:
    9
    I contacted them and told me that it was enough to specify in a "third-parties.txt" file which dependencies I had and where their licenses where. Thanks for the replies!