Stuck in infinite 'CodeGen' loop after updating to 2.25.1

Hi!

Don't know what I did wrong, but I just updated to 2.25.1 but the editor has been stuck in a loop on codegeneration ever since. ( rebuilding packobject codegen ?)

There are a bunch of errors like these:
\Third Party Assets\Photon\PhotonUtilities\PackObject\_GeneratedPackExtensions\Pack_TestPackObject.cs(10,15): error CS0101: The namespace 'Photon.Compression.Internal' already contains a definition for 'PackFrame_TestPackObject'

All errors originate from PhotonUtilities/PackObject/CodeGen or similar.

Can't copy paste anything from the console - the editor freezes. Can access the log if necessary.

Anyone experiencing the same? Is there something I am missing?

I am using Unity 2019.4.12f1

-Pieter

Best Answer

  • PieterAlbers
    Answer ✓
    I changed the PACKABLE_PATH in TypeCatalogue.cs to use my custom folder location.
    So far it seems to work.

Answers

  • Just an update - it is related to not having Photon in the default location. As I suspected unfortunately

    I keep Third party assets in a separate folder to keep our project(s) organized and I feel an asset should never be developed without the possibility to move it..

    Updating Photon from/in the default location is fine, but moving it afterwards will - once again- start the infinite codegeneration loop.

    Would love to see the options to properly move the full asset to another folder.

    -PIeter

  • PieterAlbers
    Answer ✓
    I changed the PACKABLE_PATH in TypeCatalogue.cs to use my custom folder location.
    So far it seems to work.
  • I have just added a line in the error checks that accounts for people having moved the folder that should stop this loop in the future. However moving Photon folders is not recommended and likely will never be officially supported. I won't get into why moving folders in Unity isn't something you can count on being able to do, but this fix should at least unbreak the damage.
  • emotitron wrote: »
    I have just added a line in the error checks that accounts for people having moved the folder that should stop this loop in the future. However moving Photon folders is not recommended and likely will never be officially supported. I won't get into why moving folders in Unity isn't something you can count on being able to do, but this fix should at least unbreak the damage.

    Thanks for getting back on this and for the fix.

    It's a shame some assets cannot be moved properly to separate folders. It has been a frustration of mine and other developers I have worked with.
  • emotitron
    emotitron ✭✭✭
    edited December 2020
    I have a release pending for Monday that references the folders using the PhotonUtilities .meta GUID... which should make this particular issue go away. I am able to relocate the Photon directory with the changes without anything breaking. The fix does add some fragility to the code so will have to keep an eye out for other path related errors if race conditions occur.