When I try to build my unity project for PC I keep getting prompted with this error message and the build cannot complete:
Assets\PlayFabController.cs(3,15): error CS0234: The type or namespace name 'PfEditor' does not exist in the namespace 'PlayFab' (are you missing an assembly reference?)
I am using unity 2019.2.18f1 and I have the up to date PlayFab
Any work around for this?
,While trying to build my game in Unity, I keep getting this error that prevents me from completing the build:
Assets\PlayFabController.cs(3,15): error CS0234: The type or namespace name 'PfEditor' does not exist in the namespace 'PlayFab' (are you missing an assembly reference?)
I am using Unity 2019.2.10f1 with all up to date PlayFab.
Any way to work around this?
Answer by Nick Amato · Apr 05, 2020 at 06:11 PM
Hey guys,
Sorry for such a delayed response. To begin, I was following this youtube tutorial (https://www.youtube.com/watch?v=rCcll2yPCWo&list=PLWeGoBm1YHVgi6ZcwWGt27Y4NHUAG5smX∈dex=1) to set up a simple database for my small indie game. In "Lesson 5" the tutorial sets up some cloud scripts, that is where I ran into this error. From there, I simply started backtracking to where my game actually worked.
In short, my solution was to remove the code for cloud scripting. There are other ways to post and retrieve data from the database without using cloud scripting. If you'd like to learn more about it, I suggest watching the entire youtube series that I linked to previously.
The purpose of playfab in my game is for a small user base in which cloud scripting isn't necessary. So my solution of just removing it is fine in my case. Perhaps you NEED to have cloud scripting for your situation. In that case, I'm not quite sure how to work around this error.
Anyways, hope this helped a little bit.
Answer by Christian · Apr 16, 2020 at 07:07 PM
Just chiming in here to let you all guys know I had the very same issue this morning, Since the post selected here as Best Answer did not help me at all I thought I'd tell you what I did to solve this. it's basically an issue regarding the import of that specific library, that seems it's not allowed to get included in a final build.
In my case I was using a reference of 'Playfab.PfEditor.Json.JsonWrapper' class when calling the function 'Deserialize'. Replacing that call with the very same one found in "PlayFab.Json.PlayFabSimpleJson" made the error go away and works the exact same way.
Summarizing: Get rid of any import that contains a reference to 'PfEditor' and you should be good to go.
Hope this helps some of you folks.
Answer by Noel Ramirez · Sep 02, 2020 at 02:53 AM
I found an answer on this post
https://community.playfab.com/questions/34407/json-problem-with-playfab-and-unity-20192.html