From 667deb695a400a858bf52ce36d25b07f3fef6ed0 Mon Sep 17 00:00:00 2001 From: Cory Leach of Legends Date: Sat, 15 Jun 2024 21:47:39 -0500 Subject: [PATCH] Fix compile error when using unity.entities 1.2.x The SystemAPI.ManagedAPI.GetComponentTypeHandle appears to have a bug in 1.2.x which causes an error when compiling. Replaced with EntityManager.GetComponentTypeHandle which does not have this bug. --- .../MagicTween/Runtime/Core/Systems/PathTweenSystems.cs | 2 +- .../MagicTween/Runtime/Core/Systems/StringTweenSystems.cs | 2 +- .../Core/Systems/TweenDelegateTranslationSystemBase.cs | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/MagicTween/Assets/MagicTween/Runtime/Core/Systems/PathTweenSystems.cs b/MagicTween/Assets/MagicTween/Runtime/Core/Systems/PathTweenSystems.cs index aed1ade..18965a5 100644 --- a/MagicTween/Assets/MagicTween/Runtime/Core/Systems/PathTweenSystems.cs +++ b/MagicTween/Assets/MagicTween/Runtime/Core/Systems/PathTweenSystems.cs @@ -57,7 +57,7 @@ protected override void OnCreate() accessorFlagsTypeHandle = SystemAPI.GetComponentTypeHandle(true); pointsTypeHandle = SystemAPI.GetBufferTypeHandle(); valueTypeHandle = SystemAPI.GetComponentTypeHandle>(); - accessorTypeHandle = SystemAPI.ManagedAPI.GetComponentTypeHandle>(true); + accessorTypeHandle = EntityManager.GetComponentTypeHandle>(true); } [BurstCompile] diff --git a/MagicTween/Assets/MagicTween/Runtime/Core/Systems/StringTweenSystems.cs b/MagicTween/Assets/MagicTween/Runtime/Core/Systems/StringTweenSystems.cs index bef65e9..93374e4 100644 --- a/MagicTween/Assets/MagicTween/Runtime/Core/Systems/StringTweenSystems.cs +++ b/MagicTween/Assets/MagicTween/Runtime/Core/Systems/StringTweenSystems.cs @@ -86,7 +86,7 @@ protected override void OnCreate() accessorFlagsTypeHandle = SystemAPI.GetComponentTypeHandle(true); startValueTypeHandle = SystemAPI.GetComponentTypeHandle>(); valueTypeHandle = SystemAPI.GetComponentTypeHandle>(); - accessorTypeHandle = SystemAPI.ManagedAPI.GetComponentTypeHandle>(true); + accessorTypeHandle = EntityManager.GetComponentTypeHandle>(true); } protected override void OnUpdate() diff --git a/MagicTween/Assets/MagicTween/Runtime/Core/Systems/TweenDelegateTranslationSystemBase.cs b/MagicTween/Assets/MagicTween/Runtime/Core/Systems/TweenDelegateTranslationSystemBase.cs index 4c1790c..d009122 100644 --- a/MagicTween/Assets/MagicTween/Runtime/Core/Systems/TweenDelegateTranslationSystemBase.cs +++ b/MagicTween/Assets/MagicTween/Runtime/Core/Systems/TweenDelegateTranslationSystemBase.cs @@ -43,8 +43,8 @@ protected override void OnCreate() accessorFlagsTypeHandle = SystemAPI.GetComponentTypeHandle(true); startValueTypeHandle = SystemAPI.GetComponentTypeHandle>(); valueTypeHandle = SystemAPI.GetComponentTypeHandle>(); - delegatesTypeHandle = SystemAPI.ManagedAPI.GetComponentTypeHandle>(true); - unsafedelegatesTypeHandle = SystemAPI.ManagedAPI.GetComponentTypeHandle>(true); + delegatesTypeHandle = EntityManager.GetComponentTypeHandle>(true); + unsafedelegatesTypeHandle = EntityManager.GetComponentTypeHandle>(true); }