コード例 #1
0
        protected override void OnUpdate()
        {
            float presentationFraction = TimeUtil.PresentationTimeFraction; // this is done just once instead of once per instance

            Entities
            .ForEach((ref PositionComponentData component) => {
                component.PresentationValue = math.lerp(component.PreviousValue, component.NextValue, presentationFraction);
            })
            .ScheduleParallel();

            Dependency.CompleteBeforeManagedMonoBehaviourUpdates();
        }