@@ -15,6 +15,7 @@ public class SpineImporterWizard :ScriptableWizard {
15
15
public int pixelsPerUnit = 100 ;
16
16
public bool buildAvatarMask = true ;
17
17
public AnimationImportType animationImportType = AnimationImportType . MECANIM ;
18
+ public bool updateResources = true ;
18
19
[ HideInInspector ]
19
20
public string path ;
20
21
@@ -33,7 +34,8 @@ public static bool validateContext(){
33
34
34
35
void OnWizardUpdate ( ) {
35
36
helpString = "Be carefull, don't use small amout of pixels per unit (e.g. 1 or 10) \n " +
36
- "if you are going to use result model with unity 2d physics and gravity" ;
37
+ "if you are going to use result model with unity 2d physics and gravity\n " +
38
+ "update resources means - instead of create new animator and new animations update them" ;
37
39
if ( pixelsPerUnit <= 0 )
38
40
errorString = "PixelsPerUnit must be greater than zero" ;
39
41
else
@@ -70,11 +72,10 @@ void OnWizardCreate(){
70
72
}
71
73
72
74
ModelImporterAnimationType modelImporterAnimationType = getModelImporterAnimationType ( ) ;
73
- SpineUtil . addAnimation ( rootGO , directory , spineData , boneGOByName , attachmentGOByNameBySlot , pixelsPerUnit , modelImporterAnimationType ) ;
75
+ SpineUtil . addAnimation ( rootGO , directory , spineData , boneGOByName , attachmentGOByNameBySlot ,
76
+ pixelsPerUnit , modelImporterAnimationType , updateResources ) ;
74
77
sk . showDefaulSlots ( ) ;
75
-
76
78
SpineUtil . buildPrefab ( rootGO , directory , name ) ;
77
-
78
79
GameObject . DestroyImmediate ( rootGO ) ;
79
80
80
81
} catch ( SpineMultiatlasCreationException e ) {
0 commit comments