Added relative path entity fetching

This commit is contained in:
Antoine Pilote
2024-04-20 12:50:16 -04:00
parent 512cb3336c
commit efbf45c5a8
4 changed files with 83 additions and 8 deletions

View File

@@ -124,13 +124,13 @@ namespace Nuake.Net
return null;
}
public Entity? GetEntity<T>(string path) where T : Entity
public T? GetEntity<T>(string path) where T : Entity
{
Entity entityInstance;
unsafe
{
int entityHandle = EntityGetEntityIcall(ECSHandle, path );
bool hasInstance = EntityHasManagedInstanceIcall(entityHandle);
if (hasInstance)
{
@@ -142,7 +142,7 @@ namespace Nuake.Net
}
}
return null;
return entityInstance as T;
}
}
}