File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed
com.unity.formats.alembic/Runtime/Scripts Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -546,7 +546,11 @@ public override void Setup(Component c)
546546 m_target = null ;
547547 return ;
548548 }
549+ #if UNITY_6000_4_OR_NEWER
550+ abcObject = parent . abcObject . NewXform ( target . name + " (" + EntityId . ToULong ( target . GetEntityId ( ) ) . ToString ( "X8" ) + ")" , timeSamplingIndex ) ;
551+ #else
549552 abcObject = parent . abcObject . NewXform ( target . name + " (" + target . GetInstanceID ( ) . ToString ( "X8" ) + ")" , timeSamplingIndex ) ;
553+ #endif
550554 m_target = target ;
551555 }
552556
@@ -976,7 +980,11 @@ CaptureNode ConstructTree(Transform node)
976980 {
977981 if ( node == null ) { return null ; }
978982
983+ #if UNITY_6000_4_OR_NEWER
984+ int iid = ( int ) EntityId . ToULong ( node . gameObject . GetEntityId ( ) ) ;
985+ #else
979986 int iid = node . gameObject . GetInstanceID ( ) ;
987+ #endif
980988 CaptureNode cn ;
981989 if ( m_nodes . TryGetValue ( iid , out cn ) ) { return cn ; }
982990
Original file line number Diff line number Diff line change @@ -222,7 +222,11 @@ void ClearMotionVectors(AlembicTreeNode node)
222222 public bool AbcLoad ( bool createMissingNodes , bool serializeMesh )
223223 {
224224 m_time = 0.0f ;
225+ #if UNITY_6000_4_OR_NEWER
226+ m_context = new SafeContext ( aiContext . Create ( ( int ) EntityId . ToULong ( m_abcTreeRoot . gameObject . GetEntityId ( ) ) ) ) ;
227+ #else
225228 m_context = new SafeContext ( aiContext . Create ( m_abcTreeRoot . gameObject . GetInstanceID ( ) ) ) ;
229+ #endif
226230
227231 var settings = m_streamDesc . Settings ;
228232 m_config . swapHandedness = settings . SwapHandedness ;
You can’t perform that action at this time.
0 commit comments