diff --git a/GlitchyEngine/src/World/Components/Components.bf b/GlitchyEngine/src/World/Components/Components.bf index af18316..703c5b0 100644 --- a/GlitchyEngine/src/World/Components/Components.bf +++ b/GlitchyEngine/src/World/Components/Components.bf @@ -308,34 +308,6 @@ namespace GlitchyEngine.World } } - struct NativeScriptComponent : IDisposableComponent - { - public ScriptableEntity Instance = null; - - public function void (mut NativeScriptComponent this) Func; - - public function ScriptableEntity () InstantiateFunction; - public function void (NativeScriptComponent* self) DestroyInstanceFunction; - - public void Bind() mut where T : ScriptableEntity - { - InstantiateFunction = () => - { - return new T(); - }; - - DestroyInstanceFunction = (self) => - { - delete self.Instance; - }; - } - - public void Dispose() mut - { - DestroyInstanceFunction(&this); - } - } - struct SceneLight { public enum LightType diff --git a/GlitchyEngine/src/World/Scene.bf b/GlitchyEngine/src/World/Scene.bf index d677367..d4628e9 100644 --- a/GlitchyEngine/src/World/Scene.bf +++ b/GlitchyEngine/src/World/Scene.bf @@ -622,19 +622,6 @@ namespace GlitchyEngine.World { Debug.Profiler.ProfileScope!("Update scripts"); - // Run scripts - for (var (entity, script) in _ecsWorld.Enumerate()) - { - if (script.Instance == null) - { - script.Instance = script.InstantiateFunction(); - script.Instance._entity = Entity(entity, this); - script.Instance.[Friend]OnCreate(); - } - - script.Instance.[Friend]OnUpdate(gameTime); - } - // Run scripts for (let (entity, script) in _ecsWorld.Enumerate()) {