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 /
  • Bugs /
avatar image
Question by Richard Bates · Nov 06, 2020 at 08:33 PM · unity3d

Unity Editor Extension location detection code is faulty

I tried moving the Unity Editor Extensions to a folder named 3rdPartyAssets to fit with our project structure (which is possible according to https://github.com/PlayFab/UnityEditorExtensions), which led to an exception:

NullReferenceException at PlayFabEditorExtensions/Editor/PlayFabEditor.cs:151

The problem appears to be that PlayFabEditorHelper.GetUiStyle() has

eachPath.Substring(eachPath.LastIndexOf("Assets"));

which incorrectly matched our 3rdPartyAssets path.

I edited that, and installed & relocated the SDK, but then the code to detect the relocation of EditorExtensions failed, because a copy of the unity package was stored in the default location, and PlayFabEditorHelper interprets the presence of files in the default location as evidence that EditorExtensions hasn't been moved.

Finally, the EdExPath in the PlayFabEditorPrefsSO scriptable object contained the absolute path of the folder, which obviously was incorrect on our other users' machines,causing new default files to be generated. I modified this to be a relative path.

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

1 Reply

· Add your reply
  • Sort: 
avatar image
Best Answer

Answer by Junjin Chen · Nov 09, 2020 at 07:44 AM

The PlayFabEditorExtensions SDK should be imported to Assets Folder by default. It is currently not support to move the PlayFabEditorExtensions Folder under other folders whose name contains string “Assets”. A solution could be to change the Folder name from “3rdPartyAssets” to one that does not contain “Assets”, for example, “3rdPartySDK”.

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 Richard Bates · Nov 12, 2020 at 01:53 AM 0
Share

The remainder of my post still stands.

I tried your suggestion in an empty project. After relocating PlayFabEditorExtensions to a folder called '3rdParty', I installed the SDK, and a folder 'PlayFabEditorExtensions' is still created in the root of Assets.

avatar image Junjin Chen Richard Bates · Nov 12, 2020 at 05:11 AM 0
Share

The PlayFabEditorExtensions folder generated in the root of Assets is not important and can be removed, it will not affect the use of PlayFab SDK. If there is any other concerns, please let me know.

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 Android Plugin 1 Answer

    Can't Install PlayFab Unity SDK. 1 Answer

    Unity Editor Extension does not appear 0 Answers

    Unity SDK il2cpp compilation issue 2 Answers

    Can't register without an username (e-mail only) 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