I am implementing a custom TargetGroup that implements the ICinemachineTargetGroup interface.
It is mostly the same as the CinemachineTargetGroup class, but has Vector3 weights instead of float weights.
I could implement everything in the same way as CinemachineTargetGroup does until TargetPositionCache is used, since that class is only internal.
Copying the TargetPositionCache class as well got it to compile, but the CinemachineTimelinePrefs that controls whether the cache is active or not is also internal and thereby not accessible.
Ignoring the CinemachineTimelinePrefs ScrubbingCache setting is an option, but I would prefer to support it.
How can we reproduce it using the example you attached
Open Scripts/TargetPositionCache.cs and uncomment line 11 (comment line 10 instead).
Notice the "CinemachineTimelinePrefs is inaccessible due to its protection level" error.
Delete the Scripts/TargetPositionCache.cs file.
Notice the "TargetPositionCache is inaccessible due to its protection level" errors.
This can be fixed by making com.unity.cinemachine/Runtime/Core/TargetPositionCache public.
Bug report sent.
What happened
I am implementing a custom TargetGroup that implements the ICinemachineTargetGroup interface. It is mostly the same as the CinemachineTargetGroup class, but has Vector3 weights instead of float weights. I could implement everything in the same way as CinemachineTargetGroup does until TargetPositionCache is used, since that class is only internal. Copying the TargetPositionCache class as well got it to compile, but the CinemachineTimelinePrefs that controls whether the cache is active or not is also internal and thereby not accessible.
Ignoring the CinemachineTimelinePrefs ScrubbingCache setting is an option, but I would prefer to support it.
How can we reproduce it using the example you attached
This can be fixed by making com.unity.cinemachine/Runtime/Core/TargetPositionCache public.