A game about forced loneliness, made by TACStudios
at master 23 lines 691 B view raw
1using UnityEngine.Rendering; 2 3namespace UnityEditor.Rendering 4{ 5 class STPResourceStripper : IRenderPipelineGraphicsSettingsStripper<STP.RuntimeResources> 6 { 7 public bool active => true; 8 9 public bool CanRemoveSettings(STP.RuntimeResources resources) 10 { 11 bool isStpUsed = false; 12 13 foreach (var asset in CoreBuildData.instance.renderPipelineAssets) 14 { 15 if (asset is ISTPEnabledRenderPipeline stpEnabledAsset) 16 isStpUsed |= stpEnabledAsset.isStpUsed; 17 } 18 19 // We can strip STP's resources if it's not used by any pipeline assets 20 return !isStpUsed; 21 } 22 } 23}