fix forge issue

This commit is contained in:
2026-02-13 11:11:03 +01:00
parent 032e059826
commit 22c4301244
2 changed files with 19 additions and 13 deletions

View File

@@ -13,8 +13,16 @@ public partial class CueHandlerInspectorPlugin : EditorInspectorPlugin
public override bool _CanHandle(GodotObject @object) public override bool _CanHandle(GodotObject @object)
{ {
// Find out if its an implementation of CueHandler without having to add [Tool] attribute to them. // Find out if its an implementation of CueHandler without having to add [Tool] attribute to them.
if (@object?.GetScript().As<CSharpScript>() is CSharpScript script) try
{ {
if (@object.GetScript().As<CSharpScript>() is not { }) return false;
}
catch (Exception e)
{
return false;
}
var script = @object.GetScript().As<CSharpScript>();
StringName className = script.GetGlobalName(); StringName className = script.GetGlobalName();
Type baseType = typeof(ForgeCueHandler); Type baseType = typeof(ForgeCueHandler);
@@ -28,9 +36,6 @@ public partial class CueHandlerInspectorPlugin : EditorInspectorPlugin
return implementationType is not null; return implementationType is not null;
} }
return false;
}
public override bool _ParseProperty( public override bool _ParseProperty(
GodotObject @object, GodotObject @object,
Variant.Type type, Variant.Type type,

View File

@@ -1,4 +1,5 @@
extends Area3D extends Area3D
class_name TutoTrigger
@onready var control: Control = $Control @onready var control: Control = $Control