Fixed Entity_GetScriptInstance

This commit is contained in:
Simon Lübeß
2026-09-03 22:35:43 +02:00
parent 1435dac4d6
commit 5c18f61da4
+4 -2
View File
@@ -589,14 +589,16 @@ 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;
}
else
{
instance = null;
}
}
public static void Serialization_SerializeField(IntPtr serializationContext, SerializationType type, string fieldName, object? valueObject, string? fullTypeName)
{