![]() |
Attention | Topic was automatically imported from the old Question2Answer platform. |
![]() |
Asked By | Dice |
‘Resource’ does not contain a definition for ‘Instance’ and no accessible extension method ‘Instance’ accepting a first argument of type ‘Resource’ could be found
So basically, I want to change the scenes but cant because the instance property cannot be found.
using Godot;
using System;
public class Menu : VBoxContainer
{
PackedScene simultaneousScene;
public override void _Ready()
{ simultaneousScene = (PackedScene)ResourceLoader.Load("res://Player.tscn").instance();
}
public override void _Process(float delta)
{
GetTree().GetRoot().AddChild(simultaneousScene);
}
}
I’ve also tried Instance() in place of instance()