Closed baileyhalfcat closed 2 months ago
Please upload an MRP even if the steps are simple, it helps a lot to identify exactly what is wrong, and helps working out the steps, you might have missed something or something you didn't think of might be important
From your description, though I can't quite understand your instruction which is why I think an MRP would help, it sounds like you have a circular reference where one scene loads another that loads the first one, that's not supported in this way with preload
, but will test once you upload an MRP
From your description, though I can't quite understand your instruction which is why I think an MRP would help, it sounds like you have a circular reference where one scene loads another that loads the first one, that's not supported in this way with
preload
, but will test once you upload an MRP
im actually a moron thanks a lot and sorry for wasting ur time x3
turns out preload functions shouldnt be used that way x3
If there's some area of the documentation you feel would help if updated to clarify things don't hesitate to open an issue over in the docs repo
Tested versions
System information
Godot v4.3.stable (77dcf97d8) - Windows 10.0.19045 - Vulkan (Forward+) - dedicated Radeon RX 580 Series (Advanced Micro Devices, Inc.; 31.0.12027.9001) - AMD FX(tm)-4350 Quad-Core Processor (4 Threads)
Issue description
so imagine u have a room on the exits of that room is a node that spawns another room which has more nodes. for some reason it doesnt instantiate nodes in newly instantiated room returning a an error:
no it is not a reccursion issue since its kept in check in code for it not to run infenetly
it creates a room but nodes fail to spawn i posted on this on official forum couldnt resolve scoured internet for answer coudnt resolve confronted a sowtfare enguineer she couldnt resolve it either
Steps to reproduce
add one of the nodes with this code into the main scene and another in the room scene set the preload to the room in question
Minimal reproduction project (MRP)
in a new project create a scene as main scene create a global script and add var max_rooms: int = 10 in there create another scene as spawner node, add the folowing script to the node:
extends Node3D const ROOM_1 = preload("res://room1.tscn") @export var rooms_spawned: int func _ready() -> void: if global.max_rooms > rooms_spawned: global.max_rooms += 1 var instance = ROOM_1.instantiate() add_child(instance)
create a scene called room1 and add a mesh to it and add a spawner node offset both from the centre in the main scene add the spawner node