From 5c18f61da420fd0eba18d636ba831c3fc7f4115f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20L=C3=BCbe=C3=9F?= Date: Thu, 3 Sep 2026 22:35:43 +0200 Subject: [PATCH] Fixed Entity_GetScriptInstance --- ScriptCore/ScriptGlue.cs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/ScriptCore/ScriptGlue.cs b/ScriptCore/ScriptGlue.cs index b486cfe..2471438 100644 --- a/ScriptCore/ScriptGlue.cs +++ b/ScriptCore/ScriptGlue.cs @@ -589,13 +589,15 @@ internal static unsafe partial class ScriptGlue public static void Entity_GetScriptInstance(UUID entityId, out Entity? instance) { // We currently can implement this method here, because we only have C# scripts. - // If we ever need to do something to interop with other script languages, then this would change. + // If we ever need to do something to interop with other script languages, then this would probably need to communicate with the engine. if (EntityScriptInstances.TryGetValue(entityId, out var match)) { instance = match.Entity; } - - instance = null; + else + { + instance = null; + } } public static void Serialization_SerializeField(IntPtr serializationContext, SerializationType type, string fieldName, object? valueObject, string? fullTypeName)