-
-
Notifications
You must be signed in to change notification settings - Fork 32
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
Add a signal for when the map is finished building #33
Comments
Hmm, would a signal allow stuff like editor plugins to act on builds? My first immediate thought is "the build process is synchronous anyway", but maybe there's some use case for this that I'm not seeing yet! 👀 |
Uhhh, potentially? If you obtain a reference to the plugin somehow, I think it might work. I wasn't aware the build is synchronous, I probably should have figured 😅 But it might be useful for ingame things too I think. Mid-game recompilation, kind of. At any rate, more automation options/API would definitely be good! |
I don't see how it's benefitial when compilation is synchronous, making your own signal and running it after the build does exactly the same. |
I think signals can still be very helpful, for example if multiple nodes need to receive whenever the map has built. That would be easier than manually keeping track of all objects that need such notification. |
I think post processing signals might be useful. They might help me in my particular use case, but I'm not sure: I'm currently trying to have my This is what I tried to do in my @tool
extends Node3D
func _ready():
var player = ResourceLoader.load("res://scenes/player.tscn").instantiate()
get_parent().add_child(player) # <-- this errors, needs call_deferred, but then it still doesn't work
player.position = position
player.rotation = rotation
queue_free() |
Your code has multiple issues, the use case you are referring to is perfectly possible with godot-tbloader:
|
@EIREXE good points (I was adding it to the parent node, though). I had a feeling this ought to work, but I had completely forgot about setting owners. That's what was missing. Thanks. 👍 |
As the title says, it would be nice to have a signal or a callback when the map is finished building to allow for post-processing, such as setting collision layers/masks, hooking up signals to entities created in TB, and so on.
offtopic: I'm not quite sure what your vision with TBLoader is, and it is a bit early in development to allow for more advanced use cases where you can build your whole map, logic included, in TB, but it would be nice to have a more concentrated place for discussions than GitHub issues! And also, thanks for the plugin! 😄
The text was updated successfully, but these errors were encountered: