When using preprocessors, Unity throws errors

Hi all

Si my problem is that every time I use a preprocessor:

#if UNITY_EDITOR
some code
#endif

The compiler gives me errors like the following one:
“Expected `#endif’ directive”

I have found in this question that it’s an internal problem and that should reinstall Unity, so i did, I reinstalled the latest Unity version but the problem persisted.

Any help would be greatly appreciated.

-Jorge

@skullbeats1 Close your project then delete the Library folder from your project. Open the project and your problem resolved. :slight_smile: