Exemple #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);
        }