You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
static var scene: PackedScene = preload("res://example.tscn") in a script attached to a Node saved as example.tscn, when reloaded in Godot, makes the example.tscn file unable to be opened in Godot.
It does work when running your project however, and if that line is commented out in the script and the project reloaded, then the scene is editable again.
Steps to reproduce
Create the following files:
example.gd:
extends Node
static var scene: PackedScene = preload("res://example.tscn")
example.tscn: A scene with a Node root with the example.gd script attached.
Reproduce the error
Click Project -> Reload Current Project
Open example.tscn
Observe error alert Scene file 'example.tscn' appears to be invalid/corrupt.
Observe console output:
scene/resources/resource_format_text.cpp:283 - res://example.tscn:6 - Parse Error:
Failed loading resource: res://example.tscn. Make sure resources have been imported by opening the project in the editor at least once.
scene/resources/packed_scene.cpp:92 - Condition "nc == 0" is true. Returning: nullptr
editor/editor_data.cpp:880 - Index p_idx = 2 is out of bounds (edited_scene.size() = 2).
editor/editor_data.cpp:683 - Index p_idx = 2 is out of bounds (edited_scene.size() = 2).
editor/editor_data.cpp:745 - Index p_idx = 2 is out of bounds (edited_scene.size() = 2).
Godot version
v4.1.1.stable.official [bd6af8e]
System information
Godot v4.1.1.stable - macOS 13.5.1 - Vulkan (Compatibility) - AMD Radeon Pro 580X OpenGL Engine - Intel(R) Core(TM) i5-9600K CPU @ 3.70GHz (6 Threads)
Issue description
static_scene_corrupt.mov
static var scene: PackedScene = preload("res://example.tscn")
in a script attached to aNode
saved asexample.tscn
, when reloaded in Godot, makes theexample.tscn
file unable to be opened in Godot.It does work when running your project however, and if that line is commented out in the script and the project reloaded, then the scene is editable again.
Steps to reproduce
Create the following files:
example.gd
:example.tscn
: A scene with aNode
root with theexample.gd
script attached.Reproduce the error
Project -> Reload Current Project
example.tscn
Scene file 'example.tscn' appears to be invalid/corrupt.
Minimal reproduction project
static_scene_bug_repro.zip
The text was updated successfully, but these errors were encountered: