Guest User

some code or something i dunno

a guest
Aug 10th, 2021
190
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.86 KB | None | 0 0
  1. //Change the two lines below to the start and end slots, copy/paste everything in to the C# REPL Console
  2.  
  3. int accessorySlotStart = 1;
  4. int accessorySlotEnd = 20;
  5.  
  6. KK_Plugins.MaterialEditor.MaterialEditorCharaController meController = GameObject.FindObjectOfType<KK_Plugins.MaterialEditor.MaterialEditorCharaController>();
  7. for (int i = accessorySlotStart - 1; i < accessorySlotEnd; i++)
  8. {
  9. var acc = KKAPI.Maker.AccessoriesApi.GetAccessoryObject(meController.ChaControl, i);
  10. if (acc != null)
  11. {
  12. foreach (Renderer rend in acc.GetComponentsInChildren<Renderer>())
  13. {
  14. foreach (Material mat in MaterialEditorAPI.MaterialAPI.GetMaterials(acc, rend))
  15. {
  16. meController.MaterialPasteEdits(i, KK_Plugins.MaterialEditor.MaterialEditorCharaController.ObjectType.Accessory, mat, acc);
  17. }
  18. }
  19. }
  20. }
Add Comment
Please, Sign In to add comment