Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | VarionDrakon |
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");
}
What is this question about? Scenes/Nodes or Collisions?
sash-rc | 2021-06-29 22:51