Not a member of Pastebin yet?
                        Sign Up,
                        it unlocks many cool features!                    
                - //Change the two lines below to the start and end slots, copy/paste everything in to the C# REPL Console
- int accessorySlotStart = 1;
- int accessorySlotEnd = 20;
- KK_Plugins.MaterialEditor.MaterialEditorCharaController meController = GameObject.FindObjectOfType<KK_Plugins.MaterialEditor.MaterialEditorCharaController>();
- for (int i = accessorySlotStart - 1; i < accessorySlotEnd; i++)
- {
- var acc = KKAPI.Maker.AccessoriesApi.GetAccessoryObject(meController.ChaControl, i);
- if (acc != null)
- {
- foreach (Renderer rend in acc.GetComponentsInChildren<Renderer>())
- {
- foreach (Material mat in MaterialEditorAPI.MaterialAPI.GetMaterials(acc, rend))
- {
- meController.MaterialPasteEdits(i, KK_Plugins.MaterialEditor.MaterialEditorCharaController.ObjectType.Accessory, mat, acc);
- }
- }
- }
- }
                    Add Comment                
                
                        Please, Sign In to add comment                    
                 
                    