- Home /
What am I missing? Intellisense says 'ok' Editor runs ok. Build fails!?!?!
error CS0246: The type or namespace name 'NetworkPlayer' could not be found (are you missing a using directive or an assembly reference?)
No, I don't think I am. I copied from the Scripting manual. I get nice (not red) Intellisense render in Mono, so it thinks everything is ok. No errors running in Editor. But when I build, I get the above error.
Here's my code: https://docs.unity3d.com/ScriptReference/MonoBehaviour.OnPlayerDisconnected.html
except my function body is nearly empty except for the Debug.Log
Answer by TanselAltinel · Oct 28, 2017 at 03:26 PM
IntelliSense showing no errors sometimes means nothing as Unity itself will be compiling the code.
Are you sure you have using UnityEngine;
in the import section and your script is actually extending from MonoBehaviour
type?
Your answer
Follow this Question
Related Questions
Start Executable in same Process as UWP application 0 Answers
How to fix Problem with Lidgren Network Library after Universal Windows Platform build in Unity? 0 Answers
Native extension for OSXStandalone target not found 4 Answers
Universal Windows Platform - Huuuuuuuge Build Error 0 Answers
Building solution generated by building to uwp causes pc to bluescreen 0 Answers