private void LoadCurrentExample() { var scene = sceneLoader.GetCurrentSample(); if (scene == null) { return; } foreach (Node child in CurrentSceneContainer.GetChildren()) { child.QueueFree(); } var instance = scene.Instance(); CurrentSceneContainer.AddChild(instance); // Show code var script = (CSharpScript)instance.GetScript(); string scriptPath = script.ResourcePath; CodeLabel.BbcodeEnabled = true; CodeLabel.BbcodeText = ReadSourceCodeAtPath(scriptPath); CodeLabel.ScrollToLine(0); // Set summary if (instance is Examples.IExample baseInstance) { SummaryLabel.Text = baseInstance.GetSummary(); } }