Conditional Compilation Question

Hello guys,

what I have:

url = "file:///" + Application.streamingAssetsPath;

But, this code will work only on Unity Editor on Windows.

in macOS, to make it work I need the link to be file://, so with 2(two) slashes.

I tried with #if UNITY_EDITOR_OSX and #if !UNITY_EDITOR_WIN, but none of them seems to work.

I’m using the Unity Editor 2020.3.29f1

Thank you in advance.

_EDITOR preprocessor vars are true only when compiling for the editor, when running out builds it will always be false since its not compiling for the editor but for the player so you need to use the other ones without _EDITOR in it