From 593d8ac6308a82e296ac587e7d4a412eb61594fa Mon Sep 17 00:00:00 2001 From: David Briscoe Date: Thu, 19 Dec 2024 01:24:38 -0800 Subject: [PATCH 1/2] Explain how to setup gui_in_3d Make it more obvious to newcomers how this demo works so they can replicate it in their projects. Change the text to point to how this is working. Add Editor Descriptions to make it clearer how this is setup. --- viewport/gui_in_3d/gui_panel_3d.tscn | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/viewport/gui_in_3d/gui_panel_3d.tscn b/viewport/gui_in_3d/gui_panel_3d.tscn index c8b2f8b50c..81b8de89a4 100644 --- a/viewport/gui_in_3d/gui_panel_3d.tscn +++ b/viewport/gui_in_3d/gui_panel_3d.tscn @@ -23,6 +23,7 @@ process_mode = 3 script = ExtResource("1") [node name="SubViewport" type="SubViewport" parent="."] +editor_description = "SubViewport allows us to use a ViewportTexture to display the contents of this viewport." gui_embed_subwindows = true size = Vector2i(560, 360) render_target_update_mode = 4 @@ -51,9 +52,11 @@ grow_vertical = 2 theme_override_constants/separation = 13 [node name="Label" type="Label" parent="SubViewport/GUI/Panel/VBoxContainer"] +custom_minimum_size = Vector2(200, 0) layout_mode = 2 -text = "Hello world!" +text = "SubViewport is rendered on Quad" horizontal_alignment = 1 +autowrap_mode = 2 [node name="Button" type="Button" parent="SubViewport/GUI/Panel/VBoxContainer"] layout_mode = 2 @@ -129,6 +132,12 @@ popup/item_2/text = "Item 2" popup/item_2/id = 2 [node name="Quad" type="MeshInstance3D" parent="."] +editor_description = "To setup this MeshInstance3D: +* Set Surface Material Override to a new StandardMaterial3D. +* At the bottom of the StandardMaterial3D's properties, set \"Local to Scene\" to true. +* Set the Albedo Texture of StandardMaterial3D to new ViewportTexture and set the Viewport Path. +* Transparency to Alpha. +* Shading to Unshaded." mesh = SubResource("1") surface_material_override/0 = SubResource("3") From ed22b67301a1306ca5c0d234e61461cd76344e4a Mon Sep 17 00:00:00 2001 From: David Briscoe <43559+idbrii@users.noreply.github.com> Date: Sat, 21 Dec 2024 07:24:18 -0800 Subject: [PATCH 2/2] Revise editor description phrasing Co-authored-by: Aaron Franke --- viewport/gui_in_3d/gui_panel_3d.tscn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/viewport/gui_in_3d/gui_panel_3d.tscn b/viewport/gui_in_3d/gui_panel_3d.tscn index 81b8de89a4..2b9500ae5a 100644 --- a/viewport/gui_in_3d/gui_panel_3d.tscn +++ b/viewport/gui_in_3d/gui_panel_3d.tscn @@ -23,7 +23,7 @@ process_mode = 3 script = ExtResource("1") [node name="SubViewport" type="SubViewport" parent="."] -editor_description = "SubViewport allows us to use a ViewportTexture to display the contents of this viewport." +editor_description = "SubViewport contents can be displayed using a ViewportTexture." gui_embed_subwindows = true size = Vector2i(560, 360) render_target_update_mode = 4