Is there a way to get job type in AnimationScriptPlayable?

AnimationScriptPlayable.GetJobData is a genric function, so you have to know its exact job type before you call it. But if we can know its type like this code:

Type jobType = playable.GetJobType();

Then i can create C# reflection genric method to call GetJobData function and make it return animationjob's object form, and i can happily call some interface implemented in my animationjob.
It will help me to improve Unity's PlayableGraphVisualizer, for instance, AnimationScriptPlayableNodes can show different color depend on its job type.


Indeed, I agree this would be very useful to have. Actually, it's already implemented on the PlayableHandle but it's internal. You can access the type through reflection for the time being. This API won't change anytime soon, so I wouldn't worry about breaking changes.

Type jobType = playable.GetHandle().GetJobType();

Hope this helps.


I hate that reflection GC Alloc.
When will that method change public?
I think it is very easy fix.