When i run this game, it's work, but i build this game to apk i get message eror on my console
Assets/Photon/PhotonUnityNetworking/Code/Editor/PhotonEditor.cs(17,7): error CS0246: The type or namespace name `UnityEditor' could not be found. Are you missing an assembly reference?
Do you have any assembly definition file in your project? (Look for .asmdef
files)
Answer by Captain_Pineapple · May 30, 2020 at 12:36 PM
i know it's late to answer to this one but the UnityEditor namespace is not supposed to be built with. You can add a precompiler statement around the file to solve this:
add #if !UNITY_EDITOR
at the top of the file and #endif
at the end of the file.
The file is part of Photon, and is located in an Editor
folder so this error should not happen unless there is a global assembly definition file in the project. In this case, this file will be part of the runtime assembly and throw this error.
Your answer
![](https://koobas.hobune.stream/wayback/20220612235053im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Black Screen only in Android build 1 Answer
How To ReduCe The Apk Size? 0 Answers
Android app unity not working 0 Answers
why android app after building is not working on physical device? 1 Answer
Apk build and install problem 0 Answers