Search Unity

Editor methods not compatible with Net core

Discussion in 'Windows' started by Stranger-Games, Dec 29, 2015.

  1. Stranger-Games

    Stranger-Games

    Joined:
    May 10, 2014
    Posts:
    393
    Hi,

    When I am doing a master build in visual studio, I get the following errors. The Class.method() is a unity Editor class, so I am not sure why visual studio is even including the editor classes in the build.
    When I built in unity, I chose Net Core compiler override and fixed all net core incompatible stuff, in the player scripts, and not in the editor scripts as I thought they should not be compiled any way.
    How can I exclude the editor classes from compiling with master?
    By the way, the same project compiles fine in Debug or Release configuration.

    Any help is greatly appreciated.
     
  2. GarthSmith

    GarthSmith

    Joined:
    Apr 26, 2012
    Posts:
    1,240
    Is the script in a folder named "Editor"? You can also try wrapping the whole thing in #if UNITY_EDITOR / #endif.
     
  3. Stranger-Games

    Stranger-Games

    Joined:
    May 10, 2014
    Posts:
    393
    @Garth Smith Yes it is in a folder called "Editor". I am not sure what are the scripts for all the methods. For example I am not sure where "ExtensionRegistry.AddExtensionMembers" is referenced. I can search them one by one, but it will be impossible if there is a DLL editor plugin, as I use some ads and mobile plugins for Android/iOS which has a lot of Editor scripts. Any way, I will try to wrap every editor script in #if UNITY_EDITOR / #endif as a workaround for now.
     
  4. turov_k

    turov_k

    Joined:
    Feb 12, 2016
    Posts:
    2
    Hi.
    In our case same errors was present.
    But it is not correct output UWP log.
    When any internal compile problem present in project, VS show errors from last warnings.
    In our case we added shaders for instancing objects.
    Shaders! And UWP master build was broken.
    Regards, Kirill.