Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

Bug I lose every conditionally compiled reference in every prefab after building in last alpha.

Discussion in '2023.1 Beta' started by Oniros88, Dec 14, 2022.

  1. Oniros88

    Oniros88

    Joined:
    Nov 15, 2014
    Posts:
    150
    Every single reference I have that exists only in client builds (compiled with #if ) is totally lost when switching to server platform and building a server. After I switch back to client where the references are not compiled out, every single inspector field in every single prefab in the game that is under "#if client" directives is permanently lost. I have to backup the entire project every single time I want to build a server, as there are hundreds of prefabs with client only references.

    This didn't happen before switching to Alpha. Before, the references were still assigned after going back to client platform. Is there something I am missing?
     
  2. MirceaI

    MirceaI

    Unity Technologies

    Joined:
    Nov 24, 2020
    Posts:
    36
    Hi @Oniros88! I'm assuming you are talking about 2023.1 - if this is the case we refactored the Prefab save code which might cause this regression, but I'm not sure your workflow implies saving Prefabs and the issue might be from something else. Can you please submit a bug with a minimal repro case or post here the repro case?
     
  3. Crystalline

    Crystalline

    Joined:
    Sep 11, 2013
    Posts:
    171
    Still happens randomly, 2022.3.1