using Godot; using KeepersCompound.TMV.UI; namespace KeepersCompound.TMV; public partial class Model : Node3D { public override void _Ready() { var modelSelector = GetNode("%ModelSelector") as ModelSelector; modelSelector.ModelSelected += BuildModel; } public void BuildModel(string campaignName, string modelPath) { foreach (var node in GetChildren()) { node.QueueFree(); } var model = Context.Instance.ModelLoader.Load(campaignName, modelPath); AddChild(model); } }