Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prepared Autoload(Singletons) demo for Godot 4 #702

Merged
merged 1 commit into from
Apr 3, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion loading/autoload/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ This demo shows how to use autoloads to change between scenes.

Language: GDScript

Renderer: GLES 2
Renderer: Vulkan Mobile

Check out this demo on the asset library: https://godotengine.org/asset-library/asset/529

Expand Down
14 changes: 4 additions & 10 deletions loading/autoload/project.godot
Original file line number Diff line number Diff line change
Expand Up @@ -6,34 +6,28 @@
; [section] ; section goes between []
; param=value ; assign values to parameters

config_version=4
config_version=5

[application]

config/name="Autoload (Singletons)"
config/description="This demo shows how to use autoloads to change between scenes."
run/main_scene="res://scene_a.tscn"
config/features=PackedStringArray("4.0")

[autoload]

global="res://global.gd"

[display]

window/dpi/allow_hidpi=true
window/stretch/mode="2d"
window/stretch/mode="canvas_items"
window/stretch/aspect="expand"

[gdnative]

singletons=[]

[memory]

multithread/thread_rid_pool_prealloc=60

[rendering]

quality/driver/driver_name="GLES2"
vram_compression/import_etc=true
vram_compression/import_etc2=false
vulkan/rendering/back_end=1
6 changes: 3 additions & 3 deletions loading/autoload/scene_a.tscn
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
[gd_scene load_steps=2 format=2]
[gd_scene load_steps=2 format=3 uid="uid://bh2ylkcsgejgy"]

[ext_resource path="res://scene_a.gd" type="Script" id=1]
[ext_resource type="Script" path="res://scene_a.gd" id="1"]

[node name="SceneA" type="Panel"]
anchor_right = 1.0
anchor_bottom = 1.0
size_flags_horizontal = 2
size_flags_vertical = 2
script = ExtResource( 1 )
script = ExtResource( "1" )

[node name="Label" type="Label" parent="."]
offset_left = 64.0
Expand Down
6 changes: 3 additions & 3 deletions loading/autoload/scene_b.tscn
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
[gd_scene load_steps=2 format=2]
[gd_scene load_steps=2 format=3 uid="uid://pt77vxjf3uwe"]

[ext_resource path="res://scene_b.gd" type="Script" id=1]
[ext_resource type="Script" path="res://scene_b.gd" id="1"]

[node name="SceneB" type="Panel"]
anchor_right = 1.0
anchor_bottom = 1.0
size_flags_horizontal = 2
size_flags_vertical = 2
script = ExtResource( 1 )
script = ExtResource( "1" )
__meta__ = {
"_edit_use_anchors_": false
}
Expand Down