Commit 01878e7
fix(Runtime): Address edge case where GetNumberOfTransformsRetargeted is called too early
Summary:
If `GetNumberOfTransformsRetargeted` is called too early, then `TargetSkeletonData` might be `null` or `TargetSkeletonData.BodyToBoneData` might be `null`.
An example edge case would be:
1. Application starts up while scripts are initializing.
2. A permissions check appears. The application pauses and `AnimationRigSetup` calls `DisableRigAndUpdateState` via `OnApplicationFocus` when `hasFocus` is false.
3. `DisableRigAndUpdateState` calls `_retargetingLayer.GetNumberOfTransformsRetargeted()`, and `_retargetingLayer` metadata might not be ready at that point.
Reviewed By: andkim-meta
Differential Revision: D46335611
fbshipit-source-id: 6f60a3bb9134a227cddcfe99730abedf9aa3b3071 parent 85827ba commit 01878e7
1 file changed
+5
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
175 | 175 | | |
176 | 176 | | |
177 | 177 | | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
178 | 183 | | |
179 | 184 | | |
180 | 185 | | |
| |||
0 commit comments