@ -146,6 +146,13 @@ namespace FidelityFX
enabled = false ;
return ;
}
if ( shaders = = null )
{
Debug . LogError ( $"FSR3 Upscaler shaders are not assigned! Please ensure an {nameof(Fsr3UpscalerShaders)} asset is assigned to the Shaders property of this component." ) ;
enabled = false ;
return ;
}
if ( _maxRenderSize . x = = 0 | | _maxRenderSize . y = = 0 )
{
@ -459,5 +466,20 @@ namespace FidelityFX
return _maxRenderSize ;
}
#if UNITY_EDITOR
private void Reset ( )
{
if ( shaders ! = null )
return ;
string [ ] assetGuids = UnityEditor . AssetDatabase . FindAssets ( $"t:{nameof(Fsr3UpscalerShaders)}" ) ;
if ( assetGuids = = null | | assetGuids . Length = = 0 )
return ;
string assetPath = UnityEditor . AssetDatabase . GUIDToAssetPath ( assetGuids [ 0 ] ) ;
shaders = UnityEditor . AssetDatabase . LoadAssetAtPath < Fsr3UpscalerShaders > ( assetPath ) ;
}
#endif
}
}