mirror of
https://github.com/stan220/godot-docs.git
synced 2026-09-08 21:29:07 +00:00
Merge pull request #6163 from ScriptsEngineer/patch-1
Change instance method to typed version in C# example
This commit is contained in:
@@ -356,7 +356,7 @@ Note that a new instance must be added to the scene using ``add_child()``.
|
||||
// obviously Mob and PathFollow2D, since they appear later on the line.
|
||||
|
||||
// Create a new instance of the Mob scene.
|
||||
var mob = (Mob)MobScene.Instance();
|
||||
var mob = MobScene.Instance<Mob>();
|
||||
|
||||
// Choose a random location on Path2D.
|
||||
var mobSpawnLocation = GetNode<PathFollow2D>("MobPath/MobSpawnLocation");
|
||||
|
||||
Reference in New Issue
Block a user