tscn场景文件

Godot Engine 3.2 Alpha2

tscn即Godot的场景文件,t代表text scn是scene的缩写,是一种人类可读的文本格式。

例如下面这个场景

在这里插入图片描述
其场景文件的内容如下:

[gd_scene load_steps=7 format=2]

[ext_resource path="res://my_font.tres" type="DynamicFont" id=1]
[ext_resource path="res://mesh_instance.gd" type="Script" id=2]
[ext_resource path="res://hud.tscn" type="PackedScene" id=3]

[sub_resource type="ViewportTexture" id=1]
viewport_path = NodePath("mesh_instance/sprite_3d/viewport")

[sub_resource type="CubeMesh" id=2]

[sub_resource type="ViewportTexture" id=3]
viewport_path = NodePath("mesh_instance/sprite_3d/viewport")

[node name="game" type="Node"]

[node name="camera" type="Camera" parent="."]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 10.3015 )

[node name="sprite_3d" parent="camera" instance=ExtResource( 3 )]
texture = SubResource( 1 )

[node name="mesh_instance" type="MeshInstance" parent="."]
transform = Transform( 0.82934, 0, 0.558744, 0, 1, 0, -0.558744, 0, 0.82934, 0, 0, 0 )
mesh = SubResource( 2 )
material/0 = null
script = ExtResource( 2 )

[node name="sprite_3d" parent="mesh_instance" instance=ExtResource( 3 )]
texture = SubResource( 3 )

[node name="label" type="Label" parent="mesh_instance/sprite_3d/viewport" index="0"]
margin_right = 40.0
margin_bottom = 14.0
custom_fonts/font = ExtResource( 1 )
text = "Hello"

[editable path="mesh_instance/sprite_3d"]

评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

开发游戏的老王

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值