CompilationPipeline.assemblyCompilationStarted' is obsolete warning

I am getting the following warning from PhotonEditor.cs

'CompilationPipeline.assemblyCompilationStarted' is obsolete: 'Use compilationStarted, compilationFinished or assemblyCompilationFinished instead. Note that using any of these functions to do time measurements is a bad idea as they run async to actual compilation.' [PhotonUnityNetworking.Editor]

It is being triggered by both of the lines:
CompilationPipeline.assemblyCompilationStarted -= OnCompileStarted;
CompilationPipeline.assemblyCompilationStarted += OnCompileStarted;

I tried swapping "assemblyCompilationStarted" with "compilationStarted" and got an error saying:

No overload for 'OnCompileStarted' matches delegate 'Action<object>' [PhotonUnityNetworking.Editor]

I am using PUN version: 2.33.3 Photon Lib: 4.1.6.3 and Unity version 2021.1.15f1

Before I dig myself to far into a hole, I just wanted to check if there is a known fix for this warning.

Thank you.

Comments

  • I have downloaded and imported PUN2 Version 2.34 from the package manager but my server settings still show 2.33.3
  • Tobias
    Tobias admin
    Oh. Maybe the version string wasn't updated.
    Need to check.

    Also thanks for reporting the obsolete API. Apparently Unity changed this in 2021 and we missed it.
    A tiny update for PUN will come soon (correcting both).
  • Thank you
  • This was fixed in the latest update.

    Thanks