Microsoft Azure PlayFab logo
    • Multiplayer
    • LiveOps
    • Data & Analytics
    • Add-ons
    • For Any Role

      • Engineer
      • Designer
      • Executive
      • Marketer
    • For Any Stage

      • Build
      • Improve
      • Grow
    • For Any Size

      • Solo
      • Indie
      • AAA
  • Runs on PlayFab
  • Pricing
    • Blog
    • Forums
    • Contact us
  • Sign up
  • Sign in
  • Ask a question
  • Spaces
    • PlayStream
    • Feature Requests
    • Add-on Marketplace
    • Bugs
    • API and SDK Questions
    • General Discussion
    • LiveOps
    • Topics
    • Questions
    • Articles
    • Ideas
    • Users
    • Badges
  • Home /
  • General Discussion /
avatar image
Question by contact-3 · Jul 30, 2018 at 05:08 PM · unity3dsdks

SDK for Unity 2017.4 LTS (probably 2018 too) has no Editor asmdef. Fails to build standalone.

Hi,

In Unity 2017+ using asmdef files counters Unity figuring out "Editor" folders to be excluded on builds. Causing build failures with for instance playfab unity SDK.

We have to manually exclude them with an editor only asmdef.

Below our current workaround moving all editor folders in one place and adding an asmdef,

Best

capture.jpg (71.7 kB)
Comment

People who like this

0 Show 0
10 |1200 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

2 Replies

· Add your reply
  • Sort: 
avatar image
Best Answer

Answer by MarcoWilliamsPF · Jul 31, 2018 at 03:28 PM

We will look into this issue. I'll file a ticket for investigation.

As far as I know Editor Extensions and any Editor files in the PlayFab SDKs do not cause compile or build errors in any Unity Versions (tested on all versions post Unity 5.6).

So I'm confused as to what the repro steps are to make that happen. Can you provide steps to reproduce this issue?

Comment

People who like this

0 Show 2 · Share
10 |1200 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Jay Zuo ♦ · Aug 08, 2018 at 02:52 AM 0
Share

I'd believe @contact-3 used assembly definition files which is newly added in Unity 2017.3. To reproduce this issue, we can add a .asmdef file under "PlayFabSdk" folder. Then when we try to build the project we will get some build error. This is because Unity gives priority to the assembly definition files over the Predefined Compilation System. And this will cause "Editor" folders in PlayFabSdk have wrong references. There are some discussions about this issue like https://forum.unity.com/threads/example-project-assembly-definition-files.482313/page-4#post-3296568. As PlayFabSdk does not use assembly definition files, I don't think this is a SDK issue. But if all editor related files in PlayFabSdk can be put in one folder might be helpful for @contact-3's issue.

avatar image contact-3 Jay Zuo ♦ · Aug 08, 2018 at 01:50 PM 0
Share

Yes it will concern unity 2017.2+ builds when you need to have a reference to playfabSDK while you're using your own asmdef for your code. In order for it to work with current version of the SDK you must 1. Put an asmdef file ie"playfab-sdk" in the root folder of playfab. 2. Put together all editor only files with their own asmdef "playfab-sdk-editor" (with editor only setting as stated in my OP) 3. Reference "playfab-sdk" in "playfab-sdk-editor" asmdef. Then you can reference playfab sdk in your own assemblies if needed.

avatar image

Answer by Jay Zuo · Jul 31, 2018 at 09:41 AM

PlayFab Unity SDK does not use assembly definition files. And for the "Editor" folders issue, this is because

Unity gives priority to the assembly definition files over the Predefined Compilation System. This means that having any of the special folder names from the predefined compilation inside a assembly definition file folder does not have any effect on the compilation. Unity treats these as regular folders without any special meaning.

For more information, see https://forum.unity.com/threads/example-project-assembly-definition-files.482313/page-4#post-3296568

Moving all editor folders into a separate assembly is a workaround, also you can try with "#if UNITY_EDITOR #endif" block like in this answer.

Comment

People who like this

0 Show 0 · Share
10 |1200 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Navigation

Spaces
  • General Discussion
  • API and SDK Questions
  • Feature Requests
  • PlayStream
  • Bugs
  • Add-on Marketplace
  • LiveOps
  • Follow this Question

    Answers Answers and Comments

    2 People are following this question.

    avatar image avatar image

    Related Questions

    Unity Download Content from CDN before Log-in,Download content with CDN before login 1 Answer

    OAuth consent screen and Playfab: Can't verify because I don't own playfab.com domain 3 Answers

    Catalog's Item Custom Data 1 Answer

    What happened to the OneSignal addon? (having iOS push errors with PlayFab) 1 Answer

    Unity Download Content from CDN before Log-in 1 Answer

    PlayFab

    • Multiplayer
    • LiveOps
    • Data & Analytics
    • Runs on PlayFab
    • Pricing

    Solutions

    • For Any Role

      • Engineer
      • Designer
      • Executive
      • Marketer
    • For Any Stage

      • Build
      • Improve
      • Grow
    • For Any Size

      • Solo
      • Indie
      • AAA

    Engineers

    • Documentation
    • Quickstarts
    • API Reference
    • SDKs
    • Usage Limits

    Resources

    • Forums
    • Contact us
    • Blog
    • Service Health
    • Terms of Service
    • Attribution

    Follow us

    • Facebook
    • Twitter
    • LinkedIn
    • YouTube
    • Sitemap
    • Contact Microsoft
    • Privacy & cookies
    • Terms of use
    • Trademarks
    • Safety & eco
    • About our ads
    • © Microsoft 2020
    • Anonymous
    • Sign in
    • Create
    • Ask a question
    • Create an article
    • Post an idea
    • Spaces
    • PlayStream
    • Feature Requests
    • Add-on Marketplace
    • Bugs
    • API and SDK Questions
    • General Discussion
    • LiveOps
    • Explore
    • Topics
    • Questions
    • Articles
    • Ideas
    • Users
    • Badges