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
I has a root scene contains a scene2 in the node tree, and if now I use preload() function in other .gd files, will cause ' possible cyclic resource inclusion' error.
Steps to reproduce
if you use my reproduction project directly:
(on start, output will get a error, scene1.gd will auto disattach from scene1.tscn)
attach scene1.gd on scene1.tscn
run the scene2, will show errors in output
start from a new project:
create two scenes: scene1.tscn, a scene2.tscn
scene2.tscn instantiates a child from scene1.tsn
scene1.tscn add a script, add write:
extends Node2D
class_name Scene1
const scene1 := preload("res://Scene1.tscn")
func Create() -> Scene1:
# scene1 will be null
return scene1.instantiate() as Scene1
run the scene2 or restart the editor, will show errors
Godot version
4.0.3.stable
System information
Windows11, GLES3
Issue description
I has a root scene contains a scene2 in the node tree, and if now I use preload() function in other .gd files, will cause ' possible cyclic resource inclusion' error.
Steps to reproduce
if you use my reproduction project directly:
(on start, output will get a error, scene1.gd will auto disattach from scene1.tscn)
start from a new project:
Minimal reproduction project
CyclicResource.zip
The text was updated successfully, but these errors were encountered: