Fixed calling engine functions from scripts

- Removed mono references in generator
- Implemented StringView type in C#
This commit is contained in:
Simon Lübeß
2025-08-08 19:03:09 +02:00
parent 042ae83a0f
commit d156618453
10 changed files with 330 additions and 277 deletions
+7 -2
View File
@@ -427,13 +427,18 @@ public class Entity : EngineObject
/// <returns>The new <see cref="Entity"/>.</returns>
public static Entity CreateInstance(Entity entity)
{
if (entity == null)
{
throw new ArgumentException("The provided instance must not be null!", nameof(entity));
}
ScriptGlue.Entity_CreateInstance(entity.UUID, out UUID newEntityId);
return new Entity(newEntityId);
}
/// <summary>
/// Will be executed once after the entity has be created.
/// Will be called once after the entity has be created.
/// </summary>
protected internal virtual void OnCreate() { }
@@ -443,7 +448,7 @@ public class Entity : EngineObject
protected internal virtual void OnUpdate(float deltaTime) { }
/// <summary>
/// Will be executed once when the entity is being destroyed.
/// Will be called once when the entity is being destroyed.
/// </summary>
protected internal virtual void OnDestroy() { }
}