Author Topic: Issue with Mirror preprocessor directive upon build target change  (Read 57 times)

students_t

  • Newbie
  • *
  • Posts: 6
    • View Profile
Here's a very minor issue. I don't know enough about Unity, preprocessor directives, and Mirror to understand what causes the problem, but here's what happened:

I initially prepared PiratesOfVoxelPlay according to the documentation. It worked fine when Desktop Standalone was the build target. When I switched to iOS as the build target, I started getting an error about SimplePasswordAuthenticator not implementing the NetworkAuthenticator.OnClientAuthenticate() abstract method. For whatever reason, it appears that the script at
Code
Assets/Mirror/CompilerSymbols/PreprocessorDefine.cs
is no longer setting the MIRROR_40_0_OR_NEWER definition when I switch the build target to iOS.

My Mirror version is 40.0.9.

I hacked around the problem by simply adding
Code
#define MIRROR_40_0_OR_NEWER
to the top of the SimplePasswordAuthenticator.cs file.

This minor issue is thus not a problem for me, but I thought there was a chance it might be useful for you to know. Cheers.


Kronnect

  • Administrator
  • Hero Member
  • *****
  • Posts: 7097
    • View Profile
Thanks for the heads up. We'll share this with Mirror team, just in case.

Kronnect

  • Administrator
  • Hero Member
  • *****
  • Posts: 7097
    • View Profile
Also, right click on Mirror folder and Reimport should fix it.