With this script attached I updated the import to the new location in extensions/NEEDLE_animator… but I get this error in vs code:
by user 103054507105067008
With this script attached I updated the import to the new location in extensions/NEEDLE_animator… but I get this error in vs code:
by user 103054507105067008
Property 'onStateExit' in type 'GetAnimationState' is not assignable to the same property in base type 'StateMachineBehaviour'.
Type '(animator: Animator) => void' is not assignable to type '(animator: Animator, animatorStateInfo: AnimatorStateInfo, layerIndex: number) => any'.
Types of parameters 'animator' and 'animator' are incompatible.
Type 'import("c:/Unity_Projects/clientPlatform/Projects/newProject/node_modules/@needle-tools/engine/src/engine-components/Animator").Animator' is not assignable to type 'import("c:/Unity_Projects/clientPlatform/Projects/newProject/node_modules/@needle-tools/engine/lib/engine-components/Animator").Animator'.
The types of 'runtimeAnimatorController.FindState(...).transitions' are incompatible between these types.
Type 'import("c:/Unity_Projects/clientPlatform/Projects/newProject/node_modules/@needle-tools/engine/src/engine/extensions/NEEDLE_animator_controller_model").Transition[]' is not assignable to type 'import("c:/Unity_Projects/clientPlatform/Projects/newProject/node_modules/@needle-tools/engine/lib/engine/extensions/NEEDLE_animator_controller_model").Transition[]'.
by user 103054507105067008
Type 'import("c:/Unity_Projects/clientPlatform/Projects/newProject/node_modules/@needle-tools/engine/src/engine/extensions/NEEDLE_animator_controller_model").Transition' is not assignable to type 'import("c:/Unity_Projects/clientPlatform/Projects/newProject/node_modules/@needle-tools/engine/lib/engine/extensions/NEEDLE_animator_controller_model").Transition'.
Types of property 'destinationState' are incompatible.
Type 'number | import("c:/Unity_Projects/clientPlatform/Projects/newProject/node_modules/@needle-tools/engine/src/engine/extensions/NEEDLE_animator_controller_model").State' is not assignable to type 'number | import("c:/Unity_Projects/clientPlatform/Projects/newProject/node_modules/@needle-tools/engine/lib/engine/extensions/NEEDLE_animator_controller_model").State'.
Type 'State' is not assignable to type 'number | State'.ts(2416)
(method) GetAnimationState.onStateExit(animator: Animator): void
by user 103054507105067008
Hi that didnt change but the StateMachineBehaviour export from @needle-tools/engine
is currently missing (I fixed it already here, ran into the same issue earlier today) and when you import via the src/engine/
paths it can lead to unexpected behaviour / the engine being imported twice.
Will wait for an update in that case, continuing to update old projects to test so I’ll come back to this
by user 103054507105067008