@@ -3079,23 +3079,23 @@ static void OnClipContextClick(MenuCommand command)
3079
3079
}
3080
3080
Debug . Log ( folderPath ) ;
3081
3081
3082
+ Object [ ] selectedObjects = Selection . objects ;
3082
3083
3083
- var selectedObjects = Selection . objects ;
3084
- foreach ( GameObject editorClipSelected in selectedObjects )
3084
+ foreach ( Object editorClipSelected in selectedObjects )
3085
3085
{
3086
3086
ExportSingleEditorClip ( editorClipSelected , folderPath ) ;
3087
3087
}
3088
3088
}
3089
3089
3090
- public static void ExportSingleEditorClip ( GameObject editorClipSelected , string folderPath )
3090
+ public static void ExportSingleEditorClip ( Object editorClipSelected , string folderPath )
3091
3091
{
3092
3092
if ( editorClipSelected . GetType ( ) . Name . Contains ( "EditorClip" ) )
3093
3093
{
3094
- var selClip = editorClipSelected . GetType ( ) . GetProperty ( "clip" ) . GetValue ( editorClipSelected , null ) ;
3094
+ object selClip = editorClipSelected . GetType ( ) . GetProperty ( "clip" ) . GetValue ( editorClipSelected , null ) ;
3095
3095
UnityEngine . Timeline . TimelineClip timeLineClip = selClip as UnityEngine . Timeline . TimelineClip ;
3096
3096
3097
- var selClipItem = editorClipSelected . GetType ( ) . GetProperty ( "item" ) . GetValue ( editorClipSelected , null ) ;
3098
- var selClipItemParentTrack = selClipItem . GetType ( ) . GetProperty ( "parentTrack" ) . GetValue ( selClipItem , null ) ;
3097
+ object selClipItem = editorClipSelected . GetType ( ) . GetProperty ( "item" ) . GetValue ( editorClipSelected , null ) ;
3098
+ object selClipItemParentTrack = selClipItem . GetType ( ) . GetProperty ( "parentTrack" ) . GetValue ( selClipItem , null ) ;
3099
3099
AnimationTrack editorClipAnimationTrack = selClipItemParentTrack as AnimationTrack ;
3100
3100
GameObject animationTrackGObject = UnityEditor . Timeline . TimelineEditor . playableDirector . GetGenericBinding ( editorClipAnimationTrack ) as GameObject ;
3101
3101
@@ -3106,7 +3106,6 @@ public static void ExportSingleEditorClip(GameObject editorClipSelected, string
3106
3106
public static void ExportSingleTimelineClip ( TimelineClip timelineClipSelected , string folderPath , GameObject animationTrackGObject )
3107
3107
{
3108
3108
string filePath = folderPath + "/" + animationTrackGObject . name + "@" + timelineClipSelected . animationClip . name + ".fbx" ;
3109
- //Debug.Log("filepath: " + filePath);
3110
3109
UnityEngine . Object [ ] myArray = new UnityEngine . Object [ ] { animationTrackGObject , timelineClipSelected . animationClip } ;
3111
3110
ExportObjects ( filePath , myArray , AnimationExportType . timelineAnimationClip ) ;
3112
3111
}
@@ -3141,7 +3140,7 @@ public static void OnPlayableDirectorGameObjectContextClick(MenuCommand command)
3141
3140
else
3142
3141
{
3143
3142
// We were invoked from the right-click menu, so use the context of the context menu.
3144
- var selected = command . context as GameObject ;
3143
+ GameObject selected = command . context as GameObject ;
3145
3144
if ( selected )
3146
3145
{
3147
3146
selection = new GameObject [ ] { selected } ;
0 commit comments