fix forge issue
This commit is contained in:
@@ -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,
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
extends Area3D
|
extends Area3D
|
||||||
|
class_name TutoTrigger
|
||||||
|
|
||||||
@onready var control: Control = $Control
|
@onready var control: Control = $Control
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user