0 votes

Good time of day. There was such a question about Godot Engine. And the essence is as follows. Is there something like a prefab in the engine? The question is, how to access another scene and use a collision check? What are the ways in C# and / or GDScript?

And the question arose when working with the following piece of code in C#

var Load_object = Godot.ResourceLoader.Load<PackedScene>("res://NewObject.tscn");
var LoadedObject = Load_object.Instance();

var LoadedObject_collision = LoadedObject .GetNode<KinematicBody2D>("KinematicBody2D_Test");

if (collision.Collider == LoadedObject_collision)
    GD.Print("Test return");
in Engine by (148 points)

What is this question about? Scenes/Nodes or Collisions?

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.