Exemplo n.º 1
0
        // Functions
        //------------------------------------------------
        public void UpdateTransforms(float tDelta)
        {
            if (_rootOptTransform == null)
            {
                return;
            }


            //추가
            //본 업데이트 1단계
            _rootOptTransform.ReadyToUpdateBones();


#if UNITY_EDITOR
            Profiler.BeginSample("Root Unit - Update Modifier");
#endif
            //1. Modifer부터 업데이트 (Pre)
            _rootOptTransform.UpdateModifier_Pre(tDelta);

#if UNITY_EDITOR
            Profiler.EndSample();
#endif

#if UNITY_EDITOR
            Profiler.BeginSample("Root Unit - Calculate");
#endif
            //2. 실제로 업데이트
            _rootOptTransform.ReadyToUpdate();
            _rootOptTransform.UpdateCalculate_Pre();            //Post 작성할 것

#if UNITY_EDITOR
            Profiler.EndSample();
#endif

            //Bone World Matrix Update
            _rootOptTransform.UpdateBonesWorldMatrix();

            //Modifier 업데이트 (Post)
            _rootOptTransform.UpdateModifier_Post(tDelta);

            _rootOptTransform.UpdateCalculate_Post();            //Post Calculate
        }
Exemplo n.º 2
0
        // Functions
        //------------------------------------------------
        //public void RemoveAllCalculateResultParams()
        //{
        //	if (_rootOptTransform == null)
        //	{
        //		return;
        //	}
        //	_rootOptTransform.ClearResultParams(true);
        //}

        ///// <summary>
        ///// [Please do not use it]
        ///// </summary>
        //public void ResetCalculateStackForBake()
        //{
        //	if (_rootOptTransform == null)
        //	{
        //		return;
        //	}

        //	//_rootOptTransform.ClearResultParams();

        //	_rootOptTransform.ResetCalculateStackForBake(true);

        //}


        //public void DebugBoneMatrix()
        //{
        //	if (_rootOptTransform == null)
        //	{
        //		return;
        //	}

        //	//_rootOptTransform.ClearResultParams();

        //	_rootOptTransform.DebugBoneMatrix();

        //}

        public void UpdateTransforms(float tDelta)
        {
            if (_rootOptTransform == null)
            {
                return;
            }

            //추가 : Flipped 체크
            CheckFlippedTransform();



            //---------------------------------------------------------
//#if UNITY_EDITOR
//			Profiler.BeginSample("Root Unit - Ready To Update Bones");
//#endif

            //추가 12.6
            //Sorted Buffer 업데이트 준비
            _sortedRenderBuffer.ReadyToUpdate();

            //본 업데이트 1단계
            _rootOptTransform.ReadyToUpdateBones();

//#if UNITY_EDITOR
//			Profiler.EndSample();
//#endif
            //---------------------------------------------------------

//#if UNITY_EDITOR
//			Profiler.BeginSample("Root Unit - Update Modifier");
//#endif
            //1. Modifer부터 업데이트 (Pre)
            _rootOptTransform.UpdateModifier_Pre(tDelta);

//#if UNITY_EDITOR
//			Profiler.EndSample();
//#endif

            //---------------------------------------------------------

//#if UNITY_EDITOR
//			Profiler.BeginSample("Root Unit - Calculate Pre");
//#endif
            //2. 실제로 업데이트
            _rootOptTransform.ReadyToUpdate();
            _rootOptTransform.UpdateCalculate_Pre();            //Post 작성할 것

//#if UNITY_EDITOR
//			Profiler.EndSample();
//#endif


            //추가 12.6
            //Extra-Depth Changed 이벤트 있을 경우 처리 - Pre에서 다 계산되었을 것이다.
            _sortedRenderBuffer.UpdateDepthChangedEventAndBuffers();

            //---------------------------------------------------------

//#if UNITY_EDITOR
//			Profiler.BeginSample("Root Unit - Update Bones World Matrix");
//#endif

            //Bone World Matrix Update
            _rootOptTransform.UpdateBonesWorldMatrix();

//#if UNITY_EDITOR
//			Profiler.EndSample();
//#endif

            //------------------------------------------------------------

//#if UNITY_EDITOR
//			Profiler.BeginSample("Root Unit - Calculate Post (Modifier)");
//#endif

            //Modifier 업데이트 (Post)
            _rootOptTransform.UpdateModifier_Post(tDelta);

//#if UNITY_EDITOR
//			Profiler.EndSample();
//#endif

//#if UNITY_EDITOR
//			Profiler.BeginSample("Root Unit - Calculate Post (Update)");
//#endif
            _rootOptTransform.UpdateCalculate_Post();            //Post Calculate

//#if UNITY_EDITOR
//			Profiler.EndSample();
//#endif
        }