question

halpar avatar image
halpar asked

Visual Studio Doesnt import Playfab While code compiles in Unity

unity3d
1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

halpar avatar image halpar commented ·

image As you can see from the image, visual studio shows error and says the type or name space name PlayFab could not be found, but in unity side my program works fine. Why is visual studio making this issue?

1 Like 1 ·

1 Answer

·
Seth Du avatar image
Seth Du answered

You need to check the below 2 places.

  • Make sure you have installed the latest SDK and it is in the root folder. Please note that if you are using PlayFab Unity extension and the SDK is not placed in the root, you need extra work to relocate it.
  • In visual studio installer, enable the "Game Development with Unity". Please note that you don't need to install Unity again, hence please unclick the Unity Hub in the right field. "Visual studio tools for Unity" is what we require.
  • In unity, navigate to preferences and select the visual studio you have installed in your computer as External Tools.
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.