hostiop.blogg.se

Unity assets bundle extractor batch extraction
Unity assets bundle extractor batch extraction




Button( "Extract All " ) )įor( int i = 0 i remapFrom, Material remapTo, bool skipIgnoredMaterials ) =>įor( int i = 0 i > duplicateMaterialsLookup = new Dictionary>( modelData. different models won't share the same materials) ", dontRemapMaterialsAcrossDifferentModels ) ĮditorGUILayout. ToggleLeft( "Don't remap Model A's materials to Model B (i.e. ToggleLeft( "Don't remap already extracted materials ", dontRemapExtractedMaterials ) ĭontRemapMaterialsAcrossDifferentModels = EditorGUILayout. ToggleLeft( "Material properties must match ", remappedMaterialPropertiesMustMatch ) ĭontRemapExtractedMaterials = EditorGUILayout. RemappedMaterialPropertiesMustMatch = EditorGUILayout. ToggleLeft( "Material names must match ", remappedMaterialNamesMustMatch ) RemappedMaterialNamesMustMatch = EditorGUILayout. LabelField( "Default Material Remap Conditions " ) Private void DrawMaterialRemapConditionsField()ĮditorGUILayout. Label( "Models To Process (drag & drop here) " ) keyboardControl = 0 // Remove focus from active text field Substring( relativePathIndex, selectedPath. Allow drag & dropping a folder to the text field TextField( "Extract Materials To ", materialsFolder ) IsNullOrEmpty( materialsFolder ) & materialsFolder. enabled = modelsToProcessListIsFilled & ! string. We are using dela圜all because otherwise clicking an ObjectField in this window doesn't highlight that material in the Project windowīool modelsToProcessListIsFilled = modelData. Don't let RemapAllPopup be obstructed by this window titleContent = new GUIContent( "Extract Materials " ) Private static RemapAllPopup remapAllPopup īatchExtractMaterials window = GetWindow() Private bool inModelSelectionPhase = true Private bool dontRemapMaterialsAcrossDifferentModels = false Private bool dontRemapExtractedMaterials = true Private bool remappedMaterialPropertiesMustMatch = true Private bool remappedMaterialNamesMustMatch = false If( remapTo & onRemapConfirmed != null )įor( int i = 0 i modelData = new List( 16 ) SetBool( "BEM_SkipIgnoredMats ", skipIgnoredMaterials ) Toggle( "Skip Ignored Materials ", skipIgnoredMaterials ) ĮditorPrefs. ObjectField( "Remap To ", remapTo, typeof( Material ), false ) as Material Allow drag & dropping materials to array Label( "Remap From (drag & drop here) " ) If 'Remap From' is empty, all materials will be remapped to 'Remap To'. LabelField( "This will find all materials that point to 'Remap From' and remap them to 'Remap To'. titleContent = new GUIContent( "Remap All. Action, Material, bool> onRemapConfirmed )īuttonRect. Public static void ShowAt( Rect buttonRect, Vector2 size, System. Action, Material, bool> onRemapConfirmed Private class RemapAllPopup : EditorWindow Public class BatchExtractMaterials : EditorWindow






Unity assets bundle extractor batch extraction