Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Feedback Why Unity compiles shadres for dedicated server (no graphics) build? Maybe it should be disabled?

Discussion in 'Editor & General Support' started by ViacheslavRud, Mar 21, 2023.

  1. ViacheslavRud

    ViacheslavRud

    Joined:
    Aug 1, 2018
    Posts:
    19
    Unity 2021.3.21f1 HDRP
    Shader variants compilation takes a lot of time, would be better to skip them for the console build.
    If it is possible.
     
    kmowers likes this.
  2. kmowers

    kmowers

    Joined:
    Dec 12, 2016
    Posts:
    15
    I also have been wondering how to skip shader variants compilation for dedicated server build! Can someone enlighten us please
     
  3. jonkuze

    jonkuze

    Joined:
    Aug 19, 2012
    Posts:
    1,685
    How do we tag Unity Team on this issue??? I am not intentionally loading any shaders on server side but yet my dedicated linux server build with no graphics also does the same, trying to load shaders.

    i though Unity Dedicate Server build was suppose to strip shaders by default?
     
  4. cristianm_unity

    cristianm_unity

    Unity Technologies

    Joined:
    Oct 16, 2018
    Posts:
    234
    Last edited: Oct 3, 2023
    jonkuze likes this.
  5. jonkuze

    jonkuze

    Joined:
    Aug 19, 2012
    Posts:
    1,685
    Thanks soo much!!! This is very helpful!
     
  6. RikuTheFuffs

    RikuTheFuffs

    Joined:
    Sep 9, 2013
    Posts:
    15
    @cristianm_unity Is there an API for enabling this in a build script?

    EDIT: I'm on 2022.3.2f1 and can't find it in any way, not even in the Player Settings window. Was this added later on?
     
    Last edited: Oct 5, 2023
  7. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,504
  8. cristianm_unity

    cristianm_unity

    Unity Technologies

    Joined:
    Oct 16, 2018
    Posts:
    234
    Indeed, it was added recently to 2022.3. So I'd recommend trying it in the latest 22 LTS.