您当前的位置: 首页 > 

开发游戏的老王

暂无认证

  • 3浏览

    0关注

    803博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文

tscn场景文件

开发游戏的老王 发布时间:2019-10-24 12:19:43 ,浏览量:3

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"]

关注
打赏
1656935939
查看更多评论
立即登录/注册

微信扫码登录

0.0470s