Search Unity

Everyplay error when building for Windows Store

Discussion in 'Unity Everyplay' started by kujo, Jul 15, 2015.

  1. kujo

    kujo

    Joined:
    Aug 19, 2013
    Posts:
    106
    Hi,

    I'm trying to build my game for Windows Store but every time I do, there is an issue in EveryplayRecButtons.cs. I get:

    Assets\Plugins\Everyplay\Scripts\EveryplayRecButtons.cs(356,52): error CS1061: 'System.Type' does not contain a definition for 'IsAssignableFrom' and no extension method 'IsAssignableFrom' accepting a first argument of type 'System.Type' could be found (are you missing a using directive or an assembly reference?)

    Is there any way to fix this? I'm using Unity 5.1.1f1, I've tried reimporting the assets but still get the same.

    Thanks
     
  2. ullatussimo

    ullatussimo

    Unity Technologies

    Joined:
    Jun 16, 2015
    Posts:
    108
  3. kujo

    kujo

    Joined:
    Aug 19, 2013
    Posts:
    106
    Hi @ullatussimo,

    I understand that its iOS and Android only at the moment - but adding in Everyplay to my game means that I can't release for Windows Phone because of the above compilation error. Is there a way around this without having to continually add/remove Everyplay from my project? My game is going to be released on iOS, Android and Windows Store.

    Thanks,

    Alan
     
  4. ullatussimo

    ullatussimo

    Unity Technologies

    Joined:
    Jun 16, 2015
    Posts:
    108
    Hi @kujo,

    Windows Phone uses a bit different subset of .net commands available, thus the Type class might not have all the same methods available as the other platforms. Try changing the line

    bool isToggleButton = typeof(ToggleButton).IsAssignableFrom(button.GetType());

    on EveryplayRecButtons.cs (line 356)

    to the following :

    bool isToggleButton = false;
    #if UNITY_ANDROID || UNITY_IPHONE
    isToggleButton = typeof(ToggleButton).IsAssignableFrom(button.GetType());
    #endif


    This is of course a temporary workaround, but it should let you compile for WP as well. I'll let our engineers know about this.
    Good catch!
     
  5. kujo

    kujo

    Joined:
    Aug 19, 2013
    Posts:
    106
    Worked great - thank you.
     
  6. ullatussimo

    ullatussimo

    Unity Technologies

    Joined:
    Jun 16, 2015
    Posts:
    108
    Hello @kujo,

    We've updated our SDK and it contains a fix for this issue. You don't need to do this manually anymore.
    Thanks for your patience.

    Cheers,
    Simo
     
  7. ev3d

    ev3d

    Joined:
    Apr 19, 2013
    Posts:
    327
    Issue is not fixed... There is still this...

    Assets\Plugins\Everyplay\Scripts\EveryplayRecButtons.cs(392,47): error CS1061: 'System.Type' does not contain a definition for 'GetTypeInfo' and no extension method 'GetTypeInfo' accepting a first argument of type 'System.Type' could be found (are you missing a using directive or an assembly reference?)
     
  8. timmetim

    timmetim

    Joined:
    Nov 6, 2013
    Posts:
    8
    Bump.. I am having a similar issue when trying to create a build for windows:

    349: [Unity] Assets/Editor/Everyplay/Scripts/EveryplayPostprocessor.cs(59,26): error CS1061: Type `EveryplaySettings' does not contain a definition for `IsBuildTargetEnabled' and no extension method `IsBuildTargetEnabled' of type `EveryplaySettings' could be found. Are you missing an assembly reference?

    Any updates?