MagicTween icon indicating copy to clipboard operation
MagicTween copied to clipboard

Error after import the package

Open AtilganSak opened this issue 1 year ago • 4 comments

I just import the package and appeared this errors

Unity Version: 2023.2.19 Entities: 1.2.0 Burst: 1.8.13

Error 1) Library\PackageCache\com.annulusgames.magic-tween@0a5b840044\Runtime\Core\Systems\PathTweenSystems.cs(60,92): error CS8377: The type 'TweenDelegates<float3>' must be a non-nullable value type, along with all fields at any level of nesting, in order to use it as parameter 'T' in the generic type or method 'InternalCompilerInterface.GetComponentTypeHandle<T>(ref ComponentTypeHandle<T>, ref SystemState)'

Error 2) Library\PackageCache\com.annulusgames.magic-tween@0a5b840044\Runtime\Core\Systems\TweenDelegateTranslationSystemBase.cs(46,93): error CS8377: The type 'TweenDelegates<TValue>' must be a non-nullable value type, along with all fields at any level of nesting, in order to use it as parameter 'T' in the generic type or method 'InternalCompilerInterface.GetComponentTypeHandle<T>(ref ComponentTypeHandle<T>, ref SystemState)'

Error 3) Library\PackageCache\com.annulusgames.magic-tween@0a5b840044\Runtime\Core\Systems\TweenDelegateTranslationSystemBase.cs(47,99): error CS8377: The type 'TweenDelegatesNoAlloc<TValue>' must be a non-nullable value type, along with all fields at any level of nesting, in order to use it as parameter 'T' in the generic type or method 'InternalCompilerInterface.GetComponentTypeHandle<T>(ref ComponentTypeHandle<T>, ref SystemState)'

Error 4) Library\PackageCache\com.annulusgames.magic-tween@0a5b840044\Runtime\Core\Systems\StringTweenSystems.cs(89,92): error CS8377: The type 'TweenDelegates<string>' must be a non-nullable value type, along with all fields at any level of nesting, in order to use it as parameter 'T' in the generic type or method 'InternalCompilerInterface.GetComponentTypeHandle<T>(ref ComponentTypeHandle<T>, ref SystemState)'

Error 5) Library\PackageCache\com.annulusgames.magic-tween@0a5b840044\Runtime\Core\Transforms\TransformTranslationSystemBase.cs(123,99): error CS8377: The type 'TweenTargetTransform' must be a non-nullable value type, along with all fields at any level of nesting, in order to use it as parameter 'T' in the generic type or method 'InternalCompilerInterface.GetComponentTypeHandle<T>(ref ComponentTypeHandle<T>, ref SystemState)'

AtilganSak avatar Apr 30 '24 07:04 AtilganSak

This appears to be a bug in the unity.entities package 1.2.x. They seem to have overlooked SystemAPI.ManagedAPI.GetComponentTypeHandle and using it currently causes a compile error. However if you replace those calls with EntityManager.GetComponentTypeHandle it works fine.

coryleach avatar Jun 16 '24 02:06 coryleach

Opened a PR with the fix.

coryleach avatar Jun 16 '24 02:06 coryleach

Same Error, thanks @coryleach

komakinex avatar Jun 21 '24 08:06 komakinex