@kun What exactly do you mean by "Unity 2D"? If you mean that you have selected the project template "2D (URP)", this just means the following according to the template description:
This is an empty project configured for 2D apps. It uses Unity’s Universal Render Pipeline pre-configured with 2D Renderer.
So there is no hard line that separates a project from being a 2D or 3D project apart from using the 2D URP renderer here. When using the URP 2D Renderer, you have to use the specific 2D Lights system (no automatic 3D shadow casting), normal (3D) lights have no effect. The opposite applies to when using a URP 3D Renderer, which will ignore 2D lights.
Could you please kindly share with me some tutorials on this?
Unfortunately I don't know of any good tutorials on this matter. In general I would always recommend having a look at the official Unity documentation first, both their Manual (text) as well as their tutorial videos.
Is it possible to achieve this shadow via an extension UPM package?
Please see the spine-unity documention page on shaders:
https://esotericsoftware.com/spine-unity#Shaders
Your shaders have to match the active render pipeline.
- a) When using the built-in render pipeline (not URP), you can use all shaders in spine-unity.
- b) When using URP 2D Renderer or URP with a 3D Renderer, you need to install and use the shaders of the Spine URP Shaders UPM package instead. Here you can't use
Universal Render Pipeline/2D/*
shaders with a 3D Renderer and vice versa.