Skip to content

Commit

Permalink
fix: shaders for SoftMask are not automatically included
Browse files Browse the repository at this point in the history
  • Loading branch information
mob-sakai committed Jul 25, 2024
1 parent 731f137 commit ebd0051
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions Packages/src/Runtime/ProjectSettings/UISoftMaskProjectSettings.cs
Original file line number Diff line number Diff line change
@@ -1,17 +1,23 @@
#pragma warning disable CS0414
using System.Linq;
using Coffee.UISoftMaskInternal;
using UnityEditor;
using UnityEngine;
using UnityEngine.Serialization;
using UnityEngine.UI;
#if UNITY_MODULE_VR
using UnityEngine.XR;
#endif
#if UNITY_EDITOR
using UnityEditor;
using UnityEditor.Build;
using UnityEditor.Build.Reporting;
#endif

namespace Coffee.UISoftMask
{
public class UISoftMaskProjectSettings : PreloadedProjectSettings<UISoftMaskProjectSettings>
#if UNITY_EDITOR
, IPreprocessBuildWithReport
#endif
{
public enum FallbackBehavior
{
Expand Down Expand Up @@ -192,6 +198,13 @@ internal static bool CanIncludeShader(Shader shader)
|| name == "Hidden/UI/TerminalMaskingShape";
}

public int callbackOrder => 0;

void IPreprocessBuildWithReport.OnPreprocessBuild(BuildReport report)
{
ReloadShaders(false);
}

[SettingsProvider]
private static SettingsProvider CreateSettingsProvider()
{
Expand Down

0 comments on commit ebd0051

Please sign in to comment.