示例#1
0
        private static void DrawRenderPipelineSettingGUI()
        {
            GRenderPipelineType pipeline = GCommon.CurrentRenderPipeline;
            string label = string.Format("0. {0} Render Pipeline Setup", pipeline.ToString());
            string id    = "wizard-rp-setup";

            GEditorCommon.Foldout(label, true, id, () =>
            {
                string instruction = string.Format(
                    "Install additional package for {0} Render Pipeline.\n" +
                    "Status: {1}.",
                    pipeline,
                    GPackageInitializer.isUrpSupportInstalled ? "INSTALLED" : "NOT INSTALLED");
                EditorGUILayout.LabelField(instruction, GEditorCommon.WordWrapLeftLabel);
                if (pipeline == GRenderPipelineType.Universal)
                {
                    if (GUILayout.Button("Install"))
                    {
                        GUrpPackageImporter.Import();
#if GRIFFIN_URP
                        Griffin.URP.GGriffinUrpInstaller.Install();
#endif
                    }
                }
            });
        }
示例#2
0
        private void CheckForUrpFirstTimeImport()
        {
            if (Application.isPlaying || EditorApplication.isPlayingOrWillChangePlaymode)
            {
                return;
            }

            if (GCommon.CurrentRenderPipeline == GRenderPipelineType.Universal)
            {
                if (!GPackageInitializer.isUrpSupportInstalled)
                {
                    GUrpPackageImporter.Import();
                }
            }
        }