root/3d/3d_label.tscn

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
[gd_scene load_steps=4 format=2]

[ext_resource path="res://3d/3d_label.gd" type="Script" id=1]

[sub_resource type="ViewportTexture" id=3]
viewport_path = NodePath("Viewport")

[sub_resource type="SpatialMaterial" id=2]
resource_local_to_scene = true
flags_transparent = true
flags_fixed_size = true
params_billboard_mode = 1
albedo_texture = SubResource( 3 )

[node name="3d_label" type="Spatial"]
script = ExtResource( 1 )

[node name="Viewport" type="Viewport" parent="."]
size = Vector2( 200, 50 )
own_world = true
transparent_bg = true

[node name="Label" type="Label" parent="Viewport"]
margin_right = 40.0
margin_bottom = 31.0
text = "Text
"

[node name="Sprite3D" type="Sprite3D" parent="."]
material_override = SubResource( 2 )
cast_shadow = 0