mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-01 09:35:34 +00:00
24 lines
No EOL
527 B
C#
24 lines
No EOL
527 B
C#
using Godot;
|
|
|
|
namespace Cirno.Scripts.Utils;
|
|
|
|
[Tool]
|
|
public partial class MapProxy3D : Node3D
|
|
{
|
|
[ExportToolButton("Rebuild")] public Callable RebuildButton => Callable.From(Rebuild);
|
|
|
|
public void Rebuild()
|
|
{
|
|
if (!Engine.IsEditorHint()) return;
|
|
|
|
var children = GetChildren();
|
|
foreach (var child in children)
|
|
{
|
|
if (child.HasMethod("verify_and_build"))
|
|
{
|
|
child.Call("verify_and_build");
|
|
}
|
|
|
|
}
|
|
}
|
|
} |