| 1 | using Oculus.Avatar; |
| 2 | |
| 3 | public class OvrAvatarBase : OvrAvatarComponent |
| 4 | { |
| 5 | ovrAvatarBaseComponent component = new ovrAvatarBaseComponent(); |
| 6 | |
| 7 | void Update() |
| 8 | { |
| 9 | if (owner == null) |
| 10 | { |
| 11 | return; |
| 12 | } |
| 13 | |
| 14 | if (CAPI.ovrAvatarPose_GetBaseComponent(owner.sdkAvatar, ref component)) |
| 15 | { |
| 16 | UpdateAvatar(component.renderComponent); |
| 17 | } |
| 18 | else |
| 19 | { |
| 20 | owner.Base = null; |
| 21 | Destroy(this); |
| 22 | } |
| 23 | } |
| 24 | } |