Beispiel #1
0
        private static Material GetDefaultDiffuseMaterial()
        {
#if UNITY_EDITOR
            // also save the material in the Assets
            if (!RuntimeUrdf.IsRuntimeMode() && MaterialExtensions.GetRenderPipelineType() == MaterialExtensions.RenderPipelineType.Standard)
            {
                s_DefaultDiffuse = RuntimeUrdf.AssetDatabase_GetBuiltinExtraResource <Material>("Default-Diffuse.mat");
            }
#endif
            if (s_DefaultDiffuse)
            {   // Could't use the "Default-Diffuse.mat", either because of HDRP or runtime. so let's create one.
                s_DefaultDiffuse = MaterialExtensions.CreateBasicMaterial();
            }
            return(s_DefaultDiffuse);
        }
Beispiel #2
0
 public void AssetDatabase_GetBuiltinExtraResource_Sprite()
 {
     RuntimeUrdf.runtimeModeEnabled = false;
     Assert.IsNotNull(RuntimeUrdf.AssetDatabase_GetBuiltinExtraResource <Sprite>("UI/Skin/Background.psd"));
 }