From 74b63420706c91b8cdbd2163a85587e56014c6bd Mon Sep 17 00:00:00 2001 From: nakjun Date: Wed, 8 Jul 2026 16:57:32 +0900 Subject: [PATCH] =?UTF-8?q?2026-07-08=20=EC=9C=A0=EB=82=98=20=ED=94=84?= =?UTF-8?q?=EB=A1=9C=ED=86=A0=ED=83=80=EC=9E=85=EB=B2=84=EC=A0=84=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/01_Scenes/_TestScenes/Test1.unity | 4 +- .../Characters/ToonCharacterModular.meta | 8 + .../ToonCharacterModular/Animations.meta | 8 + .../Animations/BMAC_Dizzy.anim | 3 + .../Animations/BMAC_Dizzy.anim.meta | 15 + .../Animations/BMAC_F_Idle.anim | 3 + .../Animations/BMAC_F_Idle.anim.meta | 15 + .../Animations/BMAC_F_Walk.anim | 3 + .../Animations/BMAC_F_Walk.anim.meta | 15 + .../Animations/BMAC_M_Idle.anim | 3 + .../Animations/BMAC_M_Idle.anim.meta | 15 + .../Animations/BMAC_M_Walk.anim | 3 + .../Animations/BMAC_M_Walk.anim.meta | 15 + .../Animations/Expressions.meta | 8 + .../Animations/Expressions/BMAC_Angry.anim | 3 + .../Expressions/BMAC_Angry.anim.meta | 15 + .../Animations/Expressions/BMAC_Blink.anim | 3 + .../Expressions/BMAC_Blink.anim.meta | 15 + .../Animations/Expressions/BMAC_Devious.anim | 3 + .../Expressions/BMAC_Devious.anim.meta | 15 + .../Animations/Expressions/BMAC_Evil.anim | 3 + .../Expressions/BMAC_Evil.anim.meta | 15 + .../Animations/Expressions/BMAC_Happy.anim | 3 + .../Expressions/BMAC_Happy.anim.meta | 15 + .../Animations/Expressions/BMAC_Neutral.anim | 3 + .../Expressions/BMAC_Neutral.anim.meta | 15 + .../Animations/Expressions/BMAC_Sad.anim | 3 + .../Animations/Expressions/BMAC_Sad.anim.meta | 15 + .../Animations/Expressions/BMAC_Smile.anim | 3 + .../Expressions/BMAC_Smile.anim.meta | 15 + .../Expressions/BMAC_Surprised.anim | 3 + .../Expressions/BMAC_Surprised.anim.meta | 15 + .../Expressions/BMAC_Toon_Cringe.anim | 3 + .../Expressions/BMAC_Toon_Cringe.anim.meta | 15 + .../Expressions/BMAC_Toon_Dizzy.anim | 3 + .../Expressions/BMAC_Toon_Dizzy.anim.meta | 15 + .../Expressions/BMAC_Toon_Excited.anim | 3 + .../Expressions/BMAC_Toon_Excited.anim.meta | 15 + .../Expressions/BMAC_Toon_Hearts.anim | 3 + .../Expressions/BMAC_Toon_Hearts.anim.meta | 15 + .../Expressions/BMAC_Toon_Pissed.anim | 3 + .../Expressions/BMAC_Toon_Pissed.anim.meta | 15 + .../Expressions/BMAC_Toon_Shocked.anim | 3 + .../Expressions/BMAC_Toon_Shocked.anim.meta | 15 + .../Expressions/BMAC_Toon_Stars.anim | 3 + .../Expressions/BMAC_Toon_Stars.anim.meta | 15 + .../CharacterCreatorCTRL.controller | 715 ++++++++++ .../CharacterCreatorCTRL.controller.meta | 15 + .../ToonCharacterModular/Materials.meta | 8 + .../Materials/BMAC_BackingBody.mat | 255 ++++ .../Materials/BMAC_BackingBody.mat.meta | 15 + .../Materials/BMAC_Body.mat | 137 ++ .../Materials/BMAC_Body.mat.meta | 15 + .../Materials/BMAC_Master_Mat.mat | 255 ++++ .../Materials/BMAC_Master_Mat.mat.meta | 15 + .../ToonCharacterModular/Models.meta | 8 + .../ToonCharacterModular/Models/Common.meta | 8 + .../Models/Common/Body.meta | 8 + .../Models/Common/Body/BodyRig.fbx | 3 + .../Models/Common/Body/BodyRig.fbx.meta | 1062 +++++++++++++++ .../Models/Common/Body/Body_BasicBody_v2.png | 3 + .../Common/Body/Body_BasicBody_v2.png.meta | 134 ++ .../Models/Common/Body/Body_D.png | 3 + .../Models/Common/Body/Body_D.png.meta | 150 +++ .../Models/Common/Body/Body_N.png | 3 + .../Models/Common/Body/Body_N.png.meta | 160 +++ .../ToonCharacterModular/Scripts.meta | 8 + .../Scripts/BodyShapeModifier.cs | 247 ++++ .../Scripts/BodyShapeModifier.cs.meta | 9 + .../Scripts/CharacterCreator.meta | 8 + .../CharacterCreator/BMAC_SaveSystem.cs | 360 +++++ .../CharacterCreator/BMAC_SaveSystem.cs.meta | 18 + .../BoZoCharacterOptimizer.cs | 1104 +++++++++++++++ .../BoZoCharacterOptimizer.cs.meta | 18 + .../BoZo_EventSystemHandler.cs | 35 + .../BoZo_EventSystemHandler.cs.meta | 18 + .../Scripts/CharacterCreator/BoZo_Links.cs | 37 + .../CharacterCreator/BoZo_Links.cs.meta | 18 + .../CharacterCreator/BoZo_TextureBuilder.cs | 686 ++++++++++ .../BoZo_TextureBuilder.cs.meta | 18 + .../CharacterCreator/BodyShapeSliders.cs | 117 ++ .../CharacterCreator/BodyShapeSliders.cs.meta | 9 + .../CharacterCreator/CameraController.cs | 136 ++ .../CharacterCreator/CameraController.cs.meta | 18 + .../Scripts/CharacterCreator/CameraUpdate.cs | 21 + .../CharacterCreator/CameraUpdate.cs.meta | 18 + .../CharacterCreator/CharacterCreator.cs | 492 +++++++ .../CharacterCreator/CharacterCreator.cs.meta | 18 + .../CharacterCreator/CharacterSpinner.cs | 75 ++ .../CharacterCreator/CharacterSpinner.cs.meta | 18 + .../CharacterCreator/ColorPickerControl.cs | 606 +++++++++ .../ColorPickerControl.cs.meta | 18 + .../CharacterCreator/Creator_BlendSlider.cs | 47 + .../Creator_BlendSlider.cs.meta | 9 + .../Scripts/CharacterCreator/DecalBaker.cs | 299 +++++ .../CharacterCreator/DecalBaker.cs.meta | 18 + .../CharacterCreator/DecalController.cs | 170 +++ .../CharacterCreator/DecalController.cs.meta | 18 + .../Scripts/CharacterCreator/Drawer.cs | 51 + .../Scripts/CharacterCreator/Drawer.cs.meta | 18 + .../Scripts/CharacterCreator/Editor.meta | 8 + .../Editor/CharacterEditor.cs | 38 + .../Editor/CharacterEditor.cs.meta | 18 + .../Editor/IconCaptureEditor.cs | 26 + .../Editor/IconCaptureEditor.cs.meta | 18 + .../Editor/TextureBakerEditor.cs | 31 + .../Editor/TextureBakerEditor.cs.meta | 18 + .../CharacterCreator/ExpressionSelect.cs | 41 + .../CharacterCreator/ExpressionSelect.cs.meta | 18 + .../Scripts/CharacterCreator/IconCapture.cs | 169 +++ .../CharacterCreator/IconCapture.cs.meta | 18 + .../OutfitVisibilityToggler.cs | 56 + .../OutfitVisibilityToggler.cs.meta | 18 + .../CharacterCreator/SVImageControl.cs | 94 ++ .../CharacterCreator/SVImageControl.cs.meta | 18 + .../Scripts/CharacterCreator/SaveSelector.cs | 27 + .../CharacterCreator/SaveSelector.cs.meta | 18 + .../CharacterCreator/SwatchSelector.cs | 28 + .../CharacterCreator/SwatchSelector.cs.meta | 18 + .../Scripts/CharacterCreator/TextureBaker.cs | 337 +++++ .../CharacterCreator/TextureBaker.cs.meta | 18 + .../CharacterCreator/TexturePackage.cs | 16 + .../CharacterCreator/TexturePackage.cs.meta | 18 + .../CharacterCreator/TextureSelector.cs | 50 + .../CharacterCreator/TextureSelector.cs.meta | 18 + .../Scripts/CharacterObject.cs | 22 + .../Scripts/CharacterObject.cs.meta | 18 + .../Scripts/DataObject.cs | 19 + .../Scripts/DataObject.cs.meta | 18 + .../ToonCharacterModular/Scripts/Editor.meta | 8 + .../Scripts/Editor/BSMC_Tools.cs | 21 + .../Scripts/Editor/BSMC_Tools.cs.meta | 18 + .../Scripts/Editor/BoZo_AutoIncludeShaders.cs | 60 + .../Editor/BoZo_AutoIncludeShaders.cs.meta | 18 + .../Scripts/Editor/OutfitEditor.cs | 134 ++ .../Scripts/Editor/OutfitEditor.cs.meta | 18 + .../Scripts/Editor/OutfitSystemEditor.cs | 165 +++ .../Scripts/Editor/OutfitSystemEditor.cs.meta | 18 + .../Scripts/Interfaces.meta | 8 + .../Scripts/Interfaces/IOutfitExtension.cs | 29 + .../Interfaces/IOutfitExtension.cs.meta | 18 + .../ToonCharacterModular/Scripts/Outfit.cs | 794 +++++++++++ .../Scripts/Outfit.cs.meta | 18 + .../Scripts/OutfitBase.cs | 23 + .../Scripts/OutfitBase.cs.meta | 18 + .../Scripts/OutfitFollowBlendShapes.cs | 112 ++ .../Scripts/OutfitFollowBlendShapes.cs.meta | 18 + .../Scripts/OutfitHeightChange.cs | 27 + .../Scripts/OutfitHeightChange.cs.meta | 18 + .../Scripts/OutfitHideByTag.cs | 47 + .../Scripts/OutfitHideByTag.cs.meta | 18 + .../Scripts/OutfitSelector.cs | 47 + .../Scripts/OutfitSelector.cs.meta | 9 + .../Scripts/OutfitSystem.cs | 1187 +++++++++++++++++ .../Scripts/OutfitSystem.cs.meta | 18 + .../Scripts/OutfitType.cs | 10 + .../Scripts/OutfitType.cs.meta | 18 + .../Scripts/ThirdParty.meta | 8 + .../Scripts/ThirdParty/MagicaCloth.meta | 8 + .../MagicaCloth/BoZo_MagicaClothCollider.cs | 46 + .../BoZo_MagicaClothCollider.cs.meta | 18 + .../MagicaCloth/BoZo_MagicaClothSupport.cs | 268 ++++ .../BoZo_MagicaClothSupport.cs.meta | 18 + .../ThirdParty/MagicaCloth/Editor.meta | 8 + .../Editor/BoZo_MagicaClothSupportEditor.cs | 65 + .../BoZo_MagicaClothSupportEditor.cs.meta | 18 + .../Scripts/ToonFaceRelay.cs | 21 + .../Scripts/ToonFaceRelay.cs.meta | 18 + .../Scripts/ToonFacialAnimator.cs | 135 ++ .../Scripts/ToonFacialAnimator.cs.meta | 18 + .../ToonCharacterModular/Shaders.meta | 8 + .../Shaders/BMAC_Toon.shader | 641 +++++++++ .../Shaders/BMAC_Toon.shader.meta | 16 + .../ToonCharacterModular/Textures.meta | 8 + .../ToonCharacterModular/Textures/Common.meta | 8 + .../Textures/Common/Resources.meta | 8 + .../Textures/Common/Resources/Pattern.meta | 8 + .../Pattern/Pattern_UnderClothes.png | 3 + .../Pattern/Pattern_UnderClothes.png.meta | 150 +++ .../Textures/FacialSprites.meta | 8 + .../FacialSprites/FacialSprite_AngryEyes.png | 3 + .../FacialSprite_AngryEyes.png.meta | 134 ++ .../FacialSprites/FacialSprite_CircleEyes.png | 3 + .../FacialSprite_CircleEyes.png.meta | 134 ++ .../FacialSprites/FacialSprite_Closed.png | 3 + .../FacialSprite_Closed.png.meta | 134 ++ .../FacialSprites/FacialSprite_CringeEyes.png | 3 + .../FacialSprite_CringeEyes.png.meta | 134 ++ .../FacialSprite_CringeMouth.png | 3 + .../FacialSprite_CringeMouth.png.meta | 134 ++ .../FacialSprites/FacialSprite_Dizzy.png | 3 + .../FacialSprites/FacialSprite_Dizzy.png.meta | 134 ++ .../FacialSprites/FacialSprite_HappyMouth.png | 3 + .../FacialSprite_HappyMouth.png.meta | 134 ++ .../FacialSprites/FacialSprite_Heart.png | 3 + .../FacialSprites/FacialSprite_Heart.png.meta | 134 ++ .../FacialSprites/FacialSprite_KittyMouth.png | 3 + .../FacialSprite_KittyMouth.png.meta | 134 ++ .../FacialSprites/FacialSprite_SharpTeeth.png | 3 + .../FacialSprite_SharpTeeth.png.meta | 134 ++ .../FacialSprites/FacialSprite_Stars.png | 3 + .../FacialSprites/FacialSprite_Stars.png.meta | 134 ++ .../FacialSprite_WideOpenMouth.png | 3 + .../FacialSprite_WideOpenMouth.png.meta | 134 ++ .../Textures/StandardNormal.png | 3 + .../Textures/StandardNormal.png.meta | 134 ++ Assets/04_Models/Characters/Yuna_V2.meta | 8 + .../Characters/Yuna_V2/Materials.meta | 8 + .../Yuna_V2/Materials/Yuna_V2_0_Mat.mat | 481 +++++++ .../Yuna_V2/Materials/Yuna_V2_0_Mat.mat.meta | 8 + .../04_Models/Characters/Yuna_V2/Meshes.meta | 8 + .../Yuna_V2/Meshes/Yuna_V2_Mesh.asset | 3 + .../Yuna_V2/Meshes/Yuna_V2_Mesh.asset.meta | 8 + .../04_Models/Characters/Yuna_V2/Prefabs.meta | 8 + .../Characters/Yuna_V2/Prefabs/Yuna_V2.prefab | 3 + .../Yuna_V2/Prefabs/Yuna_V2.prefab.meta | 7 + .../Characters/Yuna_V2/Textures.meta | 8 + .../Yuna_V2/Textures/Yuna_V2_0_D.png | 3 + .../Yuna_V2/Textures/Yuna_V2_0_D.png.meta | 156 +++ .../Yuna_V2/Textures/Yuna_V2_0_NormalMap.png | 3 + .../Textures/Yuna_V2_0_NormalMap.png.meta | 156 +++ Assets/07_Data/Character/Yuna.asset | 3 + Assets/07_Data/Character/Yuna.asset.meta | 8 + Assets/07_Data/DialogGraph/Yuna_Dialog1.dlg | 432 ++++++ .../07_Data/DialogGraph/Yuna_Dialog1.dlg.meta | 10 + Assets/TutorialInfo.meta | 8 + Assets/TutorialInfo/Scripts.meta | 8 + Assets/TutorialInfo/Scripts/Editor.meta | 8 + .../Scripts/Editor/ReadmeEditor.cs | 242 ++++ .../Scripts/Editor/ReadmeEditor.cs.meta | 12 + Assets/TutorialInfo/Scripts/Readme.cs | 16 + Assets/TutorialInfo/Scripts/Readme.cs.meta | 12 + 232 files changed, 17162 insertions(+), 2 deletions(-) create mode 100644 Assets/04_Models/Characters/ToonCharacterModular.meta create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Animations.meta create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Animations/BMAC_Dizzy.anim create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Animations/BMAC_Dizzy.anim.meta create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Animations/BMAC_F_Idle.anim create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Animations/BMAC_F_Idle.anim.meta create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Animations/BMAC_F_Walk.anim create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Animations/BMAC_F_Walk.anim.meta create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Animations/BMAC_M_Idle.anim create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Animations/BMAC_M_Idle.anim.meta create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Animations/BMAC_M_Walk.anim create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Animations/BMAC_M_Walk.anim.meta create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Animations/Expressions.meta create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Animations/Expressions/BMAC_Angry.anim create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Animations/Expressions/BMAC_Angry.anim.meta create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Animations/Expressions/BMAC_Blink.anim create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Animations/Expressions/BMAC_Blink.anim.meta create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Animations/Expressions/BMAC_Devious.anim create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Animations/Expressions/BMAC_Devious.anim.meta create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Animations/Expressions/BMAC_Evil.anim create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Animations/Expressions/BMAC_Evil.anim.meta create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Animations/Expressions/BMAC_Happy.anim create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Animations/Expressions/BMAC_Happy.anim.meta create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Animations/Expressions/BMAC_Neutral.anim create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Animations/Expressions/BMAC_Neutral.anim.meta create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Animations/Expressions/BMAC_Sad.anim create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Animations/Expressions/BMAC_Sad.anim.meta create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Animations/Expressions/BMAC_Smile.anim create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Animations/Expressions/BMAC_Smile.anim.meta create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Animations/Expressions/BMAC_Surprised.anim create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Animations/Expressions/BMAC_Surprised.anim.meta create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Animations/Expressions/BMAC_Toon_Cringe.anim create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Animations/Expressions/BMAC_Toon_Cringe.anim.meta create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Animations/Expressions/BMAC_Toon_Dizzy.anim create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Animations/Expressions/BMAC_Toon_Dizzy.anim.meta create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Animations/Expressions/BMAC_Toon_Excited.anim create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Animations/Expressions/BMAC_Toon_Excited.anim.meta create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Animations/Expressions/BMAC_Toon_Hearts.anim create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Animations/Expressions/BMAC_Toon_Hearts.anim.meta create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Animations/Expressions/BMAC_Toon_Pissed.anim create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Animations/Expressions/BMAC_Toon_Pissed.anim.meta create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Animations/Expressions/BMAC_Toon_Shocked.anim create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Animations/Expressions/BMAC_Toon_Shocked.anim.meta create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Animations/Expressions/BMAC_Toon_Stars.anim create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Animations/Expressions/BMAC_Toon_Stars.anim.meta create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Animations/Expressions/CharacterCreatorCTRL.controller create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Animations/Expressions/CharacterCreatorCTRL.controller.meta create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Materials.meta create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Materials/BMAC_BackingBody.mat create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Materials/BMAC_BackingBody.mat.meta create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Materials/BMAC_Body.mat create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Materials/BMAC_Body.mat.meta create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Materials/BMAC_Master_Mat.mat create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Materials/BMAC_Master_Mat.mat.meta create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Models.meta create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Models/Common.meta create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Models/Common/Body.meta create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Models/Common/Body/BodyRig.fbx create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Models/Common/Body/BodyRig.fbx.meta create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Models/Common/Body/Body_BasicBody_v2.png create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Models/Common/Body/Body_BasicBody_v2.png.meta create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Models/Common/Body/Body_D.png create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Models/Common/Body/Body_D.png.meta create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Models/Common/Body/Body_N.png create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Models/Common/Body/Body_N.png.meta create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Scripts.meta create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Scripts/BodyShapeModifier.cs create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Scripts/BodyShapeModifier.cs.meta create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator.meta create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/BMAC_SaveSystem.cs create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/BMAC_SaveSystem.cs.meta create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/BoZoCharacterOptimizer.cs create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/BoZoCharacterOptimizer.cs.meta create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/BoZo_EventSystemHandler.cs create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/BoZo_EventSystemHandler.cs.meta create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/BoZo_Links.cs create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/BoZo_Links.cs.meta create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/BoZo_TextureBuilder.cs create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/BoZo_TextureBuilder.cs.meta create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/BodyShapeSliders.cs create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/BodyShapeSliders.cs.meta create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/CameraController.cs create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/CameraController.cs.meta create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/CameraUpdate.cs create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/CameraUpdate.cs.meta create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/CharacterCreator.cs create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/CharacterCreator.cs.meta create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/CharacterSpinner.cs create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/CharacterSpinner.cs.meta create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/ColorPickerControl.cs create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/ColorPickerControl.cs.meta create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/Creator_BlendSlider.cs create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/Creator_BlendSlider.cs.meta create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/DecalBaker.cs create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/DecalBaker.cs.meta create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/DecalController.cs create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/DecalController.cs.meta create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/Drawer.cs create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/Drawer.cs.meta create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/Editor.meta create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/Editor/CharacterEditor.cs create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/Editor/CharacterEditor.cs.meta create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/Editor/IconCaptureEditor.cs create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/Editor/IconCaptureEditor.cs.meta create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/Editor/TextureBakerEditor.cs create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/Editor/TextureBakerEditor.cs.meta create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/ExpressionSelect.cs create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/ExpressionSelect.cs.meta create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/IconCapture.cs create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/IconCapture.cs.meta create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/OutfitVisibilityToggler.cs create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/OutfitVisibilityToggler.cs.meta create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/SVImageControl.cs create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/SVImageControl.cs.meta create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/SaveSelector.cs create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/SaveSelector.cs.meta create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/SwatchSelector.cs create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/SwatchSelector.cs.meta create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/TextureBaker.cs create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/TextureBaker.cs.meta create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/TexturePackage.cs create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/TexturePackage.cs.meta create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/TextureSelector.cs create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/TextureSelector.cs.meta create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterObject.cs create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterObject.cs.meta create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Scripts/DataObject.cs create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Scripts/DataObject.cs.meta create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Scripts/Editor.meta create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Scripts/Editor/BSMC_Tools.cs create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Scripts/Editor/BSMC_Tools.cs.meta create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Scripts/Editor/BoZo_AutoIncludeShaders.cs create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Scripts/Editor/BoZo_AutoIncludeShaders.cs.meta create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Scripts/Editor/OutfitEditor.cs create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Scripts/Editor/OutfitEditor.cs.meta create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Scripts/Editor/OutfitSystemEditor.cs create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Scripts/Editor/OutfitSystemEditor.cs.meta create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Scripts/Interfaces.meta create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Scripts/Interfaces/IOutfitExtension.cs create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Scripts/Interfaces/IOutfitExtension.cs.meta create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Scripts/Outfit.cs create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Scripts/Outfit.cs.meta create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Scripts/OutfitBase.cs create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Scripts/OutfitBase.cs.meta create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Scripts/OutfitFollowBlendShapes.cs create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Scripts/OutfitFollowBlendShapes.cs.meta create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Scripts/OutfitHeightChange.cs create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Scripts/OutfitHeightChange.cs.meta create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Scripts/OutfitHideByTag.cs create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Scripts/OutfitHideByTag.cs.meta create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Scripts/OutfitSelector.cs create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Scripts/OutfitSelector.cs.meta create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Scripts/OutfitSystem.cs create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Scripts/OutfitSystem.cs.meta create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Scripts/OutfitType.cs create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Scripts/OutfitType.cs.meta create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Scripts/ThirdParty.meta create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Scripts/ThirdParty/MagicaCloth.meta create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Scripts/ThirdParty/MagicaCloth/BoZo_MagicaClothCollider.cs create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Scripts/ThirdParty/MagicaCloth/BoZo_MagicaClothCollider.cs.meta create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Scripts/ThirdParty/MagicaCloth/BoZo_MagicaClothSupport.cs create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Scripts/ThirdParty/MagicaCloth/BoZo_MagicaClothSupport.cs.meta create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Scripts/ThirdParty/MagicaCloth/Editor.meta create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Scripts/ThirdParty/MagicaCloth/Editor/BoZo_MagicaClothSupportEditor.cs create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Scripts/ThirdParty/MagicaCloth/Editor/BoZo_MagicaClothSupportEditor.cs.meta create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Scripts/ToonFaceRelay.cs create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Scripts/ToonFaceRelay.cs.meta create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Scripts/ToonFacialAnimator.cs create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Scripts/ToonFacialAnimator.cs.meta create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Shaders.meta create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Shaders/BMAC_Toon.shader create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Shaders/BMAC_Toon.shader.meta create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Textures.meta create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Textures/Common.meta create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Textures/Common/Resources.meta create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Textures/Common/Resources/Pattern.meta create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Textures/Common/Resources/Pattern/Pattern_UnderClothes.png create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Textures/Common/Resources/Pattern/Pattern_UnderClothes.png.meta create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Textures/FacialSprites.meta create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Textures/FacialSprites/FacialSprite_AngryEyes.png create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Textures/FacialSprites/FacialSprite_AngryEyes.png.meta create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Textures/FacialSprites/FacialSprite_CircleEyes.png create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Textures/FacialSprites/FacialSprite_CircleEyes.png.meta create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Textures/FacialSprites/FacialSprite_Closed.png create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Textures/FacialSprites/FacialSprite_Closed.png.meta create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Textures/FacialSprites/FacialSprite_CringeEyes.png create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Textures/FacialSprites/FacialSprite_CringeEyes.png.meta create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Textures/FacialSprites/FacialSprite_CringeMouth.png create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Textures/FacialSprites/FacialSprite_CringeMouth.png.meta create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Textures/FacialSprites/FacialSprite_Dizzy.png create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Textures/FacialSprites/FacialSprite_Dizzy.png.meta create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Textures/FacialSprites/FacialSprite_HappyMouth.png create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Textures/FacialSprites/FacialSprite_HappyMouth.png.meta create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Textures/FacialSprites/FacialSprite_Heart.png create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Textures/FacialSprites/FacialSprite_Heart.png.meta create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Textures/FacialSprites/FacialSprite_KittyMouth.png create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Textures/FacialSprites/FacialSprite_KittyMouth.png.meta create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Textures/FacialSprites/FacialSprite_SharpTeeth.png create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Textures/FacialSprites/FacialSprite_SharpTeeth.png.meta create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Textures/FacialSprites/FacialSprite_Stars.png create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Textures/FacialSprites/FacialSprite_Stars.png.meta create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Textures/FacialSprites/FacialSprite_WideOpenMouth.png create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Textures/FacialSprites/FacialSprite_WideOpenMouth.png.meta create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Textures/StandardNormal.png create mode 100644 Assets/04_Models/Characters/ToonCharacterModular/Textures/StandardNormal.png.meta create mode 100644 Assets/04_Models/Characters/Yuna_V2.meta create mode 100644 Assets/04_Models/Characters/Yuna_V2/Materials.meta create mode 100644 Assets/04_Models/Characters/Yuna_V2/Materials/Yuna_V2_0_Mat.mat create mode 100644 Assets/04_Models/Characters/Yuna_V2/Materials/Yuna_V2_0_Mat.mat.meta create mode 100644 Assets/04_Models/Characters/Yuna_V2/Meshes.meta create mode 100644 Assets/04_Models/Characters/Yuna_V2/Meshes/Yuna_V2_Mesh.asset create mode 100644 Assets/04_Models/Characters/Yuna_V2/Meshes/Yuna_V2_Mesh.asset.meta create mode 100644 Assets/04_Models/Characters/Yuna_V2/Prefabs.meta create mode 100644 Assets/04_Models/Characters/Yuna_V2/Prefabs/Yuna_V2.prefab create mode 100644 Assets/04_Models/Characters/Yuna_V2/Prefabs/Yuna_V2.prefab.meta create mode 100644 Assets/04_Models/Characters/Yuna_V2/Textures.meta create mode 100644 Assets/04_Models/Characters/Yuna_V2/Textures/Yuna_V2_0_D.png create mode 100644 Assets/04_Models/Characters/Yuna_V2/Textures/Yuna_V2_0_D.png.meta create mode 100644 Assets/04_Models/Characters/Yuna_V2/Textures/Yuna_V2_0_NormalMap.png create mode 100644 Assets/04_Models/Characters/Yuna_V2/Textures/Yuna_V2_0_NormalMap.png.meta create mode 100644 Assets/07_Data/Character/Yuna.asset create mode 100644 Assets/07_Data/Character/Yuna.asset.meta create mode 100644 Assets/07_Data/DialogGraph/Yuna_Dialog1.dlg create mode 100644 Assets/07_Data/DialogGraph/Yuna_Dialog1.dlg.meta create mode 100644 Assets/TutorialInfo.meta create mode 100644 Assets/TutorialInfo/Scripts.meta create mode 100644 Assets/TutorialInfo/Scripts/Editor.meta create mode 100644 Assets/TutorialInfo/Scripts/Editor/ReadmeEditor.cs create mode 100644 Assets/TutorialInfo/Scripts/Editor/ReadmeEditor.cs.meta create mode 100644 Assets/TutorialInfo/Scripts/Readme.cs create mode 100644 Assets/TutorialInfo/Scripts/Readme.cs.meta diff --git a/Assets/01_Scenes/_TestScenes/Test1.unity b/Assets/01_Scenes/_TestScenes/Test1.unity index c44bb354..7982729e 100644 --- a/Assets/01_Scenes/_TestScenes/Test1.unity +++ b/Assets/01_Scenes/_TestScenes/Test1.unity @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0239eda004f29ccef9af9dbf49d1bf49d5d6ff5a814dc6edb3cdf9d7c1f53541 -size 28262 +oid sha256:26d1fff35b564242e4831cce2cf4d21b4c4c8eafb7f2e0ed0ff285b37d1a7a7a +size 30916 diff --git a/Assets/04_Models/Characters/ToonCharacterModular.meta b/Assets/04_Models/Characters/ToonCharacterModular.meta new file mode 100644 index 00000000..d9293ea4 --- /dev/null +++ b/Assets/04_Models/Characters/ToonCharacterModular.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 3482dc3b742575540a4eb3e378061de7 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/04_Models/Characters/ToonCharacterModular/Animations.meta b/Assets/04_Models/Characters/ToonCharacterModular/Animations.meta new file mode 100644 index 00000000..1f01bbcb --- /dev/null +++ b/Assets/04_Models/Characters/ToonCharacterModular/Animations.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 5741a1eab842f6248abde98003f31243 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/04_Models/Characters/ToonCharacterModular/Animations/BMAC_Dizzy.anim b/Assets/04_Models/Characters/ToonCharacterModular/Animations/BMAC_Dizzy.anim new file mode 100644 index 00000000..824e1d94 --- /dev/null +++ b/Assets/04_Models/Characters/ToonCharacterModular/Animations/BMAC_Dizzy.anim @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0baa8869fd3b1c19dda7faca071a8683ec490cda80f8d8261eb2caa9342d428d +size 416392 diff --git a/Assets/04_Models/Characters/ToonCharacterModular/Animations/BMAC_Dizzy.anim.meta b/Assets/04_Models/Characters/ToonCharacterModular/Animations/BMAC_Dizzy.anim.meta new file mode 100644 index 00000000..7f4d10de --- /dev/null +++ b/Assets/04_Models/Characters/ToonCharacterModular/Animations/BMAC_Dizzy.anim.meta @@ -0,0 +1,15 @@ +fileFormatVersion: 2 +guid: fe12090225f3e48459138b31154c6b91 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 7400000 + userData: + assetBundleName: + assetBundleVariant: +AssetOrigin: + serializedVersion: 1 + productId: 323550 + packageName: 'BoZo: Modular Anime Characters - Base Pack' + packageVersion: 1.8.6 + assetPath: Assets/BoZo_ModularAnimeCharacters/Animations/BMAC_Dizzy.anim + uploadId: 917032 diff --git a/Assets/04_Models/Characters/ToonCharacterModular/Animations/BMAC_F_Idle.anim b/Assets/04_Models/Characters/ToonCharacterModular/Animations/BMAC_F_Idle.anim new file mode 100644 index 00000000..4f540b8e --- /dev/null +++ b/Assets/04_Models/Characters/ToonCharacterModular/Animations/BMAC_F_Idle.anim @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:eb3d6e7bf22ecb8b2f5503335af0a5a6dbd33e1626ed6279b0008525da5e85bd +size 181261 diff --git a/Assets/04_Models/Characters/ToonCharacterModular/Animations/BMAC_F_Idle.anim.meta b/Assets/04_Models/Characters/ToonCharacterModular/Animations/BMAC_F_Idle.anim.meta new file mode 100644 index 00000000..02bf0bed --- /dev/null +++ b/Assets/04_Models/Characters/ToonCharacterModular/Animations/BMAC_F_Idle.anim.meta @@ -0,0 +1,15 @@ +fileFormatVersion: 2 +guid: 9276e28abed3cd747855a44e49581e56 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 7400000 + userData: + assetBundleName: + assetBundleVariant: +AssetOrigin: + serializedVersion: 1 + productId: 323550 + packageName: 'BoZo: Modular Anime Characters - Base Pack' + packageVersion: 1.8.6 + assetPath: Assets/BoZo_ModularAnimeCharacters/Animations/BMAC_F_Idle.anim + uploadId: 917032 diff --git a/Assets/04_Models/Characters/ToonCharacterModular/Animations/BMAC_F_Walk.anim b/Assets/04_Models/Characters/ToonCharacterModular/Animations/BMAC_F_Walk.anim new file mode 100644 index 00000000..33ea7e96 --- /dev/null +++ b/Assets/04_Models/Characters/ToonCharacterModular/Animations/BMAC_F_Walk.anim @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:73b90d4e4265977921a6db31347407a853c68543c81d21a98ea4257e7f7bd4d4 +size 441808 diff --git a/Assets/04_Models/Characters/ToonCharacterModular/Animations/BMAC_F_Walk.anim.meta b/Assets/04_Models/Characters/ToonCharacterModular/Animations/BMAC_F_Walk.anim.meta new file mode 100644 index 00000000..c24d02dd --- /dev/null +++ b/Assets/04_Models/Characters/ToonCharacterModular/Animations/BMAC_F_Walk.anim.meta @@ -0,0 +1,15 @@ +fileFormatVersion: 2 +guid: ad7109d4a8b03714897bcc9c6efa6b62 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 7400000 + userData: + assetBundleName: + assetBundleVariant: +AssetOrigin: + serializedVersion: 1 + productId: 323550 + packageName: 'BoZo: Modular Anime Characters - Base Pack' + packageVersion: 1.8.6 + assetPath: Assets/BoZo_ModularAnimeCharacters/Animations/BMAC_F_Walk.anim + uploadId: 917032 diff --git a/Assets/04_Models/Characters/ToonCharacterModular/Animations/BMAC_M_Idle.anim b/Assets/04_Models/Characters/ToonCharacterModular/Animations/BMAC_M_Idle.anim new file mode 100644 index 00000000..a6cfe6d2 --- /dev/null +++ b/Assets/04_Models/Characters/ToonCharacterModular/Animations/BMAC_M_Idle.anim @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:72cfba94d6a326c4e395e8e02d470125257742e539941762c47a4285b930985a +size 217137 diff --git a/Assets/04_Models/Characters/ToonCharacterModular/Animations/BMAC_M_Idle.anim.meta b/Assets/04_Models/Characters/ToonCharacterModular/Animations/BMAC_M_Idle.anim.meta new file mode 100644 index 00000000..4139dbac --- /dev/null +++ b/Assets/04_Models/Characters/ToonCharacterModular/Animations/BMAC_M_Idle.anim.meta @@ -0,0 +1,15 @@ +fileFormatVersion: 2 +guid: 5976004510c4a9f438e903433ff94159 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 7400000 + userData: + assetBundleName: + assetBundleVariant: +AssetOrigin: + serializedVersion: 1 + productId: 323550 + packageName: 'BoZo: Modular Anime Characters - Base Pack' + packageVersion: 1.8.6 + assetPath: Assets/BoZo_ModularAnimeCharacters/Animations/BMAC_M_Idle.anim + uploadId: 917032 diff --git a/Assets/04_Models/Characters/ToonCharacterModular/Animations/BMAC_M_Walk.anim b/Assets/04_Models/Characters/ToonCharacterModular/Animations/BMAC_M_Walk.anim new file mode 100644 index 00000000..297bca44 --- /dev/null +++ b/Assets/04_Models/Characters/ToonCharacterModular/Animations/BMAC_M_Walk.anim @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f7ca22042e9831539fc42423ffb24d76142af95724b1103f1a2c2bc3050ebcc6 +size 439597 diff --git a/Assets/04_Models/Characters/ToonCharacterModular/Animations/BMAC_M_Walk.anim.meta b/Assets/04_Models/Characters/ToonCharacterModular/Animations/BMAC_M_Walk.anim.meta new file mode 100644 index 00000000..49187677 --- /dev/null +++ b/Assets/04_Models/Characters/ToonCharacterModular/Animations/BMAC_M_Walk.anim.meta @@ -0,0 +1,15 @@ +fileFormatVersion: 2 +guid: 6c5795dd9fceb2a469a271d930faff17 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 7400000 + userData: + assetBundleName: + assetBundleVariant: +AssetOrigin: + serializedVersion: 1 + productId: 323550 + packageName: 'BoZo: Modular Anime Characters - Base Pack' + packageVersion: 1.8.6 + assetPath: Assets/BoZo_ModularAnimeCharacters/Animations/BMAC_M_Walk.anim + uploadId: 917032 diff --git a/Assets/04_Models/Characters/ToonCharacterModular/Animations/Expressions.meta b/Assets/04_Models/Characters/ToonCharacterModular/Animations/Expressions.meta new file mode 100644 index 00000000..a02bfc27 --- /dev/null +++ b/Assets/04_Models/Characters/ToonCharacterModular/Animations/Expressions.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: aa846307b4d822348aefd5e144151454 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/04_Models/Characters/ToonCharacterModular/Animations/Expressions/BMAC_Angry.anim b/Assets/04_Models/Characters/ToonCharacterModular/Animations/Expressions/BMAC_Angry.anim new file mode 100644 index 00000000..73e49408 --- /dev/null +++ b/Assets/04_Models/Characters/ToonCharacterModular/Animations/Expressions/BMAC_Angry.anim @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b1c43f54a494bc4eb611d1d3ae891beb1c41e08b9ddfc727c1d30d1024bce6c0 +size 9043 diff --git a/Assets/04_Models/Characters/ToonCharacterModular/Animations/Expressions/BMAC_Angry.anim.meta b/Assets/04_Models/Characters/ToonCharacterModular/Animations/Expressions/BMAC_Angry.anim.meta new file mode 100644 index 00000000..d178fe27 --- /dev/null +++ b/Assets/04_Models/Characters/ToonCharacterModular/Animations/Expressions/BMAC_Angry.anim.meta @@ -0,0 +1,15 @@ +fileFormatVersion: 2 +guid: 274311329317ccf449acea8dce3be8fe +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 7400000 + userData: + assetBundleName: + assetBundleVariant: +AssetOrigin: + serializedVersion: 1 + productId: 323550 + packageName: 'BoZo: Modular Anime Characters - Base Pack' + packageVersion: 1.8.6 + assetPath: Assets/BoZo_ModularAnimeCharacters/Animations/Expressions/BMAC_Angry.anim + uploadId: 917032 diff --git a/Assets/04_Models/Characters/ToonCharacterModular/Animations/Expressions/BMAC_Blink.anim b/Assets/04_Models/Characters/ToonCharacterModular/Animations/Expressions/BMAC_Blink.anim new file mode 100644 index 00000000..457840f2 --- /dev/null +++ b/Assets/04_Models/Characters/ToonCharacterModular/Animations/Expressions/BMAC_Blink.anim @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:230a5a0cb5cbf3c3df3e417152c4d1bcdab09e6d42441363076972c08260c12d +size 8373 diff --git a/Assets/04_Models/Characters/ToonCharacterModular/Animations/Expressions/BMAC_Blink.anim.meta b/Assets/04_Models/Characters/ToonCharacterModular/Animations/Expressions/BMAC_Blink.anim.meta new file mode 100644 index 00000000..b2523a29 --- /dev/null +++ b/Assets/04_Models/Characters/ToonCharacterModular/Animations/Expressions/BMAC_Blink.anim.meta @@ -0,0 +1,15 @@ +fileFormatVersion: 2 +guid: 5820dd3123db00b49a21828fb1be49a0 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 7400000 + userData: + assetBundleName: + assetBundleVariant: +AssetOrigin: + serializedVersion: 1 + productId: 323550 + packageName: 'BoZo: Modular Anime Characters - Base Pack' + packageVersion: 1.8.6 + assetPath: Assets/BoZo_ModularAnimeCharacters/Animations/Expressions/BMAC_Blink.anim + uploadId: 917032 diff --git a/Assets/04_Models/Characters/ToonCharacterModular/Animations/Expressions/BMAC_Devious.anim b/Assets/04_Models/Characters/ToonCharacterModular/Animations/Expressions/BMAC_Devious.anim new file mode 100644 index 00000000..d60cb2fe --- /dev/null +++ b/Assets/04_Models/Characters/ToonCharacterModular/Animations/Expressions/BMAC_Devious.anim @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2381936029b7d20bc5bccb7f986f62025aed3baf9ff83ee6457bcb82d0ae6e60 +size 17640 diff --git a/Assets/04_Models/Characters/ToonCharacterModular/Animations/Expressions/BMAC_Devious.anim.meta b/Assets/04_Models/Characters/ToonCharacterModular/Animations/Expressions/BMAC_Devious.anim.meta new file mode 100644 index 00000000..5e76dfcb --- /dev/null +++ b/Assets/04_Models/Characters/ToonCharacterModular/Animations/Expressions/BMAC_Devious.anim.meta @@ -0,0 +1,15 @@ +fileFormatVersion: 2 +guid: 7017b6d3ec28cbd46ac136cd14ebb4e8 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 7400000 + userData: + assetBundleName: + assetBundleVariant: +AssetOrigin: + serializedVersion: 1 + productId: 323550 + packageName: 'BoZo: Modular Anime Characters - Base Pack' + packageVersion: 1.8.6 + assetPath: Assets/BoZo_ModularAnimeCharacters/Animations/Expressions/BMAC_Devious.anim + uploadId: 917032 diff --git a/Assets/04_Models/Characters/ToonCharacterModular/Animations/Expressions/BMAC_Evil.anim b/Assets/04_Models/Characters/ToonCharacterModular/Animations/Expressions/BMAC_Evil.anim new file mode 100644 index 00000000..08b7b824 --- /dev/null +++ b/Assets/04_Models/Characters/ToonCharacterModular/Animations/Expressions/BMAC_Evil.anim @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:42bace84b5d5f88a0567612e2a4a791454035fa8117d72ef37ea5cb37e693ec6 +size 36817 diff --git a/Assets/04_Models/Characters/ToonCharacterModular/Animations/Expressions/BMAC_Evil.anim.meta b/Assets/04_Models/Characters/ToonCharacterModular/Animations/Expressions/BMAC_Evil.anim.meta new file mode 100644 index 00000000..4b9a591c --- /dev/null +++ b/Assets/04_Models/Characters/ToonCharacterModular/Animations/Expressions/BMAC_Evil.anim.meta @@ -0,0 +1,15 @@ +fileFormatVersion: 2 +guid: 65183e65b4e13e849ae9185454d22a6b +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 7400000 + userData: + assetBundleName: + assetBundleVariant: +AssetOrigin: + serializedVersion: 1 + productId: 323550 + packageName: 'BoZo: Modular Anime Characters - Base Pack' + packageVersion: 1.8.6 + assetPath: Assets/BoZo_ModularAnimeCharacters/Animations/Expressions/BMAC_Evil.anim + uploadId: 917032 diff --git a/Assets/04_Models/Characters/ToonCharacterModular/Animations/Expressions/BMAC_Happy.anim b/Assets/04_Models/Characters/ToonCharacterModular/Animations/Expressions/BMAC_Happy.anim new file mode 100644 index 00000000..6db7ff24 --- /dev/null +++ b/Assets/04_Models/Characters/ToonCharacterModular/Animations/Expressions/BMAC_Happy.anim @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:11df518f997042eb86aafcf8e92aa4bbe404a8c211a7be439404befe6b3ca735 +size 10277 diff --git a/Assets/04_Models/Characters/ToonCharacterModular/Animations/Expressions/BMAC_Happy.anim.meta b/Assets/04_Models/Characters/ToonCharacterModular/Animations/Expressions/BMAC_Happy.anim.meta new file mode 100644 index 00000000..eab9448e --- /dev/null +++ b/Assets/04_Models/Characters/ToonCharacterModular/Animations/Expressions/BMAC_Happy.anim.meta @@ -0,0 +1,15 @@ +fileFormatVersion: 2 +guid: 89aee812b742109468ed4dd78afac366 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 7400000 + userData: + assetBundleName: + assetBundleVariant: +AssetOrigin: + serializedVersion: 1 + productId: 323550 + packageName: 'BoZo: Modular Anime Characters - Base Pack' + packageVersion: 1.8.6 + assetPath: Assets/BoZo_ModularAnimeCharacters/Animations/Expressions/BMAC_Happy.anim + uploadId: 917032 diff --git a/Assets/04_Models/Characters/ToonCharacterModular/Animations/Expressions/BMAC_Neutral.anim b/Assets/04_Models/Characters/ToonCharacterModular/Animations/Expressions/BMAC_Neutral.anim new file mode 100644 index 00000000..37f1b47e --- /dev/null +++ b/Assets/04_Models/Characters/ToonCharacterModular/Animations/Expressions/BMAC_Neutral.anim @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:773af52437247b3e324f0f7904b14465393349757727e03e5682131fed8be500 +size 1694 diff --git a/Assets/04_Models/Characters/ToonCharacterModular/Animations/Expressions/BMAC_Neutral.anim.meta b/Assets/04_Models/Characters/ToonCharacterModular/Animations/Expressions/BMAC_Neutral.anim.meta new file mode 100644 index 00000000..013716a0 --- /dev/null +++ b/Assets/04_Models/Characters/ToonCharacterModular/Animations/Expressions/BMAC_Neutral.anim.meta @@ -0,0 +1,15 @@ +fileFormatVersion: 2 +guid: 8ba3e0d0f4caf2b4e988f2fa31db0e00 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 7400000 + userData: + assetBundleName: + assetBundleVariant: +AssetOrigin: + serializedVersion: 1 + productId: 323550 + packageName: 'BoZo: Modular Anime Characters - Base Pack' + packageVersion: 1.8.6 + assetPath: Assets/BoZo_ModularAnimeCharacters/Animations/Expressions/BMAC_Neutral.anim + uploadId: 917032 diff --git a/Assets/04_Models/Characters/ToonCharacterModular/Animations/Expressions/BMAC_Sad.anim b/Assets/04_Models/Characters/ToonCharacterModular/Animations/Expressions/BMAC_Sad.anim new file mode 100644 index 00000000..686ec02c --- /dev/null +++ b/Assets/04_Models/Characters/ToonCharacterModular/Animations/Expressions/BMAC_Sad.anim @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:746f2ba34f027f1762642da006210b0a6cbaeae9bd74ea35d08490f09ea04e96 +size 10248 diff --git a/Assets/04_Models/Characters/ToonCharacterModular/Animations/Expressions/BMAC_Sad.anim.meta b/Assets/04_Models/Characters/ToonCharacterModular/Animations/Expressions/BMAC_Sad.anim.meta new file mode 100644 index 00000000..3cd84f30 --- /dev/null +++ b/Assets/04_Models/Characters/ToonCharacterModular/Animations/Expressions/BMAC_Sad.anim.meta @@ -0,0 +1,15 @@ +fileFormatVersion: 2 +guid: 0103d1054b85b5c4da54dc2c38bb10e3 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 7400000 + userData: + assetBundleName: + assetBundleVariant: +AssetOrigin: + serializedVersion: 1 + productId: 323550 + packageName: 'BoZo: Modular Anime Characters - Base Pack' + packageVersion: 1.8.6 + assetPath: Assets/BoZo_ModularAnimeCharacters/Animations/Expressions/BMAC_Sad.anim + uploadId: 917032 diff --git a/Assets/04_Models/Characters/ToonCharacterModular/Animations/Expressions/BMAC_Smile.anim b/Assets/04_Models/Characters/ToonCharacterModular/Animations/Expressions/BMAC_Smile.anim new file mode 100644 index 00000000..c9dda5a0 --- /dev/null +++ b/Assets/04_Models/Characters/ToonCharacterModular/Animations/Expressions/BMAC_Smile.anim @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e6c63879e52944c7786ecc337524464a5da8416ee2c18cc8378b6e2307ce883c +size 11506 diff --git a/Assets/04_Models/Characters/ToonCharacterModular/Animations/Expressions/BMAC_Smile.anim.meta b/Assets/04_Models/Characters/ToonCharacterModular/Animations/Expressions/BMAC_Smile.anim.meta new file mode 100644 index 00000000..8efa57ba --- /dev/null +++ b/Assets/04_Models/Characters/ToonCharacterModular/Animations/Expressions/BMAC_Smile.anim.meta @@ -0,0 +1,15 @@ +fileFormatVersion: 2 +guid: e7510dca54ee3594f97801611253e13f +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 7400000 + userData: + assetBundleName: + assetBundleVariant: +AssetOrigin: + serializedVersion: 1 + productId: 323550 + packageName: 'BoZo: Modular Anime Characters - Base Pack' + packageVersion: 1.8.6 + assetPath: Assets/BoZo_ModularAnimeCharacters/Animations/Expressions/BMAC_Smile.anim + uploadId: 917032 diff --git a/Assets/04_Models/Characters/ToonCharacterModular/Animations/Expressions/BMAC_Surprised.anim b/Assets/04_Models/Characters/ToonCharacterModular/Animations/Expressions/BMAC_Surprised.anim new file mode 100644 index 00000000..6db4fff6 --- /dev/null +++ b/Assets/04_Models/Characters/ToonCharacterModular/Animations/Expressions/BMAC_Surprised.anim @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:adcd59f578068c4ceb5be774dfea9b3ca4861cb8a5af02f7b09dd944c6c44ceb +size 17651 diff --git a/Assets/04_Models/Characters/ToonCharacterModular/Animations/Expressions/BMAC_Surprised.anim.meta b/Assets/04_Models/Characters/ToonCharacterModular/Animations/Expressions/BMAC_Surprised.anim.meta new file mode 100644 index 00000000..2cf9964c --- /dev/null +++ b/Assets/04_Models/Characters/ToonCharacterModular/Animations/Expressions/BMAC_Surprised.anim.meta @@ -0,0 +1,15 @@ +fileFormatVersion: 2 +guid: 046c1bbcad271b241b0b897da4d6f666 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 7400000 + userData: + assetBundleName: + assetBundleVariant: +AssetOrigin: + serializedVersion: 1 + productId: 323550 + packageName: 'BoZo: Modular Anime Characters - Base Pack' + packageVersion: 1.8.6 + assetPath: Assets/BoZo_ModularAnimeCharacters/Animations/Expressions/BMAC_Surprised.anim + uploadId: 917032 diff --git a/Assets/04_Models/Characters/ToonCharacterModular/Animations/Expressions/BMAC_Toon_Cringe.anim b/Assets/04_Models/Characters/ToonCharacterModular/Animations/Expressions/BMAC_Toon_Cringe.anim new file mode 100644 index 00000000..86e180ad --- /dev/null +++ b/Assets/04_Models/Characters/ToonCharacterModular/Animations/Expressions/BMAC_Toon_Cringe.anim @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:06ad47d08046e0f62fda16ceb94c08e1a1b7dd1d83a38b87fa490187807f222e +size 4955 diff --git a/Assets/04_Models/Characters/ToonCharacterModular/Animations/Expressions/BMAC_Toon_Cringe.anim.meta b/Assets/04_Models/Characters/ToonCharacterModular/Animations/Expressions/BMAC_Toon_Cringe.anim.meta new file mode 100644 index 00000000..dd4ba33e --- /dev/null +++ b/Assets/04_Models/Characters/ToonCharacterModular/Animations/Expressions/BMAC_Toon_Cringe.anim.meta @@ -0,0 +1,15 @@ +fileFormatVersion: 2 +guid: 2b380878ca5791649804171801824408 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 7400000 + userData: + assetBundleName: + assetBundleVariant: +AssetOrigin: + serializedVersion: 1 + productId: 323550 + packageName: 'BoZo: Modular Anime Characters - Base Pack' + packageVersion: 1.8.6 + assetPath: Assets/BoZo_ModularAnimeCharacters/Animations/Expressions/BMAC_Toon_Cringe.anim + uploadId: 917032 diff --git a/Assets/04_Models/Characters/ToonCharacterModular/Animations/Expressions/BMAC_Toon_Dizzy.anim b/Assets/04_Models/Characters/ToonCharacterModular/Animations/Expressions/BMAC_Toon_Dizzy.anim new file mode 100644 index 00000000..aded6ac5 --- /dev/null +++ b/Assets/04_Models/Characters/ToonCharacterModular/Animations/Expressions/BMAC_Toon_Dizzy.anim @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:07d28a5f30432385e2198b5692d2e4996f4cb92ace0755099c2ff5200a398f8b +size 4954 diff --git a/Assets/04_Models/Characters/ToonCharacterModular/Animations/Expressions/BMAC_Toon_Dizzy.anim.meta b/Assets/04_Models/Characters/ToonCharacterModular/Animations/Expressions/BMAC_Toon_Dizzy.anim.meta new file mode 100644 index 00000000..b6df1fdf --- /dev/null +++ b/Assets/04_Models/Characters/ToonCharacterModular/Animations/Expressions/BMAC_Toon_Dizzy.anim.meta @@ -0,0 +1,15 @@ +fileFormatVersion: 2 +guid: 0f881f9bc494d8e4eb7c00618ad20917 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 7400000 + userData: + assetBundleName: + assetBundleVariant: +AssetOrigin: + serializedVersion: 1 + productId: 323550 + packageName: 'BoZo: Modular Anime Characters - Base Pack' + packageVersion: 1.8.6 + assetPath: Assets/BoZo_ModularAnimeCharacters/Animations/Expressions/BMAC_Toon_Dizzy.anim + uploadId: 917032 diff --git a/Assets/04_Models/Characters/ToonCharacterModular/Animations/Expressions/BMAC_Toon_Excited.anim b/Assets/04_Models/Characters/ToonCharacterModular/Animations/Expressions/BMAC_Toon_Excited.anim new file mode 100644 index 00000000..9ddfa9da --- /dev/null +++ b/Assets/04_Models/Characters/ToonCharacterModular/Animations/Expressions/BMAC_Toon_Excited.anim @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0d748d4ec58371b8a687f6893faa3edb87dce72efef2826420b57d61643732e8 +size 4956 diff --git a/Assets/04_Models/Characters/ToonCharacterModular/Animations/Expressions/BMAC_Toon_Excited.anim.meta b/Assets/04_Models/Characters/ToonCharacterModular/Animations/Expressions/BMAC_Toon_Excited.anim.meta new file mode 100644 index 00000000..8725f09d --- /dev/null +++ b/Assets/04_Models/Characters/ToonCharacterModular/Animations/Expressions/BMAC_Toon_Excited.anim.meta @@ -0,0 +1,15 @@ +fileFormatVersion: 2 +guid: b78bbc388de67964cb2a3a3efcca82e7 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 7400000 + userData: + assetBundleName: + assetBundleVariant: +AssetOrigin: + serializedVersion: 1 + productId: 323550 + packageName: 'BoZo: Modular Anime Characters - Base Pack' + packageVersion: 1.8.6 + assetPath: Assets/BoZo_ModularAnimeCharacters/Animations/Expressions/BMAC_Toon_Excited.anim + uploadId: 917032 diff --git a/Assets/04_Models/Characters/ToonCharacterModular/Animations/Expressions/BMAC_Toon_Hearts.anim b/Assets/04_Models/Characters/ToonCharacterModular/Animations/Expressions/BMAC_Toon_Hearts.anim new file mode 100644 index 00000000..a9a6f27f --- /dev/null +++ b/Assets/04_Models/Characters/ToonCharacterModular/Animations/Expressions/BMAC_Toon_Hearts.anim @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5bbe947f48a05476cd2b9a3f39fa52a40f319ddd2a9b16507f6678e928454634 +size 11862 diff --git a/Assets/04_Models/Characters/ToonCharacterModular/Animations/Expressions/BMAC_Toon_Hearts.anim.meta b/Assets/04_Models/Characters/ToonCharacterModular/Animations/Expressions/BMAC_Toon_Hearts.anim.meta new file mode 100644 index 00000000..d244b805 --- /dev/null +++ b/Assets/04_Models/Characters/ToonCharacterModular/Animations/Expressions/BMAC_Toon_Hearts.anim.meta @@ -0,0 +1,15 @@ +fileFormatVersion: 2 +guid: 677a321640829114fb3129e86f5fa392 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 7400000 + userData: + assetBundleName: + assetBundleVariant: +AssetOrigin: + serializedVersion: 1 + productId: 323550 + packageName: 'BoZo: Modular Anime Characters - Base Pack' + packageVersion: 1.8.6 + assetPath: Assets/BoZo_ModularAnimeCharacters/Animations/Expressions/BMAC_Toon_Hearts.anim + uploadId: 917032 diff --git a/Assets/04_Models/Characters/ToonCharacterModular/Animations/Expressions/BMAC_Toon_Pissed.anim b/Assets/04_Models/Characters/ToonCharacterModular/Animations/Expressions/BMAC_Toon_Pissed.anim new file mode 100644 index 00000000..b57c85eb --- /dev/null +++ b/Assets/04_Models/Characters/ToonCharacterModular/Animations/Expressions/BMAC_Toon_Pissed.anim @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2ec8e38bd3509b82b33550af55467ed95bdda5b4469c04a9b375d1028d6dc525 +size 4955 diff --git a/Assets/04_Models/Characters/ToonCharacterModular/Animations/Expressions/BMAC_Toon_Pissed.anim.meta b/Assets/04_Models/Characters/ToonCharacterModular/Animations/Expressions/BMAC_Toon_Pissed.anim.meta new file mode 100644 index 00000000..34fef98a --- /dev/null +++ b/Assets/04_Models/Characters/ToonCharacterModular/Animations/Expressions/BMAC_Toon_Pissed.anim.meta @@ -0,0 +1,15 @@ +fileFormatVersion: 2 +guid: b085cbda8aab3fe41b5a698cacbe6dcc +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 7400000 + userData: + assetBundleName: + assetBundleVariant: +AssetOrigin: + serializedVersion: 1 + productId: 323550 + packageName: 'BoZo: Modular Anime Characters - Base Pack' + packageVersion: 1.8.6 + assetPath: Assets/BoZo_ModularAnimeCharacters/Animations/Expressions/BMAC_Toon_Pissed.anim + uploadId: 917032 diff --git a/Assets/04_Models/Characters/ToonCharacterModular/Animations/Expressions/BMAC_Toon_Shocked.anim b/Assets/04_Models/Characters/ToonCharacterModular/Animations/Expressions/BMAC_Toon_Shocked.anim new file mode 100644 index 00000000..38dc053d --- /dev/null +++ b/Assets/04_Models/Characters/ToonCharacterModular/Animations/Expressions/BMAC_Toon_Shocked.anim @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2a068729d238662e95220a970bdb05fc80e82dd419c2912c982a6f1e5be4a627 +size 4956 diff --git a/Assets/04_Models/Characters/ToonCharacterModular/Animations/Expressions/BMAC_Toon_Shocked.anim.meta b/Assets/04_Models/Characters/ToonCharacterModular/Animations/Expressions/BMAC_Toon_Shocked.anim.meta new file mode 100644 index 00000000..e323783a --- /dev/null +++ b/Assets/04_Models/Characters/ToonCharacterModular/Animations/Expressions/BMAC_Toon_Shocked.anim.meta @@ -0,0 +1,15 @@ +fileFormatVersion: 2 +guid: fcb514dd6fdfda741a2736c5f98f57bc +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 7400000 + userData: + assetBundleName: + assetBundleVariant: +AssetOrigin: + serializedVersion: 1 + productId: 323550 + packageName: 'BoZo: Modular Anime Characters - Base Pack' + packageVersion: 1.8.6 + assetPath: Assets/BoZo_ModularAnimeCharacters/Animations/Expressions/BMAC_Toon_Shocked.anim + uploadId: 917032 diff --git a/Assets/04_Models/Characters/ToonCharacterModular/Animations/Expressions/BMAC_Toon_Stars.anim b/Assets/04_Models/Characters/ToonCharacterModular/Animations/Expressions/BMAC_Toon_Stars.anim new file mode 100644 index 00000000..a50c4e3f --- /dev/null +++ b/Assets/04_Models/Characters/ToonCharacterModular/Animations/Expressions/BMAC_Toon_Stars.anim @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bedaef1e20fdea2d2087651194445a025461524ec5a43e243be476bf9e272bf7 +size 18757 diff --git a/Assets/04_Models/Characters/ToonCharacterModular/Animations/Expressions/BMAC_Toon_Stars.anim.meta b/Assets/04_Models/Characters/ToonCharacterModular/Animations/Expressions/BMAC_Toon_Stars.anim.meta new file mode 100644 index 00000000..9fbb80b7 --- /dev/null +++ b/Assets/04_Models/Characters/ToonCharacterModular/Animations/Expressions/BMAC_Toon_Stars.anim.meta @@ -0,0 +1,15 @@ +fileFormatVersion: 2 +guid: 71db63bc9b6664046bf517579edba7fe +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 7400000 + userData: + assetBundleName: + assetBundleVariant: +AssetOrigin: + serializedVersion: 1 + productId: 323550 + packageName: 'BoZo: Modular Anime Characters - Base Pack' + packageVersion: 1.8.6 + assetPath: Assets/BoZo_ModularAnimeCharacters/Animations/Expressions/BMAC_Toon_Stars.anim + uploadId: 917032 diff --git a/Assets/04_Models/Characters/ToonCharacterModular/Animations/Expressions/CharacterCreatorCTRL.controller b/Assets/04_Models/Characters/ToonCharacterModular/Animations/Expressions/CharacterCreatorCTRL.controller new file mode 100644 index 00000000..f8fc336f --- /dev/null +++ b/Assets/04_Models/Characters/ToonCharacterModular/Animations/Expressions/CharacterCreatorCTRL.controller @@ -0,0 +1,715 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1101 &-9163110827642887013 +AnimatorStateTransition: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: + m_Conditions: + - m_ConditionMode: 1 + m_ConditionEvent: Dizzy + m_EventTreshold: 0 + m_DstStateMachine: {fileID: 0} + m_DstState: {fileID: 804506004357838015} + m_Solo: 0 + m_Mute: 0 + m_IsExit: 0 + serializedVersion: 3 + m_TransitionDuration: 0.25 + m_TransitionOffset: 0 + m_ExitTime: 0.77272725 + m_HasExitTime: 0 + m_HasFixedDuration: 1 + m_InterruptionSource: 0 + m_OrderedInterruption: 1 + m_CanTransitionToSelf: 1 +--- !u!1102 &-7836363615124988089 +AnimatorState: + serializedVersion: 6 + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Expression Tree + m_Speed: 1 + m_CycleOffset: 0 + m_Transitions: + - {fileID: -328592594322388879} + m_StateMachineBehaviours: [] + m_Position: {x: 50, y: 50, z: 0} + m_IKOnFeet: 0 + m_WriteDefaultValues: 1 + m_Mirror: 0 + m_SpeedParameterActive: 0 + m_MirrorParameterActive: 0 + m_CycleOffsetParameterActive: 0 + m_TimeParameterActive: 0 + m_Motion: {fileID: 5123552943827446111} + m_Tag: + m_SpeedParameter: + m_MirrorParameter: + m_CycleOffsetParameter: + m_TimeParameter: +--- !u!1102 &-7239738099965710627 +AnimatorState: + serializedVersion: 6 + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Walk Tree + m_Speed: 1 + m_CycleOffset: 0 + m_Transitions: + - {fileID: 206217660855083348} + - {fileID: -9163110827642887013} + m_StateMachineBehaviours: [] + m_Position: {x: 50, y: 50, z: 0} + m_IKOnFeet: 0 + m_WriteDefaultValues: 1 + m_Mirror: 0 + m_SpeedParameterActive: 0 + m_MirrorParameterActive: 0 + m_CycleOffsetParameterActive: 0 + m_TimeParameterActive: 0 + m_Motion: {fileID: 6576091126493181311} + m_Tag: + m_SpeedParameter: + m_MirrorParameter: + m_CycleOffsetParameter: + m_TimeParameter: +--- !u!1101 &-7159515487743301599 +AnimatorStateTransition: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: + m_Conditions: + - m_ConditionMode: 3 + m_ConditionEvent: Expression + m_EventTreshold: 0 + m_DstStateMachine: {fileID: 0} + m_DstState: {fileID: -7836363615124988089} + m_Solo: 0 + m_Mute: 0 + m_IsExit: 0 + serializedVersion: 3 + m_TransitionDuration: 0 + m_TransitionOffset: 15.000014 + m_ExitTime: 1 + m_HasExitTime: 0 + m_HasFixedDuration: 1 + m_InterruptionSource: 0 + m_OrderedInterruption: 1 + m_CanTransitionToSelf: 1 +--- !u!1102 &-5966884987565979827 +AnimatorState: + serializedVersion: 6 + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Heel + m_Speed: 1 + m_CycleOffset: 0 + m_Transitions: [] + m_StateMachineBehaviours: [] + m_Position: {x: 50, y: 50, z: 0} + m_IKOnFeet: 0 + m_WriteDefaultValues: 1 + m_Mirror: 0 + m_SpeedParameterActive: 0 + m_MirrorParameterActive: 0 + m_CycleOffsetParameterActive: 0 + m_TimeParameterActive: 0 + m_Motion: {fileID: 7400000, guid: eb9185d9382a3a64fbfa8a0ff68489a8, type: 2} + m_Tag: + m_SpeedParameter: + m_MirrorParameter: + m_CycleOffsetParameter: + m_TimeParameter: +--- !u!1101 &-5267578986063931339 +AnimatorStateTransition: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: + m_Conditions: + - m_ConditionMode: 2 + m_ConditionEvent: Dizzy + m_EventTreshold: 0 + - m_ConditionMode: 2 + m_ConditionEvent: isWalk + m_EventTreshold: 0 + m_DstStateMachine: {fileID: 0} + m_DstState: {fileID: 207871509940451573} + m_Solo: 0 + m_Mute: 0 + m_IsExit: 0 + serializedVersion: 3 + m_TransitionDuration: 7.6228304 + m_TransitionOffset: 0 + m_ExitTime: 0.85 + m_HasExitTime: 1 + m_HasFixedDuration: 1 + m_InterruptionSource: 0 + m_OrderedInterruption: 1 + m_CanTransitionToSelf: 1 +--- !u!1101 &-2288327784449749003 +AnimatorStateTransition: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: + m_Conditions: + - m_ConditionMode: 1 + m_ConditionEvent: Dizzy + m_EventTreshold: 0 + m_DstStateMachine: {fileID: 0} + m_DstState: {fileID: 804506004357838015} + m_Solo: 0 + m_Mute: 0 + m_IsExit: 0 + serializedVersion: 3 + m_TransitionDuration: 0.25 + m_TransitionOffset: 0 + m_ExitTime: 0.9233717 + m_HasExitTime: 0 + m_HasFixedDuration: 1 + m_InterruptionSource: 0 + m_OrderedInterruption: 1 + m_CanTransitionToSelf: 1 +--- !u!206 &-1907961946174635550 +BlendTree: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Blend Tree + m_Childs: + - serializedVersion: 2 + m_Motion: {fileID: 7400000, guid: 5976004510c4a9f438e903433ff94159, type: 2} + m_Threshold: 0 + m_Position: {x: 0, y: 0} + m_TimeScale: 1 + m_CycleOffset: 0 + m_DirectBlendParameter: Blend + m_Mirror: 0 + - serializedVersion: 2 + m_Motion: {fileID: 7400000, guid: 9276e28abed3cd747855a44e49581e56, type: 2} + m_Threshold: 0.6885664 + m_Position: {x: 0, y: 0} + m_TimeScale: 1 + m_CycleOffset: 0 + m_DirectBlendParameter: Blend + m_Mirror: 0 + m_BlendParameter: Stance + m_BlendParameterY: Blend + m_MinThreshold: 0 + m_MaxThreshold: 0.6885664 + m_UseAutomaticThresholds: 0 + m_NormalizedBlendValues: 0 + m_BlendType: 0 +--- !u!1101 &-328592594322388879 +AnimatorStateTransition: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: + m_Conditions: + - m_ConditionMode: 4 + m_ConditionEvent: Expression + m_EventTreshold: 1 + m_DstStateMachine: {fileID: 0} + m_DstState: {fileID: 6909750651427599640} + m_Solo: 0 + m_Mute: 0 + m_IsExit: 0 + serializedVersion: 3 + m_TransitionDuration: 0 + m_TransitionOffset: 0 + m_ExitTime: 0.00000030466478 + m_HasExitTime: 0 + m_HasFixedDuration: 1 + m_InterruptionSource: 0 + m_OrderedInterruption: 1 + m_CanTransitionToSelf: 1 +--- !u!91 &9100000 +AnimatorController: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: CharacterCreatorCTRL + serializedVersion: 6 + m_AnimatorParameters: + - m_Name: Stance + m_Type: 1 + m_DefaultFloat: 0 + m_DefaultInt: 0 + m_DefaultBool: 0 + m_Controller: {fileID: 9100000} + - m_Name: Dizzy + m_Type: 4 + m_DefaultFloat: 0 + m_DefaultInt: 0 + m_DefaultBool: 0 + m_Controller: {fileID: 9100000} + - m_Name: isWalk + m_Type: 4 + m_DefaultFloat: 0 + m_DefaultInt: 0 + m_DefaultBool: 0 + m_Controller: {fileID: 9100000} + - m_Name: Expression + m_Type: 1 + m_DefaultFloat: 0 + m_DefaultInt: 0 + m_DefaultBool: 0 + m_Controller: {fileID: 9100000} + m_AnimatorLayers: + - serializedVersion: 5 + m_Name: Base Layer + m_StateMachine: {fileID: 7802577738825142542} + m_Mask: {fileID: 0} + m_Motions: [] + m_Behaviours: [] + m_BlendingMode: 0 + m_SyncedLayerIndex: -1 + m_DefaultWeight: 0 + m_IKPass: 0 + m_SyncedLayerAffectsTiming: 0 + m_Controller: {fileID: 9100000} + - serializedVersion: 5 + m_Name: FootOverride + m_StateMachine: {fileID: 4760054131638637629} + m_Mask: {fileID: 0} + m_Motions: [] + m_Behaviours: [] + m_BlendingMode: 1 + m_SyncedLayerIndex: -1 + m_DefaultWeight: 1 + m_IKPass: 0 + m_SyncedLayerAffectsTiming: 0 + m_Controller: {fileID: 9100000} + - serializedVersion: 5 + m_Name: Face Layer + m_StateMachine: {fileID: 6170660395283963564} + m_Mask: {fileID: 0} + m_Motions: [] + m_Behaviours: [] + m_BlendingMode: 0 + m_SyncedLayerIndex: -1 + m_DefaultWeight: 1 + m_IKPass: 0 + m_SyncedLayerAffectsTiming: 0 + m_Controller: {fileID: 9100000} + m_EvaluateTransitionsOnStart: 0 +--- !u!1101 &206217660855083348 +AnimatorStateTransition: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: + m_Conditions: + - m_ConditionMode: 2 + m_ConditionEvent: isWalk + m_EventTreshold: 0 + m_DstStateMachine: {fileID: 0} + m_DstState: {fileID: 207871509940451573} + m_Solo: 0 + m_Mute: 0 + m_IsExit: 0 + serializedVersion: 3 + m_TransitionDuration: 0.25 + m_TransitionOffset: 0 + m_ExitTime: 0.9233717 + m_HasExitTime: 0 + m_HasFixedDuration: 1 + m_InterruptionSource: 0 + m_OrderedInterruption: 1 + m_CanTransitionToSelf: 1 +--- !u!1102 &207871509940451573 +AnimatorState: + serializedVersion: 6 + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Idle Tree + m_Speed: 1 + m_CycleOffset: 0 + m_Transitions: + - {fileID: 304963792279156752} + - {fileID: -2288327784449749003} + m_StateMachineBehaviours: [] + m_Position: {x: 50, y: 50, z: 0} + m_IKOnFeet: 0 + m_WriteDefaultValues: 1 + m_Mirror: 0 + m_SpeedParameterActive: 0 + m_MirrorParameterActive: 0 + m_CycleOffsetParameterActive: 0 + m_TimeParameterActive: 0 + m_Motion: {fileID: -1907961946174635550} + m_Tag: + m_SpeedParameter: + m_MirrorParameter: + m_CycleOffsetParameter: + m_TimeParameter: +--- !u!1101 &304963792279156752 +AnimatorStateTransition: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: + m_Conditions: + - m_ConditionMode: 1 + m_ConditionEvent: isWalk + m_EventTreshold: 0 + m_DstStateMachine: {fileID: 0} + m_DstState: {fileID: -7239738099965710627} + m_Solo: 0 + m_Mute: 0 + m_IsExit: 0 + serializedVersion: 3 + m_TransitionDuration: 0.25 + m_TransitionOffset: 0 + m_ExitTime: 0.9233717 + m_HasExitTime: 0 + m_HasFixedDuration: 1 + m_InterruptionSource: 0 + m_OrderedInterruption: 1 + m_CanTransitionToSelf: 1 +--- !u!1102 &804506004357838015 +AnimatorState: + serializedVersion: 6 + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Dizzy + m_Speed: 1 + m_CycleOffset: 0 + m_Transitions: + - {fileID: -5267578986063931339} + - {fileID: 1373469726084828940} + m_StateMachineBehaviours: [] + m_Position: {x: 50, y: 50, z: 0} + m_IKOnFeet: 0 + m_WriteDefaultValues: 1 + m_Mirror: 0 + m_SpeedParameterActive: 0 + m_MirrorParameterActive: 0 + m_CycleOffsetParameterActive: 0 + m_TimeParameterActive: 0 + m_Motion: {fileID: 7400000, guid: fe12090225f3e48459138b31154c6b91, type: 2} + m_Tag: + m_SpeedParameter: + m_MirrorParameter: + m_CycleOffsetParameter: + m_TimeParameter: +--- !u!1101 &1373469726084828940 +AnimatorStateTransition: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: + m_Conditions: + - m_ConditionMode: 2 + m_ConditionEvent: Dizzy + m_EventTreshold: 0 + - m_ConditionMode: 1 + m_ConditionEvent: isWalk + m_EventTreshold: 0 + m_DstStateMachine: {fileID: 0} + m_DstState: {fileID: -7239738099965710627} + m_Solo: 0 + m_Mute: 0 + m_IsExit: 0 + serializedVersion: 3 + m_TransitionDuration: 7.686271 + m_TransitionOffset: 0 + m_ExitTime: 0.17455946 + m_HasExitTime: 1 + m_HasFixedDuration: 1 + m_InterruptionSource: 0 + m_OrderedInterruption: 1 + m_CanTransitionToSelf: 1 +--- !u!1107 &4760054131638637629 +AnimatorStateMachine: + serializedVersion: 7 + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: FootOverride + m_ChildStates: + - serializedVersion: 1 + m_State: {fileID: -5966884987565979827} + m_Position: {x: 10, y: 240, z: 0} + m_ChildStateMachines: [] + m_AnyStateTransitions: [] + m_EntryTransitions: [] + m_StateMachineTransitions: {} + m_StateMachineBehaviours: [] + m_AnyStatePosition: {x: 50, y: 20, z: 0} + m_EntryPosition: {x: 50, y: 120, z: 0} + m_ExitPosition: {x: 800, y: 120, z: 0} + m_ParentStateMachinePosition: {x: 800, y: 20, z: 0} + m_DefaultState: {fileID: -5966884987565979827} +--- !u!206 &5123552943827446111 +BlendTree: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Blend Tree + m_Childs: + - serializedVersion: 2 + m_Motion: {fileID: 7400000, guid: 8ba3e0d0f4caf2b4e988f2fa31db0e00, type: 2} + m_Threshold: 0 + m_Position: {x: 0, y: 0} + m_TimeScale: 1 + m_CycleOffset: 0 + m_DirectBlendParameter: Blend + m_Mirror: 0 + - serializedVersion: 2 + m_Motion: {fileID: 7400000, guid: e7510dca54ee3594f97801611253e13f, type: 2} + m_Threshold: 1 + m_Position: {x: 0, y: 0} + m_TimeScale: 1 + m_CycleOffset: 0 + m_DirectBlendParameter: Blend + m_Mirror: 0 + - serializedVersion: 2 + m_Motion: {fileID: 7400000, guid: 274311329317ccf449acea8dce3be8fe, type: 2} + m_Threshold: 2 + m_Position: {x: 0, y: 0} + m_TimeScale: 1 + m_CycleOffset: 0 + m_DirectBlendParameter: Blend + m_Mirror: 0 + - serializedVersion: 2 + m_Motion: {fileID: 7400000, guid: 0103d1054b85b5c4da54dc2c38bb10e3, type: 2} + m_Threshold: 3 + m_Position: {x: 0, y: 0} + m_TimeScale: 1 + m_CycleOffset: 0 + m_DirectBlendParameter: Blend + m_Mirror: 0 + - serializedVersion: 2 + m_Motion: {fileID: 7400000, guid: 046c1bbcad271b241b0b897da4d6f666, type: 2} + m_Threshold: 4 + m_Position: {x: 0, y: 0} + m_TimeScale: 1 + m_CycleOffset: 0 + m_DirectBlendParameter: Blend + m_Mirror: 0 + - serializedVersion: 2 + m_Motion: {fileID: 7400000, guid: 7017b6d3ec28cbd46ac136cd14ebb4e8, type: 2} + m_Threshold: 5 + m_Position: {x: 0, y: 0} + m_TimeScale: 1 + m_CycleOffset: 0 + m_DirectBlendParameter: Blend + m_Mirror: 0 + - serializedVersion: 2 + m_Motion: {fileID: 7400000, guid: 89aee812b742109468ed4dd78afac366, type: 2} + m_Threshold: 6 + m_Position: {x: 0, y: 0} + m_TimeScale: 1 + m_CycleOffset: 0 + m_DirectBlendParameter: Blend + m_Mirror: 0 + - serializedVersion: 2 + m_Motion: {fileID: 7400000, guid: 65183e65b4e13e849ae9185454d22a6b, type: 2} + m_Threshold: 7 + m_Position: {x: 0, y: 0} + m_TimeScale: 1 + m_CycleOffset: 0 + m_DirectBlendParameter: Expression + m_Mirror: 0 + - serializedVersion: 2 + m_Motion: {fileID: 7400000, guid: b78bbc388de67964cb2a3a3efcca82e7, type: 2} + m_Threshold: 8 + m_Position: {x: 0, y: 0} + m_TimeScale: 1 + m_CycleOffset: 0 + m_DirectBlendParameter: Expression + m_Mirror: 0 + - serializedVersion: 2 + m_Motion: {fileID: 7400000, guid: 0f881f9bc494d8e4eb7c00618ad20917, type: 2} + m_Threshold: 9 + m_Position: {x: 0, y: 0} + m_TimeScale: 1 + m_CycleOffset: 0 + m_DirectBlendParameter: Expression + m_Mirror: 0 + - serializedVersion: 2 + m_Motion: {fileID: 7400000, guid: 71db63bc9b6664046bf517579edba7fe, type: 2} + m_Threshold: 10 + m_Position: {x: 0, y: 0} + m_TimeScale: 1 + m_CycleOffset: 0 + m_DirectBlendParameter: Expression + m_Mirror: 0 + - serializedVersion: 2 + m_Motion: {fileID: 7400000, guid: b085cbda8aab3fe41b5a698cacbe6dcc, type: 2} + m_Threshold: 11 + m_Position: {x: 0, y: 0} + m_TimeScale: 1 + m_CycleOffset: 0 + m_DirectBlendParameter: Expression + m_Mirror: 0 + - serializedVersion: 2 + m_Motion: {fileID: 7400000, guid: 677a321640829114fb3129e86f5fa392, type: 2} + m_Threshold: 12 + m_Position: {x: 0, y: 0} + m_TimeScale: 1 + m_CycleOffset: 0 + m_DirectBlendParameter: Expression + m_Mirror: 0 + - serializedVersion: 2 + m_Motion: {fileID: 7400000, guid: 2b380878ca5791649804171801824408, type: 2} + m_Threshold: 13 + m_Position: {x: 0, y: 0} + m_TimeScale: 1 + m_CycleOffset: 0 + m_DirectBlendParameter: Expression + m_Mirror: 0 + - serializedVersion: 2 + m_Motion: {fileID: 7400000, guid: fcb514dd6fdfda741a2736c5f98f57bc, type: 2} + m_Threshold: 14 + m_Position: {x: 0, y: 0} + m_TimeScale: 1 + m_CycleOffset: 0 + m_DirectBlendParameter: Expression + m_Mirror: 0 + m_BlendParameter: Expression + m_BlendParameterY: Blend + m_MinThreshold: 0 + m_MaxThreshold: 14 + m_UseAutomaticThresholds: 0 + m_NormalizedBlendValues: 0 + m_BlendType: 0 +--- !u!1107 &6170660395283963564 +AnimatorStateMachine: + serializedVersion: 7 + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Face Layer + m_ChildStates: + - serializedVersion: 1 + m_State: {fileID: -7836363615124988089} + m_Position: {x: 30, y: 260, z: 0} + - serializedVersion: 1 + m_State: {fileID: 6909750651427599640} + m_Position: {x: 30, y: 190, z: 0} + m_ChildStateMachines: [] + m_AnyStateTransitions: [] + m_EntryTransitions: [] + m_StateMachineTransitions: {} + m_StateMachineBehaviours: [] + m_AnyStatePosition: {x: 50, y: 20, z: 0} + m_EntryPosition: {x: 50, y: 120, z: 0} + m_ExitPosition: {x: 800, y: 120, z: 0} + m_ParentStateMachinePosition: {x: 800, y: 20, z: 0} + m_DefaultState: {fileID: 6909750651427599640} +--- !u!206 &6576091126493181311 +BlendTree: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Blend Tree + m_Childs: + - serializedVersion: 2 + m_Motion: {fileID: 7400000, guid: 6c5795dd9fceb2a469a271d930faff17, type: 2} + m_Threshold: 0 + m_Position: {x: 0, y: 0} + m_TimeScale: 1 + m_CycleOffset: 0 + m_DirectBlendParameter: Blend + m_Mirror: 0 + - serializedVersion: 2 + m_Motion: {fileID: 7400000, guid: ad7109d4a8b03714897bcc9c6efa6b62, type: 2} + m_Threshold: 0.6885664 + m_Position: {x: 0, y: 0} + m_TimeScale: 1 + m_CycleOffset: 0 + m_DirectBlendParameter: Blend + m_Mirror: 0 + m_BlendParameter: Stance + m_BlendParameterY: Blend + m_MinThreshold: 0 + m_MaxThreshold: 0.6885664 + m_UseAutomaticThresholds: 0 + m_NormalizedBlendValues: 0 + m_BlendType: 0 +--- !u!1102 &6909750651427599640 +AnimatorState: + serializedVersion: 6 + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: New State + m_Speed: 1 + m_CycleOffset: 0 + m_Transitions: + - {fileID: -7159515487743301599} + m_StateMachineBehaviours: [] + m_Position: {x: 50, y: 50, z: 0} + m_IKOnFeet: 0 + m_WriteDefaultValues: 1 + m_Mirror: 0 + m_SpeedParameterActive: 0 + m_MirrorParameterActive: 0 + m_CycleOffsetParameterActive: 0 + m_TimeParameterActive: 0 + m_Motion: {fileID: 7400000, guid: 5820dd3123db00b49a21828fb1be49a0, type: 2} + m_Tag: + m_SpeedParameter: + m_MirrorParameter: + m_CycleOffsetParameter: + m_TimeParameter: +--- !u!1107 &7802577738825142542 +AnimatorStateMachine: + serializedVersion: 7 + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Base Layer + m_ChildStates: + - serializedVersion: 1 + m_State: {fileID: 207871509940451573} + m_Position: {x: 30, y: 230, z: 0} + - serializedVersion: 1 + m_State: {fileID: 804506004357838015} + m_Position: {x: -240, y: 280, z: 0} + - serializedVersion: 1 + m_State: {fileID: -7239738099965710627} + m_Position: {x: 30, y: 340, z: 0} + m_ChildStateMachines: [] + m_AnyStateTransitions: [] + m_EntryTransitions: [] + m_StateMachineTransitions: {} + m_StateMachineBehaviours: [] + m_AnyStatePosition: {x: 50, y: 50, z: 0} + m_EntryPosition: {x: 50, y: 120, z: 0} + m_ExitPosition: {x: 800, y: 120, z: 0} + m_ParentStateMachinePosition: {x: 800, y: 20, z: 0} + m_DefaultState: {fileID: 207871509940451573} diff --git a/Assets/04_Models/Characters/ToonCharacterModular/Animations/Expressions/CharacterCreatorCTRL.controller.meta b/Assets/04_Models/Characters/ToonCharacterModular/Animations/Expressions/CharacterCreatorCTRL.controller.meta new file mode 100644 index 00000000..b4204d9d --- /dev/null +++ b/Assets/04_Models/Characters/ToonCharacterModular/Animations/Expressions/CharacterCreatorCTRL.controller.meta @@ -0,0 +1,15 @@ +fileFormatVersion: 2 +guid: 5f5ca31cc9a800247bab6034d012afdf +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 9100000 + userData: + assetBundleName: + assetBundleVariant: +AssetOrigin: + serializedVersion: 1 + productId: 323550 + packageName: 'BoZo: Modular Anime Characters - Base Pack' + packageVersion: 1.8.6 + assetPath: Assets/BoZo_ModularAnimeCharacters/Animations/Expressions/CharacterCreatorCTRL.controller + uploadId: 917032 diff --git a/Assets/04_Models/Characters/ToonCharacterModular/Materials.meta b/Assets/04_Models/Characters/ToonCharacterModular/Materials.meta new file mode 100644 index 00000000..0710babf --- /dev/null +++ b/Assets/04_Models/Characters/ToonCharacterModular/Materials.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: f75e2f20683ce41499160f432da7a487 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/04_Models/Characters/ToonCharacterModular/Materials/BMAC_BackingBody.mat b/Assets/04_Models/Characters/ToonCharacterModular/Materials/BMAC_BackingBody.mat new file mode 100644 index 00000000..6e24051f --- /dev/null +++ b/Assets/04_Models/Characters/ToonCharacterModular/Materials/BMAC_BackingBody.mat @@ -0,0 +1,255 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &-132778396449792088 +MonoBehaviour: + m_ObjectHideFlags: 11 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 639247ca83abc874e893eb93af2b5e44, type: 3} + m_Name: + m_EditorClassIdentifier: + version: 0 +--- !u!21 &2100000 +Material: + serializedVersion: 8 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: BMAC_BackingBody + m_Shader: {fileID: 4800000, guid: 4dede25c09a79bb49b62a737c00a3d9e, type: 3} + m_Parent: {fileID: 0} + m_ModifiedSerializedProperties: 0 + m_ValidKeywords: + - _RIMLIGHTOVERLAY + - _USECUSTOMTEXTURE + - _USEOUTLINE + m_InvalidKeywords: [] + m_LightmapFlags: 4 + m_EnableInstancingVariants: 1 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: [] + m_LockedProperties: + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _BaseMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BumpMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DecalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailAlbedoMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _IDMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _LogoMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MaskMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MetallicGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _NormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OcclusionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _PatternMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Texture2D: + m_Texture: {fileID: 2800000, guid: 2ae20bc5538c97e469e6061a49430e59, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - unity_Lightmaps: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - unity_LightmapsInd: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - unity_ShadowMasks: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Ints: [] + m_Floats: + - Brightness: 2 + - _AddPrecomputedVelocity: 0 + - _AlphaClip: 0 + - _AlphaToMask: 0 + - _AmbiantStrength: 1 + - _BUILTIN_QueueControl: -1 + - _BUILTIN_QueueOffset: 0 + - _Blend: 0 + - _BlendModePreserveSpecular: 1 + - _Brightness: 1 + - _BumpScale: 1 + - _CastShadows: 1 + - _ClearCoatMask: 0 + - _ClearCoatSmoothness: 0 + - _Compa: 8 + - _Cull: 2 + - _Culling: 2 + - _Cutoff: 0.5 + - _DecalBlend: 0 + - _DecalUVSet: 1 + - _DetailAlbedoMapScale: 1 + - _DetailNormalMapScale: 1 + - _DstBlend: 0 + - _DstBlendAlpha: 0 + - _EnvironmentReflections: 1 + - _Fresnel: 10 + - _GlossMapScale: 0 + - _Glossiness: 0 + - _GlossyReflections: 0 + - _LightHeightDirectionStrength: 1 + - _MaskEdgeHigh_1: 0.01 + - _MaskEdgeHigh_2: 0.01 + - _MaskEdgeHigh_3: 0.01 + - _MaskEdgeHigh_4: 0.01 + - _MaskEdgeHigh_5: 0.01 + - _MaskEdgeHigh_6: 0.01 + - _MaskEdgeLow_1: 0.01 + - _MaskEdgeLow_2: 0.01 + - _MaskEdgeLow_3: 0.01 + - _MaskEdgeLow_4: 0.01 + - _MaskEdgeLow_5: 0.01 + - _MaskEdgeLow_6: 0.01 + - _Metallic: 0 + - _MultipleLightSharpness: 0 + - _MultipleStrength: 1 + - _OcclusionStrength: 1 + - _OutlineColor: 0 + - _OutlineDistance: 2 + - _OutlineThickness: 2 + - _Parallax: 0.005 + - _PatternBlend: 1 + - _PatternUVSet: 0 + - _QueueControl: 0 + - _QueueOffset: 0 + - _ReceiveShadows: 1 + - _RecieveShadows: 0 + - _RefVal: 221 + - _RimlightPower: 0.5 + - _RimlightSharpness: 0.5 + - _ShadowEdge: 0.042 + - _ShadowSharpness: 0.12 + - _Shininess: 10 + - _Smoothness: 0.5 + - _SmoothnessTextureChannel: 0 + - _SpecularHighlights: 1 + - _SrcBlend: 1 + - _SrcBlendAlpha: 1 + - _StencilPass: 2 + - _StencilReadMask: 255 + - _StencilWriteMask: 221 + - _Surface: 0 + - _UseAmbiant: 1 + - _UseCustomTexture: 1 + - _UseMaskMap: 0 + - _UseMultipleLights: 1 + - _UseNormalMap: 0 + - _UseOutline: 1 + - _UseRimlight: 0 + - _UseRimlightOverlay: 1 + - _WorkflowMode: 1 + - _ZTest: 4 + - _ZWrite: 1 + - _ZWriteControl: 0 + m_Colors: + - _BaseColor: {r: 1, g: 1, b: 1, a: 1} + - _Color: {r: 1, g: 1, b: 1, a: 1} + - _Color_1: {r: 0.12941177, g: 0.33333334, b: 0.63529414, a: 1} + - _Color_2: {r: 0.113462955, g: 0.29225317, b: 0.557, a: 1} + - _Color_3: {r: 0.12941177, g: 0.33333334, b: 0.63529414, a: 1} + - _Color_4: {r: 0.12941177, g: 0.33333334, b: 0.63529414, a: 1} + - _Color_5: {r: 0.12941177, g: 0.33333334, b: 0.63529414, a: 1} + - _Color_6: {r: 0.12941177, g: 0.33333334, b: 0.63529414, a: 1} + - _Color_7: {r: 0.12941177, g: 0.33333334, b: 0.63529414, a: 1} + - _Color_8: {r: 0.12941177, g: 0.33333334, b: 0.63529414, a: 1} + - _Color_9: {r: 0.12941177, g: 0.33333334, b: 0.63529414, a: 1} + - _DecalColor_1: {r: 1, g: 1, b: 1, a: 1} + - _DecalColor_2: {r: 0.557, g: 0.557, b: 0.557, a: 1} + - _DecalColor_3: {r: 0, g: 0, b: 0, a: 1} + - _DecalScale: {r: 1, g: 1, b: 0, a: 0} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} + - _FresnelColor: {r: 0, g: 0, b: 0, a: 0} + - _LogoColor_1: {r: 0, g: 0, b: 0, a: 0} + - _LogoColor_2: {r: 0, g: 0, b: 0, a: 0} + - _LogoColor_3: {r: 0, g: 0, b: 0, a: 0} + - _LogoScale: {r: 0, g: 0, b: 0, a: 0} + - _OutlineColor: {r: 0, g: 0, b: 0, a: 1} + - _PatternColor_1: {r: 1, g: 1, b: 1, a: 1} + - _PatternColor_2: {r: 0.5568628, g: 0.5568628, b: 0.5568628, a: 1} + - _PatternColor_3: {r: 0, g: 0, b: 0, a: 1} + - _PatternScale: {r: 50, g: 50, b: 0, a: 0} + - _RimlightColor: {r: 0, g: 0, b: 0, a: 0} + - _ShadowColor: {r: 1, g: 1, b: 1, a: 0} + - _ShadowEdgeColor: {r: 1, g: 1, b: 1, a: 0} + - _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1} + m_BuildTextureStacks: [] +--- !u!114 &9195620309957543724 +MonoBehaviour: + m_ObjectHideFlags: 11 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} + m_Name: + m_EditorClassIdentifier: + version: 9 diff --git a/Assets/04_Models/Characters/ToonCharacterModular/Materials/BMAC_BackingBody.mat.meta b/Assets/04_Models/Characters/ToonCharacterModular/Materials/BMAC_BackingBody.mat.meta new file mode 100644 index 00000000..c32c6f65 --- /dev/null +++ b/Assets/04_Models/Characters/ToonCharacterModular/Materials/BMAC_BackingBody.mat.meta @@ -0,0 +1,15 @@ +fileFormatVersion: 2 +guid: d70e4d19db20cf54ba54842ec106ed82 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: +AssetOrigin: + serializedVersion: 1 + productId: 323550 + packageName: 'BoZo: Modular Anime Characters - Base Pack' + packageVersion: 1.8.6 + assetPath: Assets/BoZo_ModularAnimeCharacters/Materials/BMAC_BackingBody.mat + uploadId: 917032 diff --git a/Assets/04_Models/Characters/ToonCharacterModular/Materials/BMAC_Body.mat b/Assets/04_Models/Characters/ToonCharacterModular/Materials/BMAC_Body.mat new file mode 100644 index 00000000..22c0c90d --- /dev/null +++ b/Assets/04_Models/Characters/ToonCharacterModular/Materials/BMAC_Body.mat @@ -0,0 +1,137 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 8 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: BMAC_Body + m_Shader: {fileID: 4800000, guid: 4dede25c09a79bb49b62a737c00a3d9e, type: 3} + m_Parent: {fileID: 2100000, guid: c2051efd070775d4da809bf05e6691f7, type: 2} + m_ModifiedSerializedProperties: 0 + m_ValidKeywords: + - _USECUSTOMTEXTURE + - _USEMASKMAP + - _USENORMALMAP + - _USEOUTLINE + m_InvalidKeywords: + - _ALPHATEST_ON + - _NORMALMAP + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: 2000 + stringTagMap: + RenderType: TransparentCutout + disabledShaderPasses: [] + m_LockedProperties: + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _AccessoriesMap: + m_Texture: {fileID: 2800000, guid: 06a19e763b951604f80b737fac8b3c99, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DecalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DiffuseMap: + m_Texture: {fileID: 2800000, guid: b2b43ceea8504cd4b88839f86cce9a50, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _LogoMap: + m_Texture: {fileID: 2800000, guid: 7c3578a73b2d2264eaaf35a97e87bb56, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MaskMap: + m_Texture: {fileID: 2800000, guid: 9a9045e74dac92449a096af04b4d6ca3, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _NormalMap: + m_Texture: {fileID: 2800000, guid: 172ad87310cc70f49bcd8edbb349ace9, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _PatternMap: + m_Texture: {fileID: 2800000, guid: 5321c99aa28bfa14491deeafc6d0582f, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Texture2D: + m_Texture: {fileID: 2800000, guid: b2b43ceea8504cd4b88839f86cce9a50, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _UnderwearMap: + m_Texture: {fileID: 2800000, guid: 7c3578a73b2d2264eaaf35a97e87bb56, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Ints: [] + m_Floats: + - _AlphaClip: 1 + - _AlphaToMask: 1 + - _BUILTIN_QueueControl: 0 + - _Fresnel: 5 + - _MaskEdgeHigh_1: 0.01 + - _MaskEdgeHigh_1_1: 1 + - _MaskEdgeHigh_2: 0.01 + - _MaskEdgeHigh_3: 0.01 + - _MaskEdgeHigh_4: 0.01 + - _MaskEdgeHigh_5: 0.01 + - _MaskEdgeHigh_6: 0.01 + - _MaskEdgeLow: 0.01 + - _MaskEdgeLow_1: 0.01 + - _MaskEdgeLow_2: 0.01 + - _MaskEdgeLow_3: 0.01 + - _MaskEdgeLow_5: 0.01 + - _MaskEdgeLow_6: 0.01 + - _PatternBlend: 0 + - _UseAccessories: 0 + - _UseCustomTexture: 1 + - _UseMaskMap: 1 + - _UseMultipleLights: 1 + - _UseNormalMap: 1 + - _UseUnderwear: 1 + m_Colors: + - _Color_1: {r: 0.96199995, g: 0.79117894, b: 0.68975395, a: 0} + - _Color_2: {r: 0.94509804, g: 0.63529414, b: 0.52156866, a: 0} + - _Color_3: {r: 0.5019608, g: 0.13333334, b: 0, a: 0} + - _Color_4: {r: 0.90588236, g: 0.7137255, b: 0.5921569, a: 1} + - _Color_5: {r: 0.9056604, g: 0.7139391, b: 0.59411323, a: 1} + - _Color_6: {r: 0, g: 0, b: 0, a: 0} + - _Color_7: {r: 0, g: 0, b: 0, a: 0} + - _Color_8: {r: 0, g: 0, b: 0, a: 0} + - _DecalColor_1: {r: 0.37106913, g: 0.37106913, b: 0.37106913, a: 1} + - _DecalColor_2: {r: 0.5660378, g: 0.058739707, b: 0.058739707, a: 1} + - _DecalColor_3: {r: 0.31446534, g: 0.31446534, b: 0.31446534, a: 1} + - _LogoScale: {r: 1, g: 1, b: 0, a: 0} + - _PatternColor_1: {r: 0.8509804, g: 0.8509804, b: 0.8509804, a: 1} + - _PatternColor_3: {r: 0.45882353, g: 0.8, b: 0.8235294, a: 1} + - _PatternScale: {r: 1, g: 1, b: 1, a: 1} + m_BuildTextureStacks: [] +--- !u!114 &2502687884708474557 +MonoBehaviour: + m_ObjectHideFlags: 11 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} + m_Name: + m_EditorClassIdentifier: + version: 9 +--- !u!114 &5039412716290294697 +MonoBehaviour: + m_ObjectHideFlags: 11 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 639247ca83abc874e893eb93af2b5e44, type: 3} + m_Name: + m_EditorClassIdentifier: + version: 0 diff --git a/Assets/04_Models/Characters/ToonCharacterModular/Materials/BMAC_Body.mat.meta b/Assets/04_Models/Characters/ToonCharacterModular/Materials/BMAC_Body.mat.meta new file mode 100644 index 00000000..69351a84 --- /dev/null +++ b/Assets/04_Models/Characters/ToonCharacterModular/Materials/BMAC_Body.mat.meta @@ -0,0 +1,15 @@ +fileFormatVersion: 2 +guid: efb6b028e91671245b496280ea728465 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: +AssetOrigin: + serializedVersion: 1 + productId: 323550 + packageName: 'BoZo: Modular Anime Characters - Base Pack' + packageVersion: 1.8.6 + assetPath: Assets/BoZo_ModularAnimeCharacters/Materials/BMAC_Body.mat + uploadId: 917032 diff --git a/Assets/04_Models/Characters/ToonCharacterModular/Materials/BMAC_Master_Mat.mat b/Assets/04_Models/Characters/ToonCharacterModular/Materials/BMAC_Master_Mat.mat new file mode 100644 index 00000000..3d33abf7 --- /dev/null +++ b/Assets/04_Models/Characters/ToonCharacterModular/Materials/BMAC_Master_Mat.mat @@ -0,0 +1,255 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &-132778396449792088 +MonoBehaviour: + m_ObjectHideFlags: 11 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 639247ca83abc874e893eb93af2b5e44, type: 3} + m_Name: + m_EditorClassIdentifier: + version: 0 +--- !u!21 &2100000 +Material: + serializedVersion: 8 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: BMAC_Master_Mat + m_Shader: {fileID: 4800000, guid: 4dede25c09a79bb49b62a737c00a3d9e, type: 3} + m_Parent: {fileID: 0} + m_ModifiedSerializedProperties: 0 + m_ValidKeywords: + - _USECUSTOMTEXTURE + - _USEOUTLINE + m_InvalidKeywords: [] + m_LightmapFlags: 4 + m_EnableInstancingVariants: 1 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: 2450 + stringTagMap: {} + disabledShaderPasses: [] + m_LockedProperties: + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _BaseMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BumpMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DecalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailAlbedoMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _IDMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _LogoMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MaskMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MetallicGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _NormalMap: + m_Texture: {fileID: 2800000, guid: 6ee1fd6cf67aa3e40884fbe77faf41ad, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OcclusionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _PatternMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Texture2D: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - unity_Lightmaps: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - unity_LightmapsInd: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - unity_ShadowMasks: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Ints: [] + m_Floats: + - Brightness: 2 + - _AddPrecomputedVelocity: 0 + - _AlphaClip: 0 + - _AlphaToMask: 0 + - _AmbiantStrength: 1 + - _BUILTIN_QueueControl: -1 + - _BUILTIN_QueueOffset: 0 + - _Blend: 0 + - _BlendModePreserveSpecular: 1 + - _Brightness: 1 + - _BumpScale: 1 + - _CastShadows: 1 + - _ClearCoatMask: 0 + - _ClearCoatSmoothness: 0 + - _Compa: 8 + - _Cull: 2 + - _Culling: 2 + - _Cutoff: 0.5 + - _DecalBlend: 0 + - _DecalUVSet: 1 + - _DetailAlbedoMapScale: 1 + - _DetailNormalMapScale: 1 + - _DstBlend: 0 + - _DstBlendAlpha: 0 + - _EnvironmentReflections: 1 + - _Fresnel: 10 + - _FresnelPower: 3.4 + - _GlossMapScale: 0 + - _Glossiness: 0 + - _GlossyReflections: 0 + - _LightHeightDirectionStrength: 0.1 + - _MaskEdgeHigh_1: 0.01 + - _MaskEdgeHigh_2: 0.01 + - _MaskEdgeHigh_3: 0.01 + - _MaskEdgeHigh_4: 0.01 + - _MaskEdgeHigh_5: 0.01 + - _MaskEdgeHigh_6: 0.01 + - _MaskEdgeLow_1: 0.01 + - _MaskEdgeLow_2: 0.01 + - _MaskEdgeLow_3: 0.01 + - _MaskEdgeLow_4: 0.01 + - _MaskEdgeLow_5: 0.01 + - _MaskEdgeLow_6: 0.01 + - _Metallic: 0 + - _MultipleLightSharpness: 0 + - _MultipleStrength: 1 + - _OcclusionStrength: 1 + - _OutlineColor: 0 + - _OutlineDistance: 2 + - _OutlineThickness: 2 + - _Parallax: 0.005 + - _PatternBlend: 1 + - _PatternUVSet: 0 + - _QueueControl: 0 + - _QueueOffset: 0 + - _ReceiveShadows: 1 + - _RecieveShadows: 0 + - _RefVal: 221 + - _RimlightPower: 5.98 + - _RimlightSharpness: 0.041 + - _ShadowEdge: 0.042 + - _ShadowSharpness: 0.12 + - _Shininess: 10 + - _Smoothness: 0.5 + - _SmoothnessTextureChannel: 0 + - _SpecularHighlights: 1 + - _SrcBlend: 1 + - _SrcBlendAlpha: 1 + - _StencilPass: 2 + - _StencilReadMask: 255 + - _StencilWriteMask: 221 + - _Surface: 0 + - _UseAmbiant: 1 + - _UseCustomTexture: 1 + - _UseMaskMap: 0 + - _UseMultipleLights: 1 + - _UseNormalMap: 0 + - _UseOutline: 1 + - _UseRimlight: 0 + - _UseRimlightOverlay: 0 + - _WorkflowMode: 1 + - _ZTest: 4 + - _ZWrite: 1 + - _ZWriteControl: 0 + m_Colors: + - _BaseColor: {r: 1, g: 1, b: 1, a: 1} + - _Color: {r: 1, g: 1, b: 1, a: 1} + - _Color_1: {r: 1, g: 0, b: 0, a: 0} + - _Color_2: {r: 0, g: 1, b: 0, a: 0} + - _Color_3: {r: 0, g: 0, b: 1, a: 0} + - _Color_4: {r: 0.9727612, g: 1, b: 0, a: 0} + - _Color_5: {r: 0, g: 0.9845986, b: 1, a: 0} + - _Color_6: {r: 1, g: 0, b: 0.988061, a: 0} + - _Color_7: {r: 1, g: 1, b: 1, a: 0} + - _Color_8: {r: 0.50314456, g: 0.50314456, b: 0.50314456, a: 0} + - _Color_9: {r: 0, g: 0, b: 0, a: 0} + - _DecalColor_1: {r: 1, g: 1, b: 1, a: 1} + - _DecalColor_2: {r: 0.557, g: 0.557, b: 0.557, a: 1} + - _DecalColor_3: {r: 0, g: 0, b: 0, a: 1} + - _DecalScale: {r: 1, g: 1, b: 0, a: 0} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} + - _FresnelColor: {r: 0, g: 0, b: 0, a: 0} + - _LogoColor_1: {r: 0, g: 0, b: 0, a: 0} + - _LogoColor_2: {r: 0, g: 0, b: 0, a: 0} + - _LogoColor_3: {r: 0, g: 0, b: 0, a: 0} + - _LogoScale: {r: 0, g: 0, b: 0, a: 0} + - _OutlineColor: {r: 0, g: 0, b: 0, a: 1} + - _PatternColor_1: {r: 1, g: 1, b: 1, a: 1} + - _PatternColor_2: {r: 0.5568628, g: 0.5568628, b: 0.5568628, a: 1} + - _PatternColor_3: {r: 0, g: 0, b: 0, a: 1} + - _PatternScale: {r: 50, g: 50, b: 0, a: 0} + - _RimlightColor: {r: 1, g: 1, b: 1, a: 0} + - _ShadowColor: {r: 0.75, g: 0.56624997, b: 0.56624997, a: 0} + - _ShadowEdgeColor: {r: 1, g: 0.77873063, b: 0.5943395, a: 0} + - _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1} + m_BuildTextureStacks: [] +--- !u!114 &9195620309957543724 +MonoBehaviour: + m_ObjectHideFlags: 11 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} + m_Name: + m_EditorClassIdentifier: + version: 9 diff --git a/Assets/04_Models/Characters/ToonCharacterModular/Materials/BMAC_Master_Mat.mat.meta b/Assets/04_Models/Characters/ToonCharacterModular/Materials/BMAC_Master_Mat.mat.meta new file mode 100644 index 00000000..e8a88ee6 --- /dev/null +++ b/Assets/04_Models/Characters/ToonCharacterModular/Materials/BMAC_Master_Mat.mat.meta @@ -0,0 +1,15 @@ +fileFormatVersion: 2 +guid: c2051efd070775d4da809bf05e6691f7 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: +AssetOrigin: + serializedVersion: 1 + productId: 323550 + packageName: 'BoZo: Modular Anime Characters - Base Pack' + packageVersion: 1.8.6 + assetPath: Assets/BoZo_ModularAnimeCharacters/Materials/BMAC_Master_Mat.mat + uploadId: 917032 diff --git a/Assets/04_Models/Characters/ToonCharacterModular/Models.meta b/Assets/04_Models/Characters/ToonCharacterModular/Models.meta new file mode 100644 index 00000000..b097e5df --- /dev/null +++ b/Assets/04_Models/Characters/ToonCharacterModular/Models.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 5526c56224d87cd449c7c4e54162026c +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/04_Models/Characters/ToonCharacterModular/Models/Common.meta b/Assets/04_Models/Characters/ToonCharacterModular/Models/Common.meta new file mode 100644 index 00000000..c341b541 --- /dev/null +++ b/Assets/04_Models/Characters/ToonCharacterModular/Models/Common.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 9fc4d30249db24f4ca2c00e76f917a92 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/04_Models/Characters/ToonCharacterModular/Models/Common/Body.meta b/Assets/04_Models/Characters/ToonCharacterModular/Models/Common/Body.meta new file mode 100644 index 00000000..36a4a5ae --- /dev/null +++ b/Assets/04_Models/Characters/ToonCharacterModular/Models/Common/Body.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: cab7c43bf94d34e48b34919b0c543608 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/04_Models/Characters/ToonCharacterModular/Models/Common/Body/BodyRig.fbx b/Assets/04_Models/Characters/ToonCharacterModular/Models/Common/Body/BodyRig.fbx new file mode 100644 index 00000000..2769f735 --- /dev/null +++ b/Assets/04_Models/Characters/ToonCharacterModular/Models/Common/Body/BodyRig.fbx @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b95128e708f2bcc332771580a0f97062780843d8d31c65d6f93686e02c0c44eb +size 1837648 diff --git a/Assets/04_Models/Characters/ToonCharacterModular/Models/Common/Body/BodyRig.fbx.meta b/Assets/04_Models/Characters/ToonCharacterModular/Models/Common/Body/BodyRig.fbx.meta new file mode 100644 index 00000000..949f7e02 --- /dev/null +++ b/Assets/04_Models/Characters/ToonCharacterModular/Models/Common/Body/BodyRig.fbx.meta @@ -0,0 +1,1062 @@ +fileFormatVersion: 2 +guid: acd85b7182daf304a9e550450d13c02f +ModelImporter: + serializedVersion: 22200 + internalIDToNameTable: [] + externalObjects: + - first: + type: UnityEngine:Material + assembly: UnityEngine.CoreModule + name: BMAC_PlaceHolder_Mat + second: {fileID: 2100000, guid: d70e4d19db20cf54ba54842ec106ed82, type: 2} + - first: + type: UnityEngine:Material + assembly: UnityEngine.CoreModule + name: lambert2 + second: {fileID: 2100000, guid: 4b0f2bf21d9e77c499a8138dcbe72014, type: 2} + - first: + type: UnityEngine:Material + assembly: UnityEngine.CoreModule + name: lambert3 + second: {fileID: 2100000, guid: efb6b028e91671245b496280ea728465, type: 2} + materials: + materialImportMode: 2 + materialName: 0 + materialSearch: 1 + materialLocation: 1 + animations: + legacyGenerateAnimations: 4 + bakeSimulation: 0 + resampleCurves: 1 + optimizeGameObjects: 0 + removeConstantScaleCurves: 0 + motionNodeName: + rigImportErrors: + rigImportWarnings: + animationImportErrors: + animationImportWarnings: + animationRetargetingWarnings: + animationDoRetargetingWarnings: 0 + importAnimatedCustomProperties: 0 + importConstraints: 0 + animationCompression: 3 + animationRotationError: 0.5 + animationPositionError: 0.5 + animationScaleError: 0.5 + animationWrapMode: 0 + extraExposedTransformPaths: [] + extraUserProperties: [] + clipAnimations: [] + isReadable: 1 + meshes: + lODScreenPercentages: [] + globalScale: 1 + meshCompression: 0 + addColliders: 0 + useSRGBMaterialColor: 1 + sortHierarchyByName: 1 + importPhysicalCameras: 1 + importVisibility: 1 + importBlendShapes: 1 + importCameras: 1 + importLights: 1 + nodeNameCollisionStrategy: 1 + fileIdsGeneration: 2 + swapUVChannels: 0 + generateSecondaryUV: 0 + useFileUnits: 1 + keepQuads: 0 + weldVertices: 1 + bakeAxisConversion: 0 + preserveHierarchy: 0 + skinWeightsMode: 0 + maxBonesPerVertex: 4 + minBoneWeight: 0.001 + optimizeBones: 0 + meshOptimizationFlags: -1 + indexFormat: 0 + secondaryUVAngleDistortion: 8 + secondaryUVAreaDistortion: 15.000001 + secondaryUVHardAngle: 88 + secondaryUVMarginMethod: 1 + secondaryUVMinLightmapResolution: 40 + secondaryUVMinObjectScale: 1 + secondaryUVPackMargin: 4 + useFileScale: 1 + strictVertexDataChecks: 0 + tangentSpace: + normalSmoothAngle: 60 + normalImportMode: 0 + tangentImportMode: 3 + normalCalculationMode: 4 + legacyComputeAllNormalsFromSmoothingGroupsWhenMeshHasBlendShapes: 0 + blendShapeNormalImportMode: 0 + normalSmoothingSource: 0 + referencedClips: [] + importAnimation: 0 + humanDescription: + serializedVersion: 3 + human: + - boneName: pelvis + humanName: Hips + limit: + min: {x: 0, y: 0, z: 0} + max: {x: 0, y: 0, z: 0} + value: {x: 0, y: 0, z: 0} + length: 0 + modified: 0 + - boneName: thigh_l + humanName: LeftUpperLeg + limit: + min: {x: 0, y: 0, z: 0} + max: {x: 0, y: 0, z: 0} + value: {x: 0, y: 0, z: 0} + length: 0 + modified: 0 + - boneName: thigh_r + humanName: RightUpperLeg + limit: + min: {x: 0, y: 0, z: 0} + max: {x: 0, y: 0, z: 0} + value: {x: 0, y: 0, z: 0} + length: 0 + modified: 0 + - boneName: calf_l + humanName: LeftLowerLeg + limit: + min: {x: 0, y: 0, z: 0} + max: {x: 0, y: 0, z: 0} + value: {x: 0, y: 0, z: 0} + length: 0 + modified: 0 + - boneName: calf_r + humanName: RightLowerLeg + limit: + min: {x: 0, y: 0, z: 0} + max: {x: 0, y: 0, z: 0} + value: {x: 0, y: 0, z: 0} + length: 0 + modified: 0 + - boneName: foot_l + humanName: LeftFoot + limit: + min: {x: 0, y: 0, z: 0} + max: {x: 0, y: 0, z: 0} + value: {x: 0, y: 0, z: 0} + length: 0 + modified: 0 + - boneName: foot_r + humanName: RightFoot + limit: + min: {x: 0, y: 0, z: 0} + max: {x: 0, y: 0, z: 0} + value: {x: 0, y: 0, z: 0} + length: 0 + modified: 0 + - boneName: spine_02 + humanName: Spine + limit: + min: {x: 0, y: 0, z: 0} + max: {x: 0, y: 0, z: 0} + value: {x: 0, y: 0, z: 0} + length: 0 + modified: 0 + - boneName: spine_03 + humanName: Chest + limit: + min: {x: 0, y: 0, z: 0} + max: {x: 0, y: 0, z: 0} + value: {x: 0, y: 0, z: 0} + length: 0 + modified: 0 + - boneName: neck_01 + humanName: Neck + limit: + min: {x: 0, y: 0, z: 0} + max: {x: 0, y: 0, z: 0} + value: {x: 0, y: 0, z: 0} + length: 0 + modified: 0 + - boneName: head + humanName: Head + limit: + min: {x: 0, y: 0, z: 0} + max: {x: 0, y: 0, z: 0} + value: {x: 0, y: 0, z: 0} + length: 0 + modified: 0 + - boneName: clavicle_l + humanName: LeftShoulder + limit: + min: {x: 0, y: 0, z: 0} + max: {x: 0, y: 0, z: 0} + value: {x: 0, y: 0, z: 0} + length: 0 + modified: 0 + - boneName: clavicle_r + humanName: RightShoulder + limit: + min: {x: 0, y: 0, z: 0} + max: {x: 0, y: 0, z: 0} + value: {x: 0, y: 0, z: 0} + length: 0 + modified: 0 + - boneName: upperarm_l + humanName: LeftUpperArm + limit: + min: {x: 0, y: 0, z: 0} + max: {x: 0, y: 0, z: 0} + value: {x: 0, y: 0, z: 0} + length: 0 + modified: 0 + - boneName: upperarm_r + humanName: RightUpperArm + limit: + min: {x: 0, y: 0, z: 0} + max: {x: 0, y: 0, z: 0} + value: {x: 0, y: 0, z: 0} + length: 0 + modified: 0 + - boneName: lowerarm_l + humanName: LeftLowerArm + limit: + min: {x: 0, y: 0, z: 0} + max: {x: 0, y: 0, z: 0} + value: {x: 0, y: 0, z: 0} + length: 0 + modified: 0 + - boneName: lowerarm_r + humanName: RightLowerArm + limit: + min: {x: 0, y: 0, z: 0} + max: {x: 0, y: 0, z: 0} + value: {x: 0, y: 0, z: 0} + length: 0 + modified: 0 + - boneName: hand_l + humanName: LeftHand + limit: + min: {x: 0, y: 0, z: 0} + max: {x: 0, y: 0, z: 0} + value: {x: 0, y: 0, z: 0} + length: 0 + modified: 0 + - boneName: hand_r + humanName: RightHand + limit: + min: {x: 0, y: 0, z: 0} + max: {x: 0, y: 0, z: 0} + value: {x: 0, y: 0, z: 0} + length: 0 + modified: 0 + - boneName: ball_l + humanName: LeftToes + limit: + min: {x: 0, y: 0, z: 0} + max: {x: 0, y: 0, z: 0} + value: {x: 0, y: 0, z: 0} + length: 0 + modified: 0 + - boneName: ball_r + humanName: RightToes + limit: + min: {x: 0, y: 0, z: 0} + max: {x: 0, y: 0, z: 0} + value: {x: 0, y: 0, z: 0} + length: 0 + modified: 0 + - boneName: thumb_01_l + humanName: Left Thumb Proximal + limit: + min: {x: 0, y: 0, z: 0} + max: {x: 0, y: 0, z: 0} + value: {x: 0, y: 0, z: 0} + length: 0 + modified: 0 + - boneName: thumb_02_l + humanName: Left Thumb Intermediate + limit: + min: {x: 0, y: 0, z: 0} + max: {x: 0, y: 0, z: 0} + value: {x: 0, y: 0, z: 0} + length: 0 + modified: 0 + - boneName: thumb_03_l + humanName: Left Thumb Distal + limit: + min: {x: 0, y: 0, z: 0} + max: {x: 0, y: 0, z: 0} + value: {x: 0, y: 0, z: 0} + length: 0 + modified: 0 + - boneName: index_01_l + humanName: Left Index Proximal + limit: + min: {x: 0, y: 0, z: 0} + max: {x: 0, y: 0, z: 0} + value: {x: 0, y: 0, z: 0} + length: 0 + modified: 0 + - boneName: index_02_l + humanName: Left Index Intermediate + limit: + min: {x: 0, y: 0, z: 0} + max: {x: 0, y: 0, z: 0} + value: {x: 0, y: 0, z: 0} + length: 0 + modified: 0 + - boneName: index_03_l + humanName: Left Index Distal + limit: + min: {x: 0, y: 0, z: 0} + max: {x: 0, y: 0, z: 0} + value: {x: 0, y: 0, z: 0} + length: 0 + modified: 0 + - boneName: middle_01_l + humanName: Left Middle Proximal + limit: + min: {x: 0, y: 0, z: 0} + max: {x: 0, y: 0, z: 0} + value: {x: 0, y: 0, z: 0} + length: 0 + modified: 0 + - boneName: middle_02_l + humanName: Left Middle Intermediate + limit: + min: {x: 0, y: 0, z: 0} + max: {x: 0, y: 0, z: 0} + value: {x: 0, y: 0, z: 0} + length: 0 + modified: 0 + - boneName: middle_03_l + humanName: Left Middle Distal + limit: + min: {x: 0, y: 0, z: 0} + max: {x: 0, y: 0, z: 0} + value: {x: 0, y: 0, z: 0} + length: 0 + modified: 0 + - boneName: ring_01_l + humanName: Left Ring Proximal + limit: + min: {x: 0, y: 0, z: 0} + max: {x: 0, y: 0, z: 0} + value: {x: 0, y: 0, z: 0} + length: 0 + modified: 0 + - boneName: ring_02_l + humanName: Left Ring Intermediate + limit: + min: {x: 0, y: 0, z: 0} + max: {x: 0, y: 0, z: 0} + value: {x: 0, y: 0, z: 0} + length: 0 + modified: 0 + - boneName: ring_03_l + humanName: Left Ring Distal + limit: + min: {x: 0, y: 0, z: 0} + max: {x: 0, y: 0, z: 0} + value: {x: 0, y: 0, z: 0} + length: 0 + modified: 0 + - boneName: pinky_01_l + humanName: Left Little Proximal + limit: + min: {x: 0, y: 0, z: 0} + max: {x: 0, y: 0, z: 0} + value: {x: 0, y: 0, z: 0} + length: 0 + modified: 0 + - boneName: pinky_02_l + humanName: Left Little Intermediate + limit: + min: {x: 0, y: 0, z: 0} + max: {x: 0, y: 0, z: 0} + value: {x: 0, y: 0, z: 0} + length: 0 + modified: 0 + - boneName: pinky_03_l + humanName: Left Little Distal + limit: + min: {x: 0, y: 0, z: 0} + max: {x: 0, y: 0, z: 0} + value: {x: 0, y: 0, z: 0} + length: 0 + modified: 0 + - boneName: thumb_01_r + humanName: Right Thumb Proximal + limit: + min: {x: 0, y: 0, z: 0} + max: {x: 0, y: 0, z: 0} + value: {x: 0, y: 0, z: 0} + length: 0 + modified: 0 + - boneName: thumb_02_r + humanName: Right Thumb Intermediate + limit: + min: {x: 0, y: 0, z: 0} + max: {x: 0, y: 0, z: 0} + value: {x: 0, y: 0, z: 0} + length: 0 + modified: 0 + - boneName: thumb_03_r + humanName: Right Thumb Distal + limit: + min: {x: 0, y: 0, z: 0} + max: {x: 0, y: 0, z: 0} + value: {x: 0, y: 0, z: 0} + length: 0 + modified: 0 + - boneName: index_01_r + humanName: Right Index Proximal + limit: + min: {x: 0, y: 0, z: 0} + max: {x: 0, y: 0, z: 0} + value: {x: 0, y: 0, z: 0} + length: 0 + modified: 0 + - boneName: index_02_r + humanName: Right Index Intermediate + limit: + min: {x: 0, y: 0, z: 0} + max: {x: 0, y: 0, z: 0} + value: {x: 0, y: 0, z: 0} + length: 0 + modified: 0 + - boneName: index_03_r + humanName: Right Index Distal + limit: + min: {x: 0, y: 0, z: 0} + max: {x: 0, y: 0, z: 0} + value: {x: 0, y: 0, z: 0} + length: 0 + modified: 0 + - boneName: middle_01_r + humanName: Right Middle Proximal + limit: + min: {x: 0, y: 0, z: 0} + max: {x: 0, y: 0, z: 0} + value: {x: 0, y: 0, z: 0} + length: 0 + modified: 0 + - boneName: middle_02_r + humanName: Right Middle Intermediate + limit: + min: {x: 0, y: 0, z: 0} + max: {x: 0, y: 0, z: 0} + value: {x: 0, y: 0, z: 0} + length: 0 + modified: 0 + - boneName: middle_03_r + humanName: Right Middle Distal + limit: + min: {x: 0, y: 0, z: 0} + max: {x: 0, y: 0, z: 0} + value: {x: 0, y: 0, z: 0} + length: 0 + modified: 0 + - boneName: ring_01_r + humanName: Right Ring Proximal + limit: + min: {x: 0, y: 0, z: 0} + max: {x: 0, y: 0, z: 0} + value: {x: 0, y: 0, z: 0} + length: 0 + modified: 0 + - boneName: ring_02_r + humanName: Right Ring Intermediate + limit: + min: {x: 0, y: 0, z: 0} + max: {x: 0, y: 0, z: 0} + value: {x: 0, y: 0, z: 0} + length: 0 + modified: 0 + - boneName: ring_03_r + humanName: Right Ring Distal + limit: + min: {x: 0, y: 0, z: 0} + max: {x: 0, y: 0, z: 0} + value: {x: 0, y: 0, z: 0} + length: 0 + modified: 0 + - boneName: pinky_01_r + humanName: Right Little Proximal + limit: + min: {x: 0, y: 0, z: 0} + max: {x: 0, y: 0, z: 0} + value: {x: 0, y: 0, z: 0} + length: 0 + modified: 0 + - boneName: pinky_02_r + humanName: Right Little Intermediate + limit: + min: {x: 0, y: 0, z: 0} + max: {x: 0, y: 0, z: 0} + value: {x: 0, y: 0, z: 0} + length: 0 + modified: 0 + - boneName: pinky_03_r + humanName: Right Little Distal + limit: + min: {x: 0, y: 0, z: 0} + max: {x: 0, y: 0, z: 0} + value: {x: 0, y: 0, z: 0} + length: 0 + modified: 0 + - boneName: spine_04 + humanName: UpperChest + limit: + min: {x: 0, y: 0, z: 0} + max: {x: 0, y: 0, z: 0} + value: {x: 0, y: 0, z: 0} + length: 0 + modified: 0 + skeleton: + - name: BodyRig(Clone) + parentName: + position: {x: 0, y: 0, z: 0} + rotation: {x: 0, y: 0, z: 0, w: 1} + scale: {x: 1, y: 1, z: 1} + - name: armature + parentName: BodyRig(Clone) + position: {x: -0, y: 0, z: 0} + rotation: {x: 0, y: -0, z: -0, w: 1} + scale: {x: 1, y: 1, z: 1} + - name: root + parentName: armature + position: {x: -0, y: 0, z: 0} + rotation: {x: 0, y: -0, z: -0, w: 1} + scale: {x: 1, y: 1, z: 1} + - name: center_of_mass + parentName: root + position: {x: 1.7763568e-17, y: 3.5527136e-17, z: -1.8735012e-18} + rotation: {x: -0.7071068, y: 0, z: -0, w: 0.7071068} + scale: {x: 1, y: 1, z: 1} + - name: ik_foot_root + parentName: root + position: {x: -0, y: 0, z: 0} + rotation: {x: -0.7071068, y: 0, z: -0, w: 0.7071068} + scale: {x: 1, y: 1, z: 1} + - name: ik_foot_l + parentName: ik_foot_root + position: {x: -0.11724399, y: 0.00517535, z: 0.10954} + rotation: {x: 0.01663142, y: 0.6935279, z: 0.015875151, w: 0.72006285} + scale: {x: 1, y: 1, z: 1} + - name: ik_foot_r + parentName: ik_foot_root + position: {x: 0.1172439, y: 0.0051753507, z: 0.10954} + rotation: {x: 0.72006285, y: -0.015875151, z: 0.6935279, w: -0.01663142} + scale: {x: 1, y: 1, z: 1} + - name: ik_hand_gun + parentName: root + position: {x: 0.42266512, y: 1.0591742, z: 0.060633216} + rotation: {x: 0.088823125, y: -0.23499748, z: -0.4282621, w: 0.8680312} + scale: {x: 1, y: 1, z: 1} + - name: ik_hand_l + parentName: ik_hand_gun + position: {x: -0.44188076, y: -0.59320736, z: 0.40918136} + rotation: {x: 0.51264596, y: 0.7496153, z: -0.41380602, w: 0.06352732} + scale: {x: 1, y: 1, z: 1} + - name: ik_hand_r + parentName: ik_hand_gun + position: {x: -0, y: -2.842171e-16, z: -7.105427e-17} + rotation: {x: -1.9428903e-16, y: 5.2735594e-16, z: -2.0816682e-16, w: 1} + scale: {x: 1, y: 1, z: 1} + - name: ik_hand_root + parentName: root + position: {x: -0, y: 0, z: 0} + rotation: {x: -0.7071068, y: 0, z: -0, w: 0.7071068} + scale: {x: 1, y: 1, z: 1} + - name: interaction + parentName: root + position: {x: 1.7763568e-17, y: 3.5527136e-17, z: -1.8735012e-18} + rotation: {x: -0.7071068, y: 0, z: -0, w: 0.7071068} + scale: {x: 1, y: 1, z: 1} + - name: pelvis + parentName: root + position: {x: -1.6435803e-23, y: 0.9869322, z: 0.023794625} + rotation: {x: 0.51546985, y: -0.484036, z: 0.51546985, w: -0.484036} + scale: {x: 1, y: 1, z: 1} + - name: spine_01 + parentName: pelvis + position: {x: -0.02471853, y: 7.4246387e-13, z: -3.7053824e-18} + rotation: {x: 0.0000008525571, y: 0.00000012929291, z: 0.1499387, w: 0.9886953} + scale: {x: 1, y: 1, z: 1} + - name: spine_02 + parentName: spine_01 + position: {x: -0.064416714, y: 0.0017404179, z: -0.0000000030015432} + rotation: {x: -0.0000013149402, y: -0.0000000242463, z: -0.05952428, w: 0.9982269} + scale: {x: 1, y: 1, z: 1} + - name: spine_03 + parentName: spine_02 + position: {x: -0.061613474, y: -6.5895943e-12, z: 2.0313506e-17} + rotation: {x: 0.0000017093078, y: -0.000000072526994, z: -0.089947775, w: 0.99594647} + scale: {x: 1, y: 1, z: 1} + - name: spine_04 + parentName: spine_03 + position: {x: -0.08851115, y: -4.1083154e-11, z: 1.5608696e-16} + rotation: {x: 0.0000017543409, y: -0.00000031651527, z: -0.073922075, w: 0.997264} + scale: {x: 1, y: 1, z: 1} + - name: breast_l + parentName: spine_04 + position: {x: -0.0707, y: -0.06324, z: -0.058701523} + rotation: {x: 0.5494519, y: -0.4450879, z: 0.54944855, w: 0.44509062} + scale: {x: 1, y: 1, z: 1} + - name: breast_r + parentName: spine_04 + position: {x: -0.07069836, y: -0.06323644, z: 0.058702283} + rotation: {x: -0.44509125, y: -0.5494546, z: -0.44508728, w: 0.5494459} + scale: {x: 1, y: 1, z: 1} + - name: spine_05 + parentName: spine_04 + position: {x: -0.17498758, y: 2.151264e-11, z: -5.0906e-18} + rotation: {x: -0.000001943752, y: 0.0000000043844444, z: -0.0022556547, w: 0.9999975} + scale: {x: 1, y: 1, z: 1} + - name: clavicle_l + parentName: spine_05 + position: {x: -0.05830481, y: 0.01004903, z: -0.009313623} + rotation: {x: 0.08991553, y: -0.75046307, z: 0.059577, w: 0.6520514} + scale: {x: 1, y: 1, z: 1} + - name: upperarm_l + parentName: clavicle_l + position: {x: -0.12042659, y: 0.00337745, z: -0.0078001604} + rotation: {x: 0.01189276, y: 0.049645625, z: 0.021332039, w: 0.9984683} + scale: {x: 1, y: 1, z: 1} + - name: lowerarm_l + parentName: upperarm_l + position: {x: -0.2628306, y: -0.0000028196093, z: -0.0000015065455} + rotation: {x: 0.017112233, y: 0.037802316, z: 0.030018374, w: 0.9986877} + scale: {x: 1, y: 1, z: 1} + - name: hand_l + parentName: lowerarm_l + position: {x: -0.22426975, y: -0.00000023307989, z: 0.0000000787232} + rotation: {x: -0.61020106, y: -0.06955917, z: -0.03873072, w: 0.7882361} + scale: {x: 1, y: 1, z: 1} + - name: index_metacarpal_l + parentName: hand_l + position: {x: -0.034522086, y: 0.0011242229, z: -0.020516565} + rotation: {x: 0.028094413, y: -0.014797555, z: 0.076732025, w: 0.99654603} + scale: {x: 1, y: 1, z: 1} + - name: index_01_l + parentName: index_metacarpal_l + position: {x: -0.07113928, y: 0.0060603456, z: 0.001430095} + rotation: {x: -0.028675308, y: 0.030364342, z: -0.105316006, w: 0.9935615} + scale: {x: 1, y: 1, z: 1} + - name: index_02_l + parentName: index_01_l + position: {x: -0.02752322, y: -0.00092728826, z: 0.00007970657} + rotation: {x: 0.00017432508, y: -0.0022266177, z: -0.025526466, w: 0.99967164} + scale: {x: 1, y: 1, z: 1} + - name: index_03_l + parentName: index_02_l + position: {x: -0.02878466, y: -0.0000016466528, z: -0.000006182652} + rotation: {x: 0.00000001053671, y: -0.0005250708, z: 0.00010779864, w: 0.9999999} + scale: {x: 1, y: 1, z: 1} + - name: middle_metacarpal_l + parentName: hand_l + position: {x: -0.031159949, y: -0.00068169314, z: -0.0036431223} + rotation: {x: 0.00041333734, y: 0.017595928, z: 0.062430188, w: 0.99789417} + scale: {x: 1, y: 1, z: 1} + - name: middle_01_l + parentName: middle_metacarpal_l + position: {x: -0.07175154, y: 0.0074047474, z: 0.00419731} + rotation: {x: -0.01959478, y: 0.026709203, z: -0.09728815, w: 0.99470484} + scale: {x: 1, y: 1, z: 1} + - name: middle_02_l + parentName: middle_01_l + position: {x: -0.030946212, y: -0.00025767414, z: 0.00015369119} + rotation: {x: -0.00057570107, y: -0.004191745, z: -0.0070507317, w: 0.9999662} + scale: {x: 1, y: 1, z: 1} + - name: middle_03_l + parentName: middle_02_l + position: {x: -0.031564437, y: 0.00012725168, z: 0.000009820017} + rotation: {x: -0.00004750373, y: 0.001909414, z: -0.024870956, w: 0.99968886} + scale: {x: 1, y: 1, z: 1} + - name: pinky_metacarpal_l + parentName: hand_l + position: {x: -0.029829215, y: 0.002419275, z: 0.019277232} + rotation: {x: -0.12421863, y: 0.20142625, z: 0.023156708, w: 0.9713192} + scale: {x: 1, y: 1, z: 1} + - name: pinky_01_l + parentName: pinky_metacarpal_l + position: {x: -0.065842345, y: 0.00387696, z: -0.0003698518} + rotation: {x: 0.0031274464, y: -0.14854182, z: -0.09704015, w: 0.9841285} + scale: {x: 1, y: 1, z: 1} + - name: pinky_02_l + parentName: pinky_01_l + position: {x: -0.030473938, y: 0.0000449431, z: 0.0000050213966} + rotation: {x: -0.0002950211, y: 0.0018232873, z: -0.014608922, w: 0.99989164} + scale: {x: 1, y: 1, z: 1} + - name: pinky_03_l + parentName: pinky_02_l + position: {x: -0.018163703, y: 0.000014216933, z: 0.00000081721095} + rotation: {x: -0.000025351257, y: 0.0007322023, z: -0.028393088, w: 0.9995966} + scale: {x: 1, y: 1, z: 1} + - name: ring_metacarpal_l + parentName: hand_l + position: {x: -0.031082293, y: 0.0006009566, z: 0.008015621} + rotation: {x: -0.086076766, y: 0.1376541, z: 0.069432914, w: 0.9842872} + scale: {x: 1, y: 1, z: 1} + - name: ring_01_l + parentName: ring_metacarpal_l + position: {x: -0.071285464, y: 0.006903508, z: -0.00030325403} + rotation: {x: -0.011143287, y: -0.09609206, z: -0.15003562, w: 0.9839368} + scale: {x: 1, y: 1, z: 1} + - name: ring_02_l + parentName: ring_01_l + position: {x: -0.028632186, y: -0.00080945133, z: 0.00010370551} + rotation: {x: -0.0013136859, y: -0.0036819545, z: -0.029154323, w: 0.9995673} + scale: {x: 1, y: 1, z: 1} + - name: ring_03_l + parentName: ring_02_l + position: {x: -0.024630046, y: -0.00062541856, z: -0.000049983075} + rotation: {x: -0.00013455836, y: 0.003215625, z: -0.04037306, w: 0.99917954} + scale: {x: 1, y: 1, z: 1} + - name: thumb_01_l + parentName: hand_l + position: {x: -0.042124398, y: 0.013390588, z: -0.03553364} + rotation: {x: 0.58268064, y: -0.24051, z: 0.3438952, w: 0.6959701} + scale: {x: 1, y: 1, z: 1} + - name: thumb_02_l + parentName: thumb_01_l + position: {x: -0.04041515, y: -0.002166181, z: -0.00022503364} + rotation: {x: 0.041548, y: 0.022611462, z: -0.025356485, w: 0.99855876} + scale: {x: 1, y: 1, z: 1} + - name: thumb_03_l + parentName: thumb_02_l + position: {x: -0.02150001, y: -0.001488054, z: 0.000019765686} + rotation: {x: -0.0000015238087, y: -0.0017221253, z: 0.0091861915, w: 0.9999563} + scale: {x: 1, y: 1, z: 1} + - name: lowerarm_twist_01_l + parentName: lowerarm_l + position: {x: -0.1370334, y: -0.0000438542, z: -0.000121863864} + rotation: {x: 0.0012477214, y: 0.0016746745, z: -0.00058554957, w: 0.9999977} + scale: {x: 1, y: 1, z: 1} + - name: lowerarm_twist_02_l + parentName: lowerarm_l + position: {x: -0.059287686, y: -0.000033335233, z: -0.000090587935} + rotation: {x: 0.0012477214, y: 0.0016747412, z: -0.0005855495, w: 0.9999977} + scale: {x: 1, y: 1, z: 1} + - name: shoulder_twist_l + parentName: upperarm_l + position: {x: -0, y: -4.440892e-18, z: 0} + rotation: {x: -4.5686627e-12, y: 3.4786368e-11, z: -7.2655085e-12, w: 1} + scale: {x: 1, y: 1, z: 1} + - name: upperarm_twist_01_l + parentName: upperarm_l + position: {x: -0.09029968, y: -0.0000010437427, z: 0.0000018067597} + rotation: {x: 0.00000038242098, y: 0.0020894543, z: -0.0001139628, w: 0.99999785} + scale: {x: 1, y: 1, z: 1} + - name: upperarm_twist_02_l + parentName: upperarm_l + position: {x: -0.15903978, y: -0.0000019053927, z: 0.000004715007} + rotation: {x: 0.0000003939614, y: 0.0000011916852, z: 0.000005457776, w: 1} + scale: {x: 1, y: 1, z: 1} + - name: clavicle_r + parentName: spine_05 + position: {x: -0.05830481, y: 0.010049071, z: 0.009313577} + rotation: {x: 0.75046265, y: 0.08991133, z: 0.65205204, w: -0.059581842} + scale: {x: 1, y: 1, z: 1} + - name: upperarm_r + parentName: clavicle_r + position: {x: 0.1204265, y: -0.0033794376, z: 0.0078006224} + rotation: {x: 0.011803837, y: 0.063154295, z: 0.02118701, w: 0.9977091} + scale: {x: 1, y: 1, z: 1} + - name: lowerarm_r + parentName: upperarm_r + position: {x: 0.2628306, y: 0.0000028196207, z: 0.0000015065447} + rotation: {x: 0.021372266, y: 0.03648891, z: 0.018042624, w: 0.9989426} + scale: {x: 1, y: 1, z: 1} + - name: hand_r + parentName: lowerarm_r + position: {x: 0.22426975, y: 0.00000023307989, z: -0.0000000787232} + rotation: {x: -0.61020106, y: -0.06955917, z: -0.03873072, w: 0.7882361} + scale: {x: 1, y: 1, z: 1} + - name: index_metacarpal_r + parentName: hand_r + position: {x: 0.034522086, y: -0.0011242229, z: 0.020516565} + rotation: {x: 0.028094413, y: -0.014797555, z: 0.076732025, w: 0.99654603} + scale: {x: 1, y: 1, z: 1} + - name: index_01_r + parentName: index_metacarpal_r + position: {x: 0.07113928, y: -0.0060603456, z: -0.001430095} + rotation: {x: -0.028144656, y: 0.024274575, z: -0.103234455, w: 0.9939624} + scale: {x: 1, y: 1, z: 1} + - name: index_02_r + parentName: index_01_r + position: {x: 0.027523164, y: 0.00092784583, z: -0.00007988173} + rotation: {x: 0.00017432508, y: -0.0022266177, z: -0.025526466, w: 0.99967164} + scale: {x: 1, y: 1, z: 1} + - name: index_03_r + parentName: index_02_r + position: {x: 0.028784158, y: 0.0000011014419, z: 0.00000623518} + rotation: {x: 0.00000001053671, y: -0.0005250708, z: 0.00010779864, w: 0.9999999} + scale: {x: 1, y: 1, z: 1} + - name: middle_metacarpal_r + parentName: hand_r + position: {x: 0.031159949, y: 0.00068169314, z: 0.0036431223} + rotation: {x: 0.00041333734, y: 0.017595928, z: 0.062430188, w: 0.99789417} + scale: {x: 1, y: 1, z: 1} + - name: middle_01_r + parentName: middle_metacarpal_r + position: {x: 0.07175154, y: -0.0074047474, z: -0.00419731} + rotation: {x: -0.01959478, y: 0.026709203, z: -0.09728815, w: 0.99470484} + scale: {x: 1, y: 1, z: 1} + - name: middle_02_r + parentName: middle_01_r + position: {x: 0.030946212, y: 0.00025767414, z: -0.00015369119} + rotation: {x: -0.00057570107, y: -0.004191745, z: -0.0070507317, w: 0.9999662} + scale: {x: 1, y: 1, z: 1} + - name: middle_03_r + parentName: middle_02_r + position: {x: 0.031564243, y: -0.00012680379, z: -0.0000096261265} + rotation: {x: -0.00004750373, y: 0.001909414, z: -0.024870956, w: 0.99968886} + scale: {x: 1, y: 1, z: 1} + - name: pinky_metacarpal_r + parentName: hand_r + position: {x: 0.029829215, y: -0.002419275, z: -0.019277232} + rotation: {x: -0.12421863, y: 0.20142625, z: 0.023156708, w: 0.9713192} + scale: {x: 1, y: 1, z: 1} + - name: pinky_01_r + parentName: pinky_metacarpal_r + position: {x: 0.065842345, y: -0.00387696, z: 0.0003698518} + rotation: {x: 0.0000659972, y: -0.1321131, z: -0.09825993, w: 0.98635244} + scale: {x: 1, y: 1, z: 1} + - name: pinky_02_r + parentName: pinky_01_r + position: {x: 0.030473523, y: -0.000044794444, z: -0.000005009973} + rotation: {x: -0.0002950211, y: 0.0018232873, z: -0.014608922, w: 0.99989164} + scale: {x: 1, y: 1, z: 1} + - name: pinky_03_r + parentName: pinky_02_r + position: {x: 0.018164502, y: -0.000014280713, z: -0.0000008640132} + rotation: {x: -0.000025351257, y: 0.0007322023, z: -0.028393088, w: 0.9995966} + scale: {x: 1, y: 1, z: 1} + - name: ring_metacarpal_r + parentName: hand_r + position: {x: 0.031082293, y: -0.0006009566, z: -0.008015621} + rotation: {x: -0.086076766, y: 0.1376541, z: 0.069432914, w: 0.9842872} + scale: {x: 1, y: 1, z: 1} + - name: ring_01_r + parentName: ring_metacarpal_r + position: {x: 0.071285464, y: -0.006903508, z: 0.00030325403} + rotation: {x: -0.012907437, y: -0.08576664, z: -0.15125951, w: 0.9846817} + scale: {x: 1, y: 1, z: 1} + - name: ring_02_r + parentName: ring_01_r + position: {x: 0.028632184, y: 0.00080979656, z: -0.00010371774} + rotation: {x: -0.0013136859, y: -0.0036819545, z: -0.029154323, w: 0.9995673} + scale: {x: 1, y: 1, z: 1} + - name: ring_03_r + parentName: ring_02_r + position: {x: 0.024629807, y: 0.00062524603, z: 0.00005006087} + rotation: {x: -0.00013455836, y: 0.003215625, z: -0.04037306, w: 0.99917954} + scale: {x: 1, y: 1, z: 1} + - name: thumb_01_r + parentName: hand_r + position: {x: 0.042124398, y: -0.013390588, z: 0.03553364} + rotation: {x: 0.58187526, y: -0.25548643, z: 0.22513986, w: 0.73855263} + scale: {x: 1, y: 1, z: 1} + - name: thumb_02_r + parentName: thumb_01_r + position: {x: 0.04041515, y: 0.002166181, z: 0.00022503364} + rotation: {x: 0.06803136, y: 0.0176601, z: -0.0043638917, w: 0.9975174} + scale: {x: 1, y: 1, z: 1} + - name: thumb_03_r + parentName: thumb_02_r + position: {x: 0.021499943, y: 0.001487848, z: -0.000019537816} + rotation: {x: -0.0000015238087, y: -0.0017221253, z: 0.0091861915, w: 0.9999563} + scale: {x: 1, y: 1, z: 1} + - name: lowerarm_twist_01_r + parentName: lowerarm_r + position: {x: 0.1370334, y: 0.0000438542, z: 0.000121863864} + rotation: {x: 0.0012477214, y: 0.0016746745, z: -0.00058554957, w: 0.9999977} + scale: {x: 1, y: 1, z: 1} + - name: lowerarm_twist_02_r + parentName: lowerarm_r + position: {x: 0.059287686, y: 0.000033335233, z: 0.000090587935} + rotation: {x: 0.0012477214, y: 0.0016747412, z: -0.0005855495, w: 0.9999977} + scale: {x: 1, y: 1, z: 1} + - name: shoulder_twist_r + parentName: upperarm_r + position: {x: -1.4210854e-16, y: 8.881784e-18, z: -2.842171e-16} + rotation: {x: -2.0383001e-17, y: -5.551115e-17, z: -1.994932e-17, w: 1} + scale: {x: 1, y: 1, z: 1} + - name: upperarm_twist_01_r + parentName: upperarm_r + position: {x: 0.09029968, y: 0.0000010437467, z: -0.0000018067599} + rotation: {x: 0.0000003827072, y: 0.002089454, z: -0.00011396277, w: 0.99999785} + scale: {x: 1, y: 1, z: 1} + - name: upperarm_twist_02_r + parentName: upperarm_r + position: {x: 0.15903978, y: 0.0000019053997, z: -0.0000047150074} + rotation: {x: 0.00000039424768, y: 0.0000011916516, z: 0.000005457803, w: 1} + scale: {x: 1, y: 1, z: 1} + - name: neck_01 + parentName: spine_05 + position: {x: -0.09749261, y: -0.0039456394, z: -0.000000020623832} + rotation: {x: 0.000000028804722, y: 0.0000004854304, z: 0.15039413, w: 0.9886261} + scale: {x: 1, y: 1, z: 1} + - name: neck_02 + parentName: neck_01 + position: {x: -0.039823327, y: -0.0004405553, z: 0.0000000010045333} + rotation: {x: -0.0000041296635, y: 0.000000009748632, z: -0.0052707638, w: 0.9999861} + scale: {x: 1, y: 1, z: 1} + - name: head + parentName: neck_02 + position: {x: -0.04271587, y: -0.003412315, z: -3.3881317e-23} + rotation: {x: 0.4801824, y: -0.5190615, z: 0.48018217, w: 0.51906174} + scale: {x: 1, y: 1, z: 1} + - name: eyeRoot_l + parentName: head + position: {x: -0.045634158, y: 0.04975525, z: 0.036699787} + rotation: {x: 0.0000029793312, y: 0.00000016700348, z: -4.9755865e-13, w: 1} + scale: {x: 1, y: 1, z: 1} + - name: eyeSocket_l + parentName: eyeRoot_l + position: {x: -2.6645352e-17, y: -1.7053025e-15, z: -3.1086245e-17} + rotation: {x: 0.0000029793312, y: 0.00000016700348, z: -4.9755865e-13, w: 1} + scale: {x: 1, y: 1, z: 1} + - name: eye_l + parentName: eyeSocket_l + position: {x: -0.00000028216022, y: 0.0000005027548, z: 0.042186897} + rotation: {x: -0.0000029793312, y: -0.00000016700348, z: -2.4877932e-12, w: 1} + scale: {x: 1, y: 1, z: 1} + - name: eyeRoot_r + parentName: head + position: {x: 0.04563364, y: 0.049755275, z: 0.036700334} + rotation: {x: 0.0000029793312, y: 0.00000016700348, z: -4.9755865e-13, w: 1} + scale: {x: 1, y: 1, z: 1} + - name: eyeSocket_r + parentName: eyeRoot_r + position: {x: 1.7763568e-17, y: -5.684342e-16, z: 8.8817837e-17} + rotation: {x: 0.0000029793312, y: 0.00000016700348, z: -4.9755865e-13, w: 1} + scale: {x: 1, y: 1, z: 1} + - name: eye_r + parentName: eyeSocket_r + position: {x: 0.0000007168851, y: 0.0000005027567, z: 0.042186897} + rotation: {x: -0.0000029793312, y: -0.00000016700348, z: -2.4877932e-12, w: 1} + scale: {x: 1, y: 1, z: 1} + - name: Jaw + parentName: head + position: {x: -0.00000024235231, y: -0.013404406, z: 0.04100778} + rotation: {x: -0.4801808, y: 0.5190602, z: -0.48018384, w: 0.5190631} + scale: {x: 1, y: 1, z: 1} + - name: thigh_l + parentName: pelvis + position: {x: 0.026536651, y: -0.012540282, z: -0.09293319} + rotation: {x: 0.0010511586, y: 0.012049691, z: 0.040930457, w: 0.9990888} + scale: {x: 1, y: 1, z: 1} + - name: calf_l + parentName: thigh_l + position: {x: 0.42537814, y: 0.0000000133139615, z: -0.00000024290833} + rotation: {x: 0.004376668, y: 0.0047377935, z: 0.031418975, w: 0.99948555} + scale: {x: 1, y: 1, z: 1} + - name: calf_twist_01_l + parentName: calf_l + position: {x: 0.19054599, y: -0.000000018583592, z: 0.0000008138474} + rotation: {x: 2.3064883e-14, y: 6.3143935e-16, z: 2.6366713e-15, w: 1} + scale: {x: 1, y: 1, z: 1} + - name: calf_twist_01_l1 + parentName: calf_l + position: {x: 0.33434698, y: 0.000000006093711, z: -0.000000053852567} + rotation: {x: 2.3578361e-14, y: 5.9978064e-16, z: 2.6393276e-15, w: 1} + scale: {x: 1, y: 1, z: 1} + - name: foot_l + parentName: calf_l + position: {x: 0.42818737, y: 0.000000013496265, z: -0.000000046906553} + rotation: {x: -0.0064629638, y: -0.019155595, z: -0.017871823, w: 0.9996359} + scale: {x: 1, y: 1, z: 1} + - name: ball_l + parentName: foot_l + position: {x: 0.074242644, y: -0.1245928, z: 0.00043938312} + rotation: {x: 8.604412e-18, y: 1.0912737e-18, z: 0.7071068, w: 0.7071068} + scale: {x: 1, y: 1, z: 1} + - name: thigh_twist_01_l + parentName: thigh_l + position: {x: 0.18913661, y: 0.00035238912, z: -0.00044632424} + rotation: {x: -3.8543387e-16, y: 1.0245575e-31, z: -2.6581927e-16, w: 1} + scale: {x: 1, y: 1, z: 1} + - name: thigh_twist_01_l1 + parentName: thigh_l + position: {x: 0.3275102, y: 0.000000004340087, z: 0.00000023721351} + rotation: {x: -3.8543387e-16, y: 1.0245575e-31, z: -2.6581927e-16, w: 1} + scale: {x: 1, y: 1, z: 1} + - name: thigh_r + parentName: pelvis + position: {x: 0.026536746, y: -0.012540269, z: 0.09293316} + rotation: {x: -0.01204969, y: 0.0010511585, z: 0.99908876, w: -0.040930454} + scale: {x: 1, y: 1, z: 1} + - name: calf_r + parentName: thigh_r + position: {x: -0.42537832, y: -1.02140514e-16, z: -1.1191048e-15} + rotation: {x: 0.004376668, y: 0.0047377935, z: 0.031418975, w: 0.99948555} + scale: {x: 1, y: 1, z: 1} + - name: calf_twist_01_r + parentName: calf_r + position: {x: -0.1905453, y: -2.1816712e-17, z: 2.6460525e-17} + rotation: {x: -1.3877788e-17, y: 8.6736174e-19, z: 2.5478751e-18, w: 1} + scale: {x: 1, y: 1, z: 1} + - name: calf_twist_01_r1 + parentName: calf_r + position: {x: -0.33434707, y: -3.9388614e-17, z: 2.982546e-17} + rotation: {x: -1.3877788e-17, y: 8.6736174e-19, z: 1.6479873e-17, w: 1} + scale: {x: 1, y: 1, z: 1} + - name: foot_r + parentName: calf_r + position: {x: -0.4281875, y: 1.1546319e-16, z: -7.105427e-17} + rotation: {x: -0.0064629638, y: -0.019155595, z: -0.017871823, w: 0.9996359} + scale: {x: 1, y: 1, z: 1} + - name: ball_r + parentName: foot_r + position: {x: -0.074242234, y: 0.12459272, z: -0.00043897645} + rotation: {x: 1.9309915e-18, y: 1.4274006e-17, z: 0.7071068, w: 0.7071068} + scale: {x: 1, y: 1, z: 1} + - name: thigh_twist_01_r + parentName: thigh_r + position: {x: -0.18913673, y: -0.00035233443, z: 0.00044652633} + rotation: {x: 1.6263033e-16, y: -2.0816682e-17, z: -1.7354011e-17, w: 1} + scale: {x: 1, y: 1, z: 1} + - name: thigh_twist_01_r1 + parentName: thigh_r + position: {x: -0.32751042, y: 2.006681e-17, z: -2.427346e-19} + rotation: {x: 1.6263033e-16, y: -2.0816682e-17, z: -1.7354011e-17, w: 1} + scale: {x: 1, y: 1, z: 1} + - name: BodyProxy + parentName: BodyRig(Clone) + position: {x: -0, y: 0, z: 0} + rotation: {x: 0, y: -0, z: -0, w: 1} + scale: {x: 1, y: 1, z: 1} + armTwist: 0.536 + foreArmTwist: 0.588 + upperLegTwist: 0.5 + legTwist: 0.5 + armStretch: 0.05 + legStretch: 0.05 + feetSpacing: 0 + globalScale: 1 + rootMotionBoneName: + hasTranslationDoF: 0 + hasExtraRoot: 1 + skeletonHasParents: 1 + lastHumanDescriptionAvatarSource: {instanceID: 0} + autoGenerateAvatarMappingIfUnspecified: 1 + animationType: 3 + humanoidOversampling: 1 + avatarSetup: 1 + addHumanoidExtraRootOnlyWhenUsingAvatar: 1 + importBlendShapeDeformPercent: 1 + remapMaterialsIfMaterialImportModeIsNone: 0 + additionalBone: 0 + userData: + assetBundleName: + assetBundleVariant: +AssetOrigin: + serializedVersion: 1 + productId: 323550 + packageName: 'BoZo: Modular Anime Characters - Base Pack' + packageVersion: 1.8.6 + assetPath: Assets/BoZo_ModularAnimeCharacters/Models/Common/Body/BodyRig.fbx + uploadId: 917032 diff --git a/Assets/04_Models/Characters/ToonCharacterModular/Models/Common/Body/Body_BasicBody_v2.png b/Assets/04_Models/Characters/ToonCharacterModular/Models/Common/Body/Body_BasicBody_v2.png new file mode 100644 index 00000000..439b0ecf --- /dev/null +++ b/Assets/04_Models/Characters/ToonCharacterModular/Models/Common/Body/Body_BasicBody_v2.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d8fd8438ebff6f6378a1b44d7f0170ca1c9f985c9e165f697d073a667426efa3 +size 194225 diff --git a/Assets/04_Models/Characters/ToonCharacterModular/Models/Common/Body/Body_BasicBody_v2.png.meta b/Assets/04_Models/Characters/ToonCharacterModular/Models/Common/Body/Body_BasicBody_v2.png.meta new file mode 100644 index 00000000..ffd48470 --- /dev/null +++ b/Assets/04_Models/Characters/ToonCharacterModular/Models/Common/Body/Body_BasicBody_v2.png.meta @@ -0,0 +1,134 @@ +fileFormatVersion: 2 +guid: 2ae20bc5538c97e469e6061a49430e59 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 13 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + flipGreenChannel: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 0 + wrapV: 0 + wrapW: 0 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Android + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + nameFileIdTable: {} + mipmapLimitGroupName: + pSDRemoveMatte: 0 + userData: + assetBundleName: + assetBundleVariant: +AssetOrigin: + serializedVersion: 1 + productId: 323550 + packageName: 'BoZo: Modular Anime Characters - Base Pack' + packageVersion: 1.8.6 + assetPath: Assets/BoZo_ModularAnimeCharacters/Models/Common/Body/Body_BasicBody_v2.png + uploadId: 917032 diff --git a/Assets/04_Models/Characters/ToonCharacterModular/Models/Common/Body/Body_D.png b/Assets/04_Models/Characters/ToonCharacterModular/Models/Common/Body/Body_D.png new file mode 100644 index 00000000..25112e5d --- /dev/null +++ b/Assets/04_Models/Characters/ToonCharacterModular/Models/Common/Body/Body_D.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:581d77791380f46d2e0d4bf2ded1134dc2bb9fb962fcfeec617998df2299441b +size 598089 diff --git a/Assets/04_Models/Characters/ToonCharacterModular/Models/Common/Body/Body_D.png.meta b/Assets/04_Models/Characters/ToonCharacterModular/Models/Common/Body/Body_D.png.meta new file mode 100644 index 00000000..ec7ce413 --- /dev/null +++ b/Assets/04_Models/Characters/ToonCharacterModular/Models/Common/Body/Body_D.png.meta @@ -0,0 +1,150 @@ +fileFormatVersion: 2 +guid: b2b43ceea8504cd4b88839f86cce9a50 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 13 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + flipGreenChannel: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 0 + wrapV: 0 + wrapW: 0 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 0 + platformSettings: + - serializedVersion: 4 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 4 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 4 + buildTarget: WebGL + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 4 + buildTarget: iOS + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + customData: + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spriteCustomMetadata: + entries: [] + nameFileIdTable: {} + mipmapLimitGroupName: + pSDRemoveMatte: 0 + userData: + assetBundleName: + assetBundleVariant: +AssetOrigin: + serializedVersion: 1 + productId: 323550 + packageName: 'BoZo: Modular Anime Characters - Base Pack' + packageVersion: 1.8.6 + assetPath: Assets/BoZo_ModularAnimeCharacters/Models/Common/Body/Body_D.png + uploadId: 917032 diff --git a/Assets/04_Models/Characters/ToonCharacterModular/Models/Common/Body/Body_N.png b/Assets/04_Models/Characters/ToonCharacterModular/Models/Common/Body/Body_N.png new file mode 100644 index 00000000..98b34bbf --- /dev/null +++ b/Assets/04_Models/Characters/ToonCharacterModular/Models/Common/Body/Body_N.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:afee00e19d2e9c8a6c8525ac82d89534d669645fab7887e3aaa5d49eb57d3c61 +size 1556658 diff --git a/Assets/04_Models/Characters/ToonCharacterModular/Models/Common/Body/Body_N.png.meta b/Assets/04_Models/Characters/ToonCharacterModular/Models/Common/Body/Body_N.png.meta new file mode 100644 index 00000000..bd9b545f --- /dev/null +++ b/Assets/04_Models/Characters/ToonCharacterModular/Models/Common/Body/Body_N.png.meta @@ -0,0 +1,160 @@ +fileFormatVersion: 2 +guid: 172ad87310cc70f49bcd8edbb349ace9 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 13 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 0 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + flipGreenChannel: 0 + isReadable: 1 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 0 + wrapV: 0 + wrapW: 0 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 1 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 512 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: WebGL + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: iOS + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Android + maxTextureSize: 512 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + nameFileIdTable: {} + mipmapLimitGroupName: + pSDRemoveMatte: 0 + userData: + assetBundleName: + assetBundleVariant: +AssetOrigin: + serializedVersion: 1 + productId: 323550 + packageName: 'BoZo: Modular Anime Characters - Base Pack' + packageVersion: 1.8.6 + assetPath: Assets/BoZo_ModularAnimeCharacters/Models/Common/Body/Body_N.png + uploadId: 917032 diff --git a/Assets/04_Models/Characters/ToonCharacterModular/Scripts.meta b/Assets/04_Models/Characters/ToonCharacterModular/Scripts.meta new file mode 100644 index 00000000..b717b733 --- /dev/null +++ b/Assets/04_Models/Characters/ToonCharacterModular/Scripts.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 2d03eea3297f36a40962b5beb04239b0 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/04_Models/Characters/ToonCharacterModular/Scripts/BodyShapeModifier.cs b/Assets/04_Models/Characters/ToonCharacterModular/Scripts/BodyShapeModifier.cs new file mode 100644 index 00000000..85ebe1aa --- /dev/null +++ b/Assets/04_Models/Characters/ToonCharacterModular/Scripts/BodyShapeModifier.cs @@ -0,0 +1,247 @@ +using UnityEngine; +using System.Collections.Generic; + +namespace Bozo.AnimeCharacters +{ + public class BodyShapeModifier : MonoBehaviour + { + private OutfitSystem system; + + public string shapeName; + public string sorting; + + public bool useScale; + public float scaleValue = 1; + public float xScaleValue = 1; + public float yScaleValue = 1; + public float zScaleValue = 1; + public BodyShapeModifier[] counterScale; + private Vector3 counterValue; + public Dictionary counterSources = new Dictionary(); + + public bool useXScale; + public bool useYScale; + public bool useZScale; + public bool linkScaleAxis; + + public Vector2 scaleRange = new Vector2(0.5f, 2f); + + public bool usePosition; + private Vector3 initalPosition; + private Vector3 initalMirrorPosition; + public float posValue = 0; + public float xPosValue = 0; + public float yPosValue = 0; + public float zPosValue = 0; + public bool useXPos; + public bool useYPos; + public bool useZPos; + public Vector2 posRange = new Vector2(-0.02f, 0.02f); + + public bool useRotation; + public float rotation; + public Vector3 rotationAxis; + public Vector2 rotRange = new Vector2(-90f, 90f); + + [SerializeField] bool MirrorTransform; + private Transform mirror; + + private bool initalized; + + private void Awake() + { + + } + + private void Start() + { + Init(); + } + + public void Init() + { + if (initalized) return; + system = GetComponentInParent(); + initalPosition = transform.localPosition; + + if (!system) + { + return; + } + + if (MirrorTransform) + { + var boneName = name; + boneName = boneName.Replace("_l", "_r"); + var bones = system.GetBones(); + + mirror = bones[boneName]; + initalMirrorPosition = mirror.localPosition; + } + + initalized = true; + } + + public void SetScale(float x, float y, float z, float v) + { + xScaleValue = x; + yScaleValue = y; + zScaleValue = z; + scaleValue = v; + ApplyScale(); + } + + public void SetScale(float value) + { + scaleValue = value; + ApplyScale(); + } + + public void SetPosition(float x, float y, float z) + { + xPosValue = x; + yPosValue = y; + zPosValue = z; + + ApplyPosition(); + } + + public void SetRotation(float value) + { + rotation = value; + ApplyRotation(); + } + + public void Apply() + { + if (!initalized) Init(); + + if (usePosition) ApplyPosition(); + if (useRotation) ApplyRotation(); + if (useScale) ApplyScale(); + } + + public void ApplyScale() + { + scaleValue = Mathf.Clamp(scaleValue, scaleRange.x, scaleRange.y); + xScaleValue = Mathf.Clamp(xScaleValue, scaleRange.x, scaleRange.y); + yScaleValue = Mathf.Clamp(yScaleValue, scaleRange.x, scaleRange.y); + zScaleValue = Mathf.Clamp(zScaleValue, scaleRange.x, scaleRange.y); + + var xSca = 1f; + var ySca = 1f; + var zSca = 1f; + + if (linkScaleAxis) + { + if (useXScale) xSca = scaleValue; + if (useYScale) ySca = scaleValue; + if (useZScale) zSca = scaleValue; + } + else + { + if (useXScale) xSca = xScaleValue; + if (useYScale) ySca = yScaleValue; + if (useZScale) zSca = zScaleValue; + } + + var scale = new Vector3(xSca, ySca, zSca); + var counter = new Vector3(1 / xSca, 1 / ySca, 1 / zSca); + + counterValue = Vector3.one; + foreach (var item in counterSources.Values) + { + counterValue = Vector3.Scale(counterValue, item); + } + + transform.localScale = Vector3.Scale(scale, counterValue); + if (mirror) mirror.localScale = Vector3.Scale(scale, counterValue); + + foreach (var item in counterScale) + { + if (!item) continue; + item.counterSources[this.name] = counter; item.ApplyScale(); + } + } + + public void ApplyPosition() + { + xPosValue = Mathf.Clamp(xPosValue, posRange.x, posRange.y); + yPosValue = Mathf.Clamp(yPosValue, posRange.x, posRange.y); + zPosValue = Mathf.Clamp(zPosValue, posRange.x, posRange.y); + + var xPos = 0f; + var yPos = 0f; + var zPos = 0f; + + if (useXPos) xPos = xPosValue; + if (useYPos) yPos = yPosValue; + if (useZPos) zPos = zPosValue; + + var position = new Vector3(xPos, yPos, zPos); + var mirrorPosition = new Vector3(-xPos, yPos, zPos); + + + transform.localPosition = position + initalPosition; + if (mirror) mirror.localPosition = mirrorPosition + initalMirrorPosition; + + + + } + + public void ApplyRotation() + { + rotation = Mathf.Clamp(rotation, rotRange.x, rotRange.y); + + var rot = new Vector3(rotation * rotationAxis.x, rotation * rotationAxis.y, rotation * rotationAxis.z); + + transform.localRotation = Quaternion.Euler(rot); + if (mirror) mirror.localRotation = Quaternion.Euler(-rot); + } + + public BodyModData GetData() + { + var data = new BodyModData(); + + data.scaleValue = scaleValue; + data.scale = new Vector3(xScaleValue, yScaleValue, zScaleValue); + + data.posValue = posValue; + data.position = new Vector3(xPosValue, yPosValue, zPosValue); + + data.rotation = rotation; + return data; + } + + public void SetData(BodyModData data) + { + + scaleValue = data.scaleValue; + xScaleValue = data.scale.x; + yScaleValue = data.scale.y; + zScaleValue = data.scale.z; + + posValue = data.posValue; + xPosValue = data.position.x; + yPosValue = data.position.y; + zPosValue = data.position.z; + + rotation = data.rotation; + + Apply(); + } + } + + [System.Serializable] + public class BodyModData + { + public float scaleValue = 1; + public Vector3 scale; + + public float posValue = 1; + public Vector3 position; + + public float rotation; + } +} + diff --git a/Assets/04_Models/Characters/ToonCharacterModular/Scripts/BodyShapeModifier.cs.meta b/Assets/04_Models/Characters/ToonCharacterModular/Scripts/BodyShapeModifier.cs.meta new file mode 100644 index 00000000..b14ca0f0 --- /dev/null +++ b/Assets/04_Models/Characters/ToonCharacterModular/Scripts/BodyShapeModifier.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 3e43f223ac10e6b43b4cb1aad8aa07bd +AssetOrigin: + serializedVersion: 1 + productId: 323550 + packageName: 'BoZo: Modular Anime Characters - Base Pack' + packageVersion: 1.8.6 + assetPath: Assets/BoZo_ModularAnimeCharacters/Scripts/BodyShapeModifier.cs + uploadId: 917032 diff --git a/Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator.meta b/Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator.meta new file mode 100644 index 00000000..c37103d6 --- /dev/null +++ b/Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: ea08c4f4b86500b469cce7c78d00d32f +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/BMAC_SaveSystem.cs b/Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/BMAC_SaveSystem.cs new file mode 100644 index 00000000..3409f969 --- /dev/null +++ b/Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/BMAC_SaveSystem.cs @@ -0,0 +1,360 @@ +using System.Collections.Generic; +using System.Linq; +using UnityEditor; +using UnityEngine; +using System.Threading.Tasks; + + +namespace Bozo.AnimeCharacters +{ + + + public static class BMAC_SaveSystem + { + public static string filePath = Application.persistentDataPath + "/BoZo_ModularAnimeCharacters/CharacterSaves"; + public static string iconFilePath = Application.persistentDataPath + "/BoZo_ModularAnimeCharacters/CharacterSaves/Icons"; + public static string assetPath = "/BoZo_ModularAnimeCharacters/CharacterSaves/Resources/"; + public static string iconAssetPath = "/BoZo_ModularAnimeCharacters/CharacterSaves/Icons/"; + + public static void SaveCharacter(OutfitSystem outfitSystem, string saveName, Texture2D icon = null) + { + var data = GetCharacterData(outfitSystem); + + data.characterName = saveName; + + +#if UNITY_EDITOR + + var CharacterSave = ScriptableObject.CreateInstance(); + CharacterSave.data = data; + Debug.Log(icon); + CharacterSave.icon = icon; + AssetDatabase.CreateAsset(CharacterSave, "Assets/" + assetPath + "/" + saveName + ".asset"); + AssetDatabase.Refresh(); +#endif + + string saveData = JsonUtility.ToJson(data); + System.IO.File.WriteAllText(filePath + "/" + saveName + ".json", saveData); + Debug.Log("Character Saved:" + filePath + "/" + saveName + ".json"); + } + + public static CharacterData GetCharacterData(OutfitSystem outfitSystem) + { + if (outfitSystem.mergedMode) return outfitSystem.data; + + var data = new CharacterData(); + + data.characterName = outfitSystem.prefabName; + + //Saving BlendShapes + var bodyShapeValues = outfitSystem.GetBodyShapeValues(); + data.bodyIDs = bodyShapeValues.Keys.ToList(); + data.bodyShapes = bodyShapeValues.Values.ToList(); + + var faceShapeValues = outfitSystem.GetFaceShapeValues(); + data.faceIDs = faceShapeValues.Keys.ToList(); + data.faceShapes = faceShapeValues.Values.ToList(); + + //Saving Body Mods + var modData = new List(); + var modKeys = outfitSystem.bodyModifiers.Keys.ToList(); + for (int i = 0; i < modKeys.Count; i++) + { + var mod = outfitSystem.bodyModifiers[modKeys[i]].GetData(); + modData.Add(mod); + } + data.bodyMods = modData; + data.bodyModsKeys = modKeys; + + //Saving Outfits + var outfits = outfitSystem.GetOutfits(); + var outfitDataList = new List(); + + for (int i = 0; i < outfits.Count; i++) + { + if (outfits[i] == null) continue; + outfitDataList.Add(outfits[i].GetOutfitData()); + } + + data.stance = outfitSystem.stance; + data.outfitDatas = outfitDataList; + + return data; + } + + public static async Task LoadCharacter(OutfitSystem outfitSystem, CharacterData characterObject = null, bool manualShapeApply = false, bool async = false) + { + outfitSystem.isloading = true; + CharacterData loadData = characterObject; + + //Loading Outfits + + List outfits = new List(); + + if (async) + { + outfits = await LoadOutfits(loadData.outfitDatas); + } + else + { + foreach (var item in loadData.outfitDatas) + { + outfits.Add(Resources.Load(item.outfit)); + } + } + + outfitSystem.RemoveAllOutfits(); + + for (int i = 0; i < loadData.outfitDatas.Count; i++) + { + var outfitData = loadData.outfitDatas[i]; + var outfit = outfits[i]; + + if (outfit == null) + { + Debug.LogWarning("Outfit Path: " + outfitData.outfit + " returns null make sure Prefab is named correctly"); + continue; + } + + var inst = outfitSystem.InstantiateOutfit(outfit); + inst.decalDatas = loadData.outfitDatas[i].decalDatas; + + //inst.Attach(); + try + { + if (inst.customShader) + { + inst.SetSwatch(outfitData.swatch); + inst.SetColor(outfitData.color); + } + else + { + for (int c = 0; c < 9; c++) + { + if (outfitData.colors.Count > c) + { + inst.SetColor(outfitData.colors[c], c + 1); + } + + if (c + 1 <= 3 && outfitData.decal != "") + { + inst.SetDecalColor(outfitData.decalColors[c], c + 1); + } + if (c + 1 <= 3 && outfitData.pattern != "") + { + inst.SetPatternColor(outfitData.patternColors[c], c + 1); + } + } + + var decal = Resources.Load(outfitData.decal); + inst.SetDecal(decal); + inst.SetDecalSize(outfitData.decalScale); + + var pattern = Resources.Load(outfitData.pattern); + inst.SetPattern(pattern); + inst.SetPatternSize(outfitData.patternScale); + } + + } + catch + { + Debug.LogError("Character Colors Failed to load"); + } + + try + { + for (int v = 0; v < outfit.optionalPieces.Length; v++) + { + if (inst.optionalPieces[v] == null) continue; + inst.optionalPieces[v].SetActive(loadData.outfitDatas[i].partVisibility[v]); + } + } + catch + { + Debug.LogError("Something Went Wrong"); + } + + } + + + + //Loading Body Morphs + + for (int i = 0; i < loadData.bodyIDs.Count; i++) + { + outfitSystem.SetShape(loadData.bodyIDs[i], loadData.bodyShapes[i]); + } + + for (int i = 0; i < loadData.faceIDs.Count; i++) + { + outfitSystem.SetShape(loadData.faceIDs[i], loadData.faceShapes[i]); + } + + if (!manualShapeApply) LoadBodyMods(outfitSystem, loadData); + + + outfitSystem.animator.Rebind(); + outfitSystem.SetStance(loadData.stance); + outfitSystem.isloading = false; + outfitSystem.OnCharacterLoaded?.Invoke(); + } + + public static void LoadBodyMods(OutfitSystem outfitSystem, CharacterData loadData) + { + for (int i = 0; i < loadData.bodyModsKeys.Count; i++) + { + outfitSystem.bodyModifiers[loadData.bodyModsKeys[i]].SetData(loadData.bodyMods[i]); + } + } + + public static CharacterData GetDataFromID(string saveName) + { + CharacterData loadData; + Debug.Log("Attempted Load at: " + filePath + "/" + saveName + ".json"); + if (!System.IO.File.Exists(filePath + "/" + saveName + ".json")) + { + Debug.LogWarning($"Save ID: {saveName} does not exist. Make sure input matches an existing Save"); + return null; + } + else + { + string data = System.IO.File.ReadAllText(filePath + "/" + saveName + ".json"); + loadData = JsonUtility.FromJson(data); + return loadData; + } + } + + public static async Task> LoadOutfits(List outfitDatas) + { + var loadTasks = outfitDatas.Select(data => LoadResourceAsync(data.outfit)); + return (await Task.WhenAll(loadTasks)).ToList(); + } + + public static async Task LoadResourceAsync(string path) where T : UnityEngine.Object + { + ResourceRequest request = Resources.LoadAsync(path); + var tcs = new TaskCompletionSource(); + + request.completed += operation => + { + if (request.asset == null) + { + tcs.SetResult(null); + } + else if (request.asset is not T result) + { + tcs.SetResult(null); + } + else + { + tcs.SetResult(result); + } + }; + + return await tcs.Task; + } + + public static void DeleteCharacter(string characterName) + { + System.IO.File.Delete(filePath + "/" + characterName + ".json"); + System.IO.File.Delete(iconFilePath + "/" + characterName + ".png"); + System.IO.File.Delete("Assets/" + assetPath + "/" + characterName + ".asset"); + System.IO.File.Delete("Assets/" + assetPath + "/" + characterName + ".meta"); + System.IO.File.Delete("Assets/" + iconAssetPath + characterName + ".png"); + System.IO.File.Delete("Assets/" + iconAssetPath + characterName + ".meta"); +#if UNITY_EDITOR + AssetDatabase.Refresh(); +#endif + } + } + + [System.Serializable] + public class CharacterData + { + public string characterName; + public List bodyIDs; + public List bodyShapes; + public List faceIDs; + public List faceShapes; + public List bodyModsKeys; + public List bodyMods; + public List outfitDatas; + public OutfitData bodyData; + public float stance; + + + public CharacterData() + { + + } + public CharacterData(CharacterData copyData) + { + characterName = copyData.characterName; + bodyIDs = new List(copyData.bodyIDs); + bodyShapes = new List(copyData.bodyShapes); + faceIDs = new List(copyData.faceIDs); + faceShapes = new List(copyData.faceShapes); + bodyModsKeys = new List(copyData.bodyModsKeys); + bodyMods = new List(copyData.bodyMods); + outfitDatas = new List(copyData.outfitDatas); + bodyData = copyData.bodyData; + stance = copyData.stance; + } + } + + [System.Serializable] + public struct OutfitData + { + public string outfit; + public List colors; + + public string decal; + public List decalColors; + public Vector4 decalScale; + + public string pattern; + public List patternColors; + public Vector4 patternScale; + + public bool[] partVisibility; + + //Custom Shader Data + public Color color; + public int swatch; + + public List decalDatas; + } + + [System.Serializable] + public struct DecalData + { + public string decal; + public string parent; + + public Vector3 pos; + + public float yaw; + public float roll; + public float pitch; + public float scale; + + public Color color; + + public DecalData(string decal, string parent, Vector3 pos, float yaw, float roll,float pitch, float scale, Color color) + { + this.decal = decal; + this.parent = parent; + + this.pos = pos; + + this.yaw = yaw; + this.roll = roll; + this.pitch = pitch; + this.scale = scale; + + this.color = color; + } + + } + +} \ No newline at end of file diff --git a/Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/BMAC_SaveSystem.cs.meta b/Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/BMAC_SaveSystem.cs.meta new file mode 100644 index 00000000..0e0f9c93 --- /dev/null +++ b/Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/BMAC_SaveSystem.cs.meta @@ -0,0 +1,18 @@ +fileFormatVersion: 2 +guid: b719335614062204d9ab42ec5bfab351 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: +AssetOrigin: + serializedVersion: 1 + productId: 323550 + packageName: 'BoZo: Modular Anime Characters - Base Pack' + packageVersion: 1.8.6 + assetPath: Assets/BoZo_ModularAnimeCharacters/Scripts/CharacterCreator/BMAC_SaveSystem.cs + uploadId: 917032 diff --git a/Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/BoZoCharacterOptimizer.cs b/Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/BoZoCharacterOptimizer.cs new file mode 100644 index 00000000..4df8f8e8 --- /dev/null +++ b/Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/BoZoCharacterOptimizer.cs @@ -0,0 +1,1104 @@ +using UnityEngine; +using System.Collections.Generic; +using System.Linq; +using UnityEditor; +using UnityEngine.Rendering; +using System.Threading.Tasks; +using System; + +namespace Bozo.AnimeCharacters +{ + public class BoZo_CharacterOptimizer + { + private static string path = "/BoZo_ModularAnimeCharacters/CustomCharacters/Prefabs"; + + private MergedMaterialData[] mergedMaterialDatas; + private OutfitSystem sourceSystem; + + public async Task OptimizeCharacter(OutfitSystem source, CharacterData data , bool save = false) + { + if (source == null) return null; + if (source.mergeMaterial == null) + { + Debug.Log("Merge Material required, please assign one in the inspector"); + return null; + } + + sourceSystem = source; + var body = source; + + //creating clean base to work on + if (!source.mergeBase) + { + body = await PrepareMergeBase(source, data); + mergedMaterialDatas = source.materialData; + } + + body.transform.position = Vector3.zero; + var mergedBody = await Merge(body, save); + + + + source.customMaps = body.customMaps; + return mergedBody; + } + + public async Task SaveOptimizedCharacter(OutfitSystem source, CharacterData data) + { + + if (source.mergeMaterial == null) + { + Debug.Log("Merge Material required, please assign one in the inspector"); + return null; + } + + sourceSystem = source; + var body = source; + + //creating clean base to work on + if (!source.mergeBase) + { + body = await PrepareMergeBase(source, data); + mergedMaterialDatas = source.materialData; + } + + var mergedBody = await Merge(body); + + + + source.customMaps = body.customMaps; + + //UnityEngine.Object.Destroy(body.gameObject); + BMAC_SaveSystem.LoadBodyMods(body, data); + source.SetCharacterBody(mergedBody); + return mergedBody; + + + /* + //creating clean base to work on + var body = await PrepareMergeBase(source, data); + var height = body.height; + body.data = data; + mergedMaterialDatas = source.materialData; + + var mergedBody = await Merge(body, true, source.prefabName); + + UnityEngine.Object.Destroy(body.gameObject); + BMAC_SaveSystem.LoadBodyMods(body, data); + source.SetCharacterBody(mergedBody); + source.MuteHeightChange(false); + */ + } + + private async Task PrepareMergeBase(OutfitSystem source, CharacterData data) + { + var characterBaseOb = Resources.Load("BMAC_MergedCharacterBase"); + var body = UnityEngine.Object.Instantiate(characterBaseOb, new Vector3(0,-0,0), Quaternion.identity); + body.mergeBase = true; + body.MuteHeightChange(true); + body.animator.enabled = false; + await BMAC_SaveSystem.LoadCharacter(body, data, true, true); + + body.mergeMaterial = source.mergeMaterial; + + return body; + } + + + public async Task Merge(OutfitSystem outfitSystem, bool saveAsPrefab = false) + { + if (!Application.isPlaying) return null; + + var outfitsToMerge = outfitSystem.GetOutfits(); + var rig = outfitSystem.GetCharacterBody(); + var materialBase = outfitSystem.mergeMaterial; + + + #region ----- Initalization ----- + + if (outfitsToMerge == null || outfitsToMerge.Count == 0) + { + Debug.LogError("No Skinned Mesh Renderers assigned."); + return null; + } + + //Initalizing Bones + var masterBones = outfitSystem.GetBones().Values.ToList(); + var rootBone = rig.rootBone; + var parent = rig.transform.parent; + + //Creating Map + Dictionary boneMap = new Dictionary(); + + for (int i = 0; i < masterBones.Count; i++) + { + var data = new boneData(); + data.bone = masterBones[i]; + data.index = i; + + boneMap.Add(masterBones[i].name, data); + } + + bool MergeMaterials = false; + + //Mesh Data Initaliztion + List vertices = new List(); + List normals = new List(); + List tangents = new List(); + List uv = new List(); + List uv2 = new List(); + List colors = new List(); + List boneWeights = new List(); + List materials = new List(); + List bindposes = new List(); + Dictionary> blendshapeGroups = new Dictionary>(); + int vertexOffset = 0; + List> submeshTriangles = new List>(); + int maxMaterialIndex = -999; + + var mergedTexture = new Texture2D(2, 2); + var atlasTransform = new Dictionary(); + + Material newMaterial = new Material(materialBase); + newMaterial.mainTexture = null; + List rendererList = new List(); + + foreach (var item in outfitsToMerge) + { + if (sourceSystem.hiddenTypes.ContainsKey(item.Type)) continue; + rendererList.AddRange(item.GetComponentsInChildren()); + var anim = item.GetComponentInChildren(); + if (anim != null) anim.enabled = false; + if (item.materialIndex > maxMaterialIndex) maxMaterialIndex = item.materialIndex; + + //Gather CustomMaps + var ext = item.GetComponent>(); + if(ext != null) + { + sourceSystem.customMaps[ext.GetUniqueID()] = ext.GetValue(); + } + + + } + + foreach (var item in rendererList) + { + item.enabled = (false); + } + + var mats = PackTextures(outfitSystem); + var materialMap = new Dictionary(); + + for (int i = 0; i < mats.Count; i++) + { + materialMap[mats[i].name] = i; + } + + for (int i = 0; i < materialMap.Count + 1; i++) + { + submeshTriangles.Add(new List()); + } + + + + #endregion + + Dictionary boneIndexMap = new Dictionary(); + + #region ------------------ Main Merge Loop ------------------ + + for (int i = 0; i < rendererList.Count; i++) + { + var smr = rendererList[i].GetComponentInChildren(true); + var outfit = rendererList[i].GetComponentInParent(true); + + //Not SkinnedMesh converting to SkinnedMesh + if (smr == null) + { + Mesh staticMesh = rendererList[i].GetComponentInChildren(true).sharedMesh; + var meshRenderer = rendererList[i].GetComponentInChildren(true); + var staticMaterial = meshRenderer.sharedMaterial; + var meshGameObject = meshRenderer.gameObject; + UnityEngine.Object.DestroyImmediate(meshRenderer); + UnityEngine.Object.DestroyImmediate(meshGameObject.GetComponent()); + smr = meshGameObject.AddComponent(); + smr.sharedMaterial = staticMaterial; + smr.sharedMesh = staticMesh; + } + + + + Mesh mesh = smr.sharedMesh; + var boneIndexOffset = 0; + bool hasSkeleton = true; + + + + //Check if its the same skeleton + if (smr.rootBone != null) + { + if (!boneMap.ContainsKey(smr.rootBone.name)) + { + boneIndexOffset = masterBones.Count; + + smr.rootBone = boneMap[outfit.AttachPoint].bone; + masterBones.AddRange(smr.bones); + smr.bones[0].SetParent(boneMap[outfit.AttachPoint].bone); + + for (int b = 0; b < smr.bones.Length; b++) + { + var dupCounter = 1; + + boneData data = new boneData(); + data.bone = smr.bones[b]; + data.index = b + boneIndexOffset; + + try + { + boneMap.Add(smr.bones[b].name, data); + } + catch + { + Debug.LogWarning($"Duplicate bone naming in: <{outfit.name}> <{smr.bones[b].name}>Please give bone a unique name"); + boneMap.Add(smr.bones[b].name + dupCounter, data); + } + } + } + } + + + + // Collect transforms in this mesh + Transform[] meshBones = smr.bones; + if (smr.rootBone != null) + { + // Build remap table: mesh bone index -> master bone index + for (int b = 0; b < meshBones.Length; b++) + { + Transform bone = meshBones[b]; + int masterIndex = -1; + if (bone == null) continue; + if (boneMap.ContainsKey(bone.name)) + { + masterIndex = boneMap[bone.name].index; + } + else + { + Debug.LogWarning(bone.name + " Is not in BoneMap"); + } + + if (masterIndex == -1) + { + continue; + } + boneIndexMap[b] = masterIndex; + } + } + else + { + hasSkeleton = false; + int masterIndex = -1; + masterIndex = boneMap[outfit.AttachPoint].index; + boneIndexMap[0] = masterIndex; + smr.bones = masterBones.ToArray(); + smr.rootBone = rootBone; + } + + + + + #region meshVertices + + // Bake transform into vertices/normals/tangents + Matrix4x4 localToWorld = smr.transform.localToWorldMatrix; + + // Transform vertices + Vector3[] transformedVertices = new Vector3[mesh.vertexCount]; + Vector3[] transformedNormals = new Vector3[mesh.vertexCount]; + Vector4[] transformedTangents = new Vector4[mesh.vertexCount]; + + Vector3[] meshVertices = mesh.vertices; + Vector3[] meshNormals = mesh.normals; + Vector4[] meshTangents = mesh.tangents; + + + for (int v = 0; v < mesh.vertexCount; v++) + { + transformedVertices[v] = localToWorld.MultiplyPoint3x4(meshVertices[v]); + transformedNormals[v] = localToWorld.MultiplyVector(meshNormals[v]).normalized; + + // Tangents need special handling (w is the handedness) + Vector3 t = localToWorld.MultiplyVector(new Vector3(meshTangents[v].x, meshTangents[v].y, meshTangents[v].z)).normalized; + transformedTangents[v] = new Vector4(t.x, t.y, t.z, meshTangents[v].w); + } + + + // Append vertex attributes + vertices.AddRange(transformedVertices); + normals.AddRange(transformedNormals); + tangents.AddRange(transformedTangents); + + + + #endregion + + if (MergeMaterials) + { + Vector2[] originalUVs = mesh.uv; + Vector2[] remappedUVs = new Vector2[originalUVs.Length]; + + Rect rect = atlasTransform[outfit.name]; + + + for (int u = 0; u < originalUVs.Length; u++) + { + Vector2 uvVert = originalUVs[u]; + remappedUVs[u] = new Vector2( + rect.x + uvVert.x * rect.width, + rect.y + uvVert.y * rect.height + ); + } + + uv.AddRange(remappedUVs); + } + else + { + //UV merging + uv.AddRange(mesh.uv); + + if (mesh.uv2 != null && mesh.uv2.Length == mesh.vertexCount) + { + // This mesh has valid UV2s + uv2.AddRange(mesh.uv2); + } + else + { + Vector2[] defaultUV2 = new Vector2[mesh.vertexCount]; + uv2.AddRange(defaultUV2); + // This mesh has no UV2s + } + } + + // Vertex colors + Color[] meshColors = mesh.colors; + if (meshColors != null && meshColors.Length == mesh.vertexCount) + { + colors.AddRange(meshColors); + } + else + { + // Fill with red if missing + for (int c = 0; c < mesh.vertexCount; c++) + colors.Add(Color.red); + } + + + + + if (hasSkeleton) + { + // Remap bone weights + BoneWeight[] meshBoneWeights = mesh.boneWeights; + foreach (BoneWeight bw in meshBoneWeights) + { + if (!boneIndexMap.ContainsKey(bw.boneIndex0)) + { + BoneWeight newBw = new BoneWeight + { + boneIndex0 = boneIndexMap[boneMap[smr.rootBone.name].index], + weight0 = 1, + }; + boneWeights.Add(newBw); + } + else + { + BoneWeight newBw = new BoneWeight + { + boneIndex0 = boneIndexMap[bw.boneIndex0], + boneIndex1 = boneIndexMap[bw.boneIndex1], + boneIndex2 = boneIndexMap[bw.boneIndex2], + boneIndex3 = boneIndexMap[bw.boneIndex3], + weight0 = bw.weight0, + weight1 = bw.weight1, + weight2 = bw.weight2, + weight3 = bw.weight3 + }; + boneWeights.Add(newBw); + } + } + } + else + { + //Has no weights and is being assigned them + BoneWeight[] meshBoneWeights = new BoneWeight[mesh.vertexCount]; + foreach (BoneWeight bw in meshBoneWeights) + { + BoneWeight newBw = new BoneWeight + { + boneIndex0 = boneIndexMap[bw.boneIndex0], + weight0 = 1, + }; + boneWeights.Add(newBw); + } + } + + #region Submeshes and materials + + int matIndex = -999; + matIndex = outfit.materialIndex; + if (outfit.materialIndex == -1) matIndex = materialMap[outfit.Type.name]; + + for (int s = 0; s < mesh.subMeshCount; s++) + { + List triangles = mesh.GetTriangles(s).ToList(); + for (int t = 0; t < triangles.Count; t++) + { + triangles[t] += vertexOffset; + } + + submeshTriangles[matIndex].AddRange(triangles); + } + + #endregion + + // Extract blendshapes + int blendshapeCount = mesh.blendShapeCount; + for (int b = 0; b < blendshapeCount; b++) + { + string shapeName = mesh.GetBlendShapeName(b); + var split = shapeName.Split("."); + if (split.Length > 0) + { + shapeName = shapeName.Replace(split[0] + ".", ""); + } + int frameCount = mesh.GetBlendShapeFrameCount(b); + + for (int f = 0; f < frameCount; f++) + { + float weight = mesh.GetBlendShapeFrameWeight(b, f); + float currentWeight = smr.GetBlendShapeWeight(b); + + Vector3[] deltaVertices = new Vector3[mesh.vertexCount]; + Vector3[] deltaNormals = new Vector3[mesh.vertexCount]; + Vector3[] deltaTangents = new Vector3[mesh.vertexCount]; + + mesh.GetBlendShapeFrameVertices(b, f, deltaVertices, deltaNormals, deltaTangents); + + if (!blendshapeGroups.ContainsKey(shapeName)) + blendshapeGroups[shapeName] = new List(); + blendshapeGroups[shapeName].Add(new BlendshapeData + { + name = shapeName, + weight = weight, + currentWeight = currentWeight, + deltaVertices = deltaVertices, + deltaNormals = deltaNormals, + deltaTangents = deltaTangents, + vertexOffset = vertexOffset + }); + } + } + + + vertexOffset += mesh.vertexCount; + } + + + foreach (var item in outfitsToMerge) + { + UnityEngine.Object.DestroyImmediate(item.gameObject); + } + + UnityEngine.Object.DestroyImmediate(rig.gameObject); + + + + #endregion + + #region ------ Mesh Creation ----- + + + + //Bind Pose Merge + for (int i = 0; i < masterBones.Count; i++) + { + bindposes.Add(masterBones[i].worldToLocalMatrix * rootBone.localToWorldMatrix); + } + + + // Build combined mesh + Mesh combinedMesh = new Mesh(); + combinedMesh.name = "Combined Skinned Mesh"; + combinedMesh.SetVertices(vertices); + combinedMesh.SetNormals(normals); + combinedMesh.SetTangents(tangents); + combinedMesh.SetUVs(0, uv); + combinedMesh.SetUVs(1, uv2); + combinedMesh.SetColors(colors); + combinedMesh.boneWeights = boneWeights.ToArray(); + combinedMesh.bindposes = bindposes.ToArray(); + combinedMesh.subMeshCount = submeshTriangles.Count; + + + + //Creating Material Regions + for (int i = 0; i < submeshTriangles.Count; i++) + { + combinedMesh.SetTriangles(submeshTriangles[i], i); + } + + #region BlendShapes + // Create merged blendshapes + foreach (var kv in blendshapeGroups) + { + string shapeName = kv.Key; + List entries = kv.Value; + + // Assuming all frames have the same weight + float frameWeight = entries[0].weight; + + // Prepare deltas for the combined mesh size + int totalVertices = combinedMesh.vertexCount; + Vector3[] mergedDeltaVertices = new Vector3[totalVertices]; + Vector3[] mergedDeltaNormals = new Vector3[totalVertices]; + Vector3[] mergedDeltaTangents = new Vector3[totalVertices]; + + foreach (var e in entries) + { + for (int i = 0; i < e.deltaVertices.Length; i++) + { + mergedDeltaVertices[e.vertexOffset + i] = e.deltaVertices[i]; + mergedDeltaNormals[e.vertexOffset + i] = e.deltaNormals[i]; + mergedDeltaTangents[e.vertexOffset + i] = e.deltaTangents[i]; + } + } + + combinedMesh.AddBlendShapeFrame( + shapeName, + frameWeight, + mergedDeltaVertices, + mergedDeltaNormals, + mergedDeltaTangents + ); + } + #endregion + + #region Final GameObject + // Create new GameObject + GameObject mergedGO = new GameObject("Combined Skinned Mesh"); + + SkinnedMeshRenderer newRenderer = mergedGO.AddComponent(); + newRenderer.sharedMesh = combinedMesh; + newRenderer.bones = masterBones.ToArray(); + newRenderer.rootBone = rootBone; + + if (false) + { + newRenderer.material = newMaterial; + } + else + { + newRenderer.materials = mats.ToArray(); + } + + foreach (var key in blendshapeGroups.Keys) + { + var blendData = blendshapeGroups[key][0]; + + var index = newRenderer.sharedMesh.GetBlendShapeIndex(blendData.name); + newRenderer.SetBlendShapeWeight(index, blendData.currentWeight); + } + + newRenderer.transform.parent = parent; + + Debug.Log("Dynamic skinning merge complete with bone remapping!"); + #endregion + + + #region Saving Final GameObject +#if UNITY_EDITOR + BMAC_SaveSystem.LoadBodyMods(outfitSystem, outfitSystem.data); + if (saveAsPrefab) + { + var saveName = outfitSystem.data.characterName; + if (saveName == "") saveName = "NewCharacter"; + var assetPath = $"{Application.dataPath}{path}/{saveName}"; + var savePath = $"Assets/{path}/{saveName}"; + + if (!System.IO.Directory.Exists($"{Application.dataPath}{path}/{saveName}")) + { + System.IO.Directory.CreateDirectory(assetPath); + AssetDatabase.Refresh(); + } + + //Saving Mesh + string meshPath = $"{savePath}/{saveName}_Mesh.asset"; + AssetDatabase.CreateAsset(newRenderer.sharedMesh, meshPath); + AssetDatabase.SaveAssets(); + AssetDatabase.Refresh(); + var mesh = AssetDatabase.LoadAssetAtPath(meshPath); + + //Saving Materials and Textures + var matList = new List(); + + foreach (var item in newRenderer.sharedMaterials) + { + var mat = new Material(item); + mat.name = saveName + "_" + item.name; + + var rt = (RenderTexture)mat.mainTexture; + var tex = new Texture2D(rt.width, rt.height, TextureFormat.RGBA32, false, true); + RenderTexture.active = rt; + + tex.ReadPixels(new Rect(0, 0, rt.width, rt.height), 0, 0); + tex.Apply(); + + string diffusePath = $"{assetPath}/{mat.name}_D.png"; + byte[] bytes = ImageConversion.EncodeToPNG(tex); + System.IO.File.WriteAllBytes(diffusePath, bytes); + + AssetDatabase.SaveAssets(); + AssetDatabase.Refresh(); + + var diffuse = AssetDatabase.LoadAssetAtPath($"{savePath}/{mat.name}_D.png"); + + mat.mainTexture = diffuse; + + UnityEngine.Object.Destroy(tex); + + foreach (var matData in sourceSystem.materialData) + { + rt = (RenderTexture)item.GetTexture(matData.toMateiralProperty); + tex = new Texture2D(rt.width, rt.height, TextureFormat.RGBA32, false); + RenderTexture.active = rt; + + tex.ReadPixels(new Rect(0, 0, rt.width, rt.height), 0, 0); + tex.Apply(); + + string texturePath = $"{assetPath}/{mat.name}{matData.toMateiralProperty}.png"; + bytes = ImageConversion.EncodeToPNG(tex); + System.IO.File.WriteAllBytes(texturePath, bytes); + + AssetDatabase.SaveAssets(); + AssetDatabase.Refresh(); + + var texture = AssetDatabase.LoadAssetAtPath($"{savePath}/{mat.name}{matData.toMateiralProperty}.png"); + + mat.SetTexture(matData.toMateiralProperty, texture); + + UnityEngine.Object.Destroy(tex); + } + + foreach (var key in sourceSystem.customMaps.Keys) + { + Texture t = sourceSystem.customMaps[key]; + if (t == null) continue; + tex = new Texture2D(t.width, t.height, TextureFormat.RGBA32, false); + RenderTexture.active = rt; + + tex.ReadPixels(new Rect(0, 0, t.width, t.height), 0, 0); + tex.Apply(); + + string texturePath = $"{assetPath}/{key}.png"; + bytes = ImageConversion.EncodeToPNG(tex); + System.IO.File.WriteAllBytes(texturePath, bytes); + + AssetDatabase.SaveAssets(); + AssetDatabase.Refresh(); + var texture = AssetDatabase.LoadAssetAtPath($"{savePath}/{key}.png"); + } + + + //Saving Material + string matPath = $"{savePath}/{mat.name}_Mat.mat"; + AssetDatabase.CreateAsset(mat, matPath); + AssetDatabase.SaveAssets(); + AssetDatabase.Refresh(); + matList.Add( AssetDatabase.LoadAssetAtPath(matPath)); + } + + newRenderer.sharedMaterials = matList.ToArray(); + + await Task.Yield(); + + // Save the prefab + string prefabPath = $"{savePath}/{saveName}.prefab"; + GameObject prefab = PrefabUtility.SaveAsPrefabAsset(parent.gameObject, prefabPath); + var prefabSkinnedMeshrenderer = prefab.GetComponentInChildren(); + prefabSkinnedMeshrenderer.sharedMesh = mesh; + //prefabSkinnedMeshrenderer.sharedMaterial = mat; + + + AssetDatabase.SaveAssets(); + AssetDatabase.Refresh(); + + Debug.Log($"Saved Prefab at: {prefabPath}"); + + } +#endif + #endregion + + + #endregion + + + return parent.gameObject; + + + } + + public List PackTextures(OutfitSystem system) + { + var mats = BoZo_TextureBuilder.GetMaterials(system); + + return mats; + } + + public async Task<(Texture2D texture, Dictionary additionalMaps, Dictionary rect, Dictionary customMaps)> CreateMergedTextures(List outfits) + { + var diffuseMaps = new List(); + var normalMaps = new List(); + var additionalMaps = new Dictionary(); + var customMaps = new Dictionary(); + var bakeMaterial = new Material(Shader.Find("BoZo/BakeTexture")); + int index = 0; + + foreach (var item in outfits) + { + + var smr = item.GetComponentInChildren(); + var renderer = item.GetComponentInChildren(); + var mesh = new List(); + + foreach (var s in item.skinnedRenderers) + { + mesh.Add(s.sharedMesh); + } + + //Doesnt have a SkinnedMesh + if (smr == null) + { + mesh.Add(item.GetComponentInChildren(true).sharedMesh); + } + + var originalMaterial = renderer.sharedMaterial; + renderer.sharedMaterial = bakeMaterial; + + if (!item.customShader) + { + //Copy All Colors and Data To Bake Material + bakeMaterial.mainTexture = originalMaterial.mainTexture; + bakeMaterial.SetTexture("_DecalMap", originalMaterial.GetTexture("_DecalMap")); + bakeMaterial.SetFloat("_DecalUVSet", originalMaterial.GetFloat("_DecalUVSet")); + bakeMaterial.SetFloat("_DecalBlend", originalMaterial.GetFloat("_DecalBlend")); + bakeMaterial.SetVector("_DecalScale", originalMaterial.GetVector("_DecalScale")); + + bakeMaterial.SetTexture("_PatternMap", originalMaterial.GetTexture("_PatternMap")); + bakeMaterial.SetFloat("_PatternUVSet", originalMaterial.GetFloat("_PatternUVSet")); + bakeMaterial.SetFloat("_PatternBlend", originalMaterial.GetFloat("_PatternBlend")); + bakeMaterial.SetVector("_PatternScale", originalMaterial.GetVector("_PatternScale")); + + for (int i = 0; i < 9; i++) + { + bakeMaterial.SetColor("_Color_" + (i + 1), originalMaterial.GetColor("_Color_" + (i + 1))); + bakeMaterial.SetColor("_Color_" + (i + 1), originalMaterial.GetColor("_Color_" + (i + 1))); + + if (i + 1 <= 3) + { + bakeMaterial.SetColor("_DecalColor_" + (i + 1), originalMaterial.GetColor("_DecalColor_" + (i + 1))); + bakeMaterial.SetColor("_PatternColor_" + (i + 1), originalMaterial.GetColor("_PatternColor_" + (i + 1))); + } + + } + } + else + { + diffuseMaps.Add((Texture2D)originalMaterial.mainTexture); + } + + foreach (var map in mergedMaterialDatas) + { + if (!additionalMaps.ContainsKey(map.toMateiralProperty)) { additionalMaps[map.toMateiralProperty] = new Texture2D[outfits.Count]; } + additionalMaps[map.toMateiralProperty][index] = (Texture2D)originalMaterial.GetTexture(map.fromMateiralProperty); + } + + //Get CustomMaps form extensions + var extensions = item.GetComponentsInChildren(); + + foreach (var extension in extensions) + { + if (extension.GetValue() is Texture2D && !customMaps.ContainsKey(extension.GetID())) customMaps[extension.GetID()] = new Texture2D[outfits.Count]; + if (extension.GetValue() is Texture2D) + { + customMaps[extension.GetID()][index] = (Texture2D)extension.GetValue(); + } + } + + + var tex = await BakeTextureAsyncTask(mesh, bakeMaterial); + + diffuseMaps.Add(tex); + + renderer.sharedMaterial = originalMaterial; + RenderTexture.active = null; + + index++; + } + + + int atlasSize = 2048; + + Texture2D atlas = new Texture2D(atlasSize, atlasSize); + Texture2D atlasNormal = new Texture2D(atlasSize, atlasSize); + Dictionary additionalMapsList = new Dictionary(); + Dictionary atlasCustomMapsList = new Dictionary(); + atlas.wrapMode = TextureWrapMode.Repeat; + Rect[] rects = atlas.PackTextures(diffuseMaps.ToArray(), 0, atlasSize); + + //Creating Map for Outfits with Multiple Meshes + Dictionary rectMap = new Dictionary(); + for (int i = 0; i < outfits.Count; i++) + { + rectMap.Add(outfits[i].name, rects[i]); + } + + var pixels = atlas.GetPixels32(); + pixels = await DilateTextureAsync(atlas, pixels); + + atlas.SetPixels32(pixels); + atlas.Apply(); + + var addIndex = 0; + foreach (var additional in additionalMaps) + { + var additionalValues = additional.Value.ToList(); + Texture2D newAdditionalMap = new Texture2D(atlasSize, atlasSize); + newAdditionalMap.wrapMode = TextureWrapMode.Repeat; + additionalMapsList[additional.Key] = await RemapTextureAsync(additionalValues, rects, atlasSize, newAdditionalMap, mergedMaterialDatas[addIndex].backgroundColor); + addIndex++; + } + + foreach (var custom in customMaps) + { + var customValues = custom.Value.ToList(); + if (customValues.Count == 0) continue; + Texture2D newCustomMap = new Texture2D(atlasSize, atlasSize); + newCustomMap.wrapMode = TextureWrapMode.Repeat; + atlasCustomMapsList[custom.Key] = await RemapTextureAsync(customValues, rects, atlasSize, newCustomMap, Color.black); + } + + return (atlas, additionalMapsList, rectMap, atlasCustomMapsList); + } + + public async Task BakeTextureAsyncTask(List mesh, Material bakeMaterial) + { + var textureSize = bakeMaterial.mainTexture.width; + var rt = new RenderTexture(textureSize, textureSize, 0, RenderTextureFormat.ARGB32) + { + useMipMap = false, + autoGenerateMips = false + }; + rt.Create(); + + CommandBuffer cb = new CommandBuffer(); + cb.SetRenderTarget(rt); + cb.ClearRenderTarget(true, true, Color.clear); + foreach (var m in mesh) + { + cb.DrawMesh(m, Matrix4x4.identity, bakeMaterial); + } + Graphics.ExecuteCommandBuffer(cb); + cb.Release(); + + var tcs = new TaskCompletionSource(); + + AsyncGPUReadback.Request(rt, 0, TextureFormat.RGBA32, request => + { + if (request.hasError) + { + tcs.SetException(new Exception("Async GPU readback failed.")); + } + else + { + var data = request.GetData(); + var tex = new Texture2D(textureSize, textureSize, TextureFormat.RGBA32, false); + tex.LoadRawTextureData(data); + tex.Apply(); + tcs.SetResult(tex); + } + }); + + return await tcs.Task; + } + + public async Task RemapTextureAsync(List normalMaps, Rect[] rects, int atlasSize, Texture2D atlasNormal, Color fillColor) + { + List pendingReads = new List(); + + Color[] pixels = new Color[atlasSize * atlasSize]; + for (int i = 0; i < pixels.Length; i++) + { + pixels[i] = fillColor; + } + atlasNormal.SetPixels(pixels); + + for (int i = 0; i < normalMaps.Count; i++) + { + if (normalMaps[i] == null) continue; + Rect r = rects[i]; + + int x = Mathf.RoundToInt(r.x * atlasSize); + int y = Mathf.RoundToInt(r.y * atlasSize); + int w = Mathf.RoundToInt(r.width * atlasSize); + int h = Mathf.RoundToInt(r.height * atlasSize); + + Texture2D normal = normalMaps[i]; + + RenderTexture rt = RenderTexture.GetTemporary(w, h, 0, RenderTextureFormat.ARGB32); + Graphics.Blit(normal, rt); + + int copyX = x, copyY = y, copyW = w, copyH = h; + RenderTexture copyRT = rt; + + var tcs = new TaskCompletionSource(); + pendingReads.Add(tcs.Task); + + AsyncGPUReadback.Request(copyRT, 0, TextureFormat.RGBA32, request => + { + if (request.hasError) + { + Debug.LogError("Normal map readback failed"); + tcs.SetResult(true); + RenderTexture.ReleaseTemporary(copyRT); + return; + } + + var data = request.GetData(); + Color32[] pixels = data.ToArray(); + + // Fill into the atlas + Color[] colors = new Color[pixels.Length]; + for (int j = 0; j < pixels.Length; j++) + { + colors[j] = pixels[j]; // Converts Color32 to Color + } + + atlasNormal.SetPixels(copyX, copyY, copyW, copyH, colors); + + RenderTexture.ReleaseTemporary(copyRT); + tcs.SetResult(true); + }); + } + + await Task.WhenAll(pendingReads); + + atlasNormal.Apply(); // Apply once after all blocks are set + return atlasNormal; + } + + + + public async Task DilateTextureAsync(Texture2D tex, Color32[] pixels) + { + var iterations = 2; + int w = tex.width; + int h = tex.height; + + Color32[] resultPixels = await Task.Run(() => + { + Color32[] workingPixels = new Color32[pixels.Length]; + Color32[] temp = new Color32[pixels.Length]; + bool[] originalMask = new bool[pixels.Length]; + + // Initialize workingPixels and mask + for (int i = 0; i < pixels.Length; i++) + { + workingPixels[i] = pixels[i]; + originalMask[i] = pixels[i].a >= 255; // original valid pixels + } + + for (int it = 0; it < iterations; it++) + { + workingPixels.CopyTo(temp, 0); + + for (int y = 0; y < h; y++) + { + for (int x = 0; x < w; x++) + { + int idx = y * w + x; + if (workingPixels[idx].a >= 255) continue; + + for (int dy = -1; dy <= 1; dy++) + { + for (int dx = -1; dx <= 1; dx++) + { + if (dx == 0 && dy == 0) continue; + + int nx = x + dx; + int ny = y + dy; + if (nx < 0 || nx >= w || ny < 0 || ny >= h) continue; + + int nIdx = ny * w + nx; + + // ONLY copy from original source pixels + if (originalMask[nIdx]) + { + temp[idx] = workingPixels[nIdx]; + goto FoundPixel; + } + } + } + + FoundPixel:; + } + } + + // Update working pixels + var swap = workingPixels; + workingPixels = temp; + temp = swap; + + // After first iteration, also allow pixels from the new ones as source + for (int i = 0; i < pixels.Length; i++) + { + if (workingPixels[i].a >= 1) + originalMask[i] = true; + } + } + + return workingPixels; + }); + + return resultPixels; + } + + + + private class boneData + { + public Transform bone; + public int index; + } + + struct BlendshapeData + { + public string name; + public float weight; + public float currentWeight; + public Vector3[] deltaVertices; + public Vector3[] deltaNormals; + public Vector3[] deltaTangents; + public int vertexOffset; + } + + } + + [System.Serializable] + public class MergedMaterialData + { + public string fromMateiralProperty; + public string toMateiralProperty; + public Color backgroundColor = Color.gray; + } + +} diff --git a/Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/BoZoCharacterOptimizer.cs.meta b/Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/BoZoCharacterOptimizer.cs.meta new file mode 100644 index 00000000..87841d92 --- /dev/null +++ b/Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/BoZoCharacterOptimizer.cs.meta @@ -0,0 +1,18 @@ +fileFormatVersion: 2 +guid: 64cef876055435e43aba052093527416 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: +AssetOrigin: + serializedVersion: 1 + productId: 323550 + packageName: 'BoZo: Modular Anime Characters - Base Pack' + packageVersion: 1.8.6 + assetPath: Assets/BoZo_ModularAnimeCharacters/Scripts/CharacterCreator/BoZoCharacterOptimizer.cs + uploadId: 917032 diff --git a/Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/BoZo_EventSystemHandler.cs b/Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/BoZo_EventSystemHandler.cs new file mode 100644 index 00000000..09999d42 --- /dev/null +++ b/Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/BoZo_EventSystemHandler.cs @@ -0,0 +1,35 @@ +using UnityEngine; +using UnityEngine.EventSystems; + +#if ENABLE_INPUT_SYSTEM +using UnityEngine.InputSystem.UI; +#endif + +namespace Bozo.AnimeCharacters +{ + + public class BoZo_EventSystemHandler : MonoBehaviour + { + private void Awake() + { +#if ENABLE_INPUT_SYSTEM + + var newModule = GetComponent(); + var oldModule = GetComponent(); + + if (newModule == null) + { + newModule = gameObject.AddComponent(); + } + + if (oldModule != null) + { + oldModule.enabled = false; + } + + newModule.enabled = true; +#endif + } + } +} + diff --git a/Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/BoZo_EventSystemHandler.cs.meta b/Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/BoZo_EventSystemHandler.cs.meta new file mode 100644 index 00000000..e5ff4db4 --- /dev/null +++ b/Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/BoZo_EventSystemHandler.cs.meta @@ -0,0 +1,18 @@ +fileFormatVersion: 2 +guid: a6f257dfe31fd744095472249ecc6ffc +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: +AssetOrigin: + serializedVersion: 1 + productId: 323550 + packageName: 'BoZo: Modular Anime Characters - Base Pack' + packageVersion: 1.8.6 + assetPath: Assets/BoZo_ModularAnimeCharacters/Scripts/CharacterCreator/BoZo_EventSystemHandler.cs + uploadId: 917032 diff --git a/Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/BoZo_Links.cs b/Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/BoZo_Links.cs new file mode 100644 index 00000000..a68286cb --- /dev/null +++ b/Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/BoZo_Links.cs @@ -0,0 +1,37 @@ +using UnityEngine; + + +namespace Bozo.AnimeCharacters +{ + +public class BoZo_Links : MonoBehaviour +{ + + private void Awake() + { + #if !UNITY_EDITOR + Destroy(this.gameObject); + #endif + } + public void Documentation() + { + Application.OpenURL("https://docs.google.com/document/d/1kf1KGT-OqV3Ecvnej0mpmgIOkc-_e7UJp-BkGuZfuN4/edit?usp=sharing"); + } + + public void Discord() + { + Application.OpenURL("https://discord.gg/UCbRjUy7m7"); + } + + public void Twitter() + { + + } + + public void Youtube() + { + + } + } + +} \ No newline at end of file diff --git a/Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/BoZo_Links.cs.meta b/Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/BoZo_Links.cs.meta new file mode 100644 index 00000000..b0c1e54d --- /dev/null +++ b/Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/BoZo_Links.cs.meta @@ -0,0 +1,18 @@ +fileFormatVersion: 2 +guid: bf7b6117bf8d6a6489dcc7b01c90a2be +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: +AssetOrigin: + serializedVersion: 1 + productId: 323550 + packageName: 'BoZo: Modular Anime Characters - Base Pack' + packageVersion: 1.8.6 + assetPath: Assets/BoZo_ModularAnimeCharacters/Scripts/CharacterCreator/BoZo_Links.cs + uploadId: 917032 diff --git a/Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/BoZo_TextureBuilder.cs b/Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/BoZo_TextureBuilder.cs new file mode 100644 index 00000000..188ca3d6 --- /dev/null +++ b/Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/BoZo_TextureBuilder.cs @@ -0,0 +1,686 @@ +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using UnityEngine; +using UnityEngine.Experimental.Rendering; + +namespace Bozo.AnimeCharacters +{ + public static class BoZo_TextureBuilder + { + private static BoZo_TextureBuilderManager _manager; + + + public static void Init() + { + var ob = new GameObject("BoZo_TextureBuilderManager"); + ob.AddComponent(typeof(BoZo_TextureBuilderManager)); + _manager = ob.GetComponent(); + } + + public static void AddOutfit(OutfitSystem system) + { + if (_manager == null) Init(); + _manager.AddOutfit(system); + } + + public static void RemoveBuilder(OutfitSystem system) + { + if (_manager == null) return; + _manager.RemoveBuilder(system); + } + + public static List GetMaterials(OutfitSystem system) + { + return _manager.GetMaterials(system); + } + + public static void QuickBuild(OutfitSystem system, bool save = false) + { + if (_manager == null) Init(); + _manager.QuickBuild(system, save); + } + + public static DecalBaker GetDecalControl(OutfitSystem outfitSystem, Outfit outfit) + { + if (_manager == null) return null; + return _manager.GetDecalControl(outfitSystem, outfit); + } + + public class BoZo_TextureBuilderManager : MonoBehaviour + { + TextureBuilder commonBuilder; + + Dictionary builders = new Dictionary(); + public List visableBuilders = new List(); + + private static HashSet buildQueue = new HashSet(); + private bool isBuilding; + + public async void QuickBuild(OutfitSystem system, bool save = false) + { + if (system == null) return; + if (isBuilding) + { + buildQueue.Add(system); + return; + } + + isBuilding = true; + + if (commonBuilder == null) + { + commonBuilder = new TextureBuilder(); + commonBuilder.parent.position = new Vector3(-12, -100, 0); + + } + commonBuilder.locked = false; + + if (commonBuilder.outfitSystem == null) + { + var characterBaseOb = Resources.Load("BMAC_MergedCharacterBase"); + var body = Instantiate(characterBaseOb, new Vector3(0, -100, 0), Quaternion.identity); + body.name = "CommonBuilder_MergedBase"; + body.mergeBase = true; + body.MuteHeightChange(true); + body.animator.enabled = false; + body.mergeMaterial = system.mergeMaterial; + commonBuilder.Link(body); + } + + var height = system.height; + var data = BMAC_SaveSystem.GetCharacterData(system); + await BMAC_SaveSystem.LoadCharacter(commonBuilder.outfitSystem, data, true, true); + commonBuilder.outfitSystem.data = data; + + + await Task.Yield(); + + commonBuilder.locked = true; + system.customMaps = commonBuilder.outfitSystem.customMaps; + + var optimizer = new BoZo_CharacterOptimizer(); + var mergedBody = await optimizer.OptimizeCharacter(commonBuilder.outfitSystem, data, save); + system.SetCharacterBody(mergedBody); + system.SetHeight(height); + + system.SetRenderTextures(commonBuilder.rts.Values.ToList()); + + Destroy(commonBuilder.outfitSystem.gameObject); + + await Task.Yield(); + + commonBuilder.Remove(); + commonBuilder = null; + + isBuilding = false; + if (buildQueue.Count != 0) + { + var next = buildQueue.First(); + buildQueue.Remove(next); + QuickBuild(next); + } + } + + public void AddOutfit(OutfitSystem system) + { + if (builders.ContainsKey(system)) return; + var builder = new TextureBuilder(); + builder.Link(system); + builders.Add(system, builder); + visableBuilders.Add(builder); + + var list = builders.Values.ToList(); + for (int i = 0; i < list.Count; i++) { list[i].Organize(i); } + } + + public void RemoveBuilder(OutfitSystem system) + { + if (!builders.ContainsKey(system)) return; + + var builder = builders[system]; + + builder.Remove(); + + builders.Remove(system); + } + + public List GetMaterials(OutfitSystem system) + { + if (builders.ContainsKey(system)) return builders[system].GetMaterials(); + return commonBuilder.GetMaterials(); + } + + public DecalBaker GetDecalControl(OutfitSystem outfitSystem, Outfit outfit) + { + if (builders.ContainsKey(outfitSystem)) + { + if (builders[outfitSystem].decalOutfit.ContainsKey(outfit.Type.name)) return builders[outfitSystem].decalOutfit[outfit.Type.name]; + }; + if (commonBuilder != null) return commonBuilder.decalOutfit[outfit.Type.name]; + return null; + } + + [System.Serializable] + public class TextureBuilder + { + public Transform parent; + + public OutfitSystem outfitSystem; + public OutfitSystem proxySystem; + + public Dictionary masterMaterials = new Dictionary(); + private Dictionary unpackedMaterials = new Dictionary(); + + private Dictionary outfits = new Dictionary(); + private Dictionary> materials = new Dictionary>(); + + + public Dictionary decalOutfit = new Dictionary(); + + public Camera cam; + public List properties = new List(); + public HashSet allProperties = new HashSet(); + public HashSet SubIDs = new HashSet(); + public Dictionary baseColors = new Dictionary(); + public Dictionary meshes = new Dictionary(); + public Dictionary rts = new Dictionary(); + + private bool renderCooldown; + public bool locked; //prevent textures from updating + public HashSet renderQueue = new HashSet(); + + + + public TextureBuilder() + { + parent = new GameObject().transform; + parent.parent = _manager.transform; + + //Camera Settings + GameObject camObject = new GameObject("Builder Camera"); + camObject.transform.parent = parent; + camObject.transform.position = new Vector3(0, 0, 0); + cam = camObject.AddComponent(); + + cam.orthographic = true; + cam.clearFlags = CameraClearFlags.SolidColor; + cam.backgroundColor = Color.clear; + cam.orthographicSize = 0.5f; + cam.farClipPlane = 3; + cam.allowHDR = false; + cam.enabled = false; + + //Proxy Character Settings + var characterBaseOb = Resources.Load("BMAC_MergedCharacterBase"); + proxySystem = Instantiate(characterBaseOb); + proxySystem.mergeBase = true; + proxySystem.name = "Proxy System"; + proxySystem.transform.parent = parent; + proxySystem.transform.position = new Vector3(0, -0.5f, 0); + proxySystem.transform.localScale = new Vector3(0.5f, 0.5f, 0.5f); + + } + + public void Link(OutfitSystem sys) + { + parent.name = sys.name; + outfitSystem = sys; + + foreach (var item in outfitSystem.GetOutfits()) + { + AddOutfit(item); + } + + sys.OnOutfitChanged += AddOutfit; + sys.OnOutfitRemoved += RemoveOutfit; + sys.OnCharacterLoaded += PrepareRender; + } + + public void AddOutfit(Outfit outfit) + { + if (outfit == null) return; + outfits[outfit.Type.name] = outfit; + + + string unpackedID = outfit.materialIndex + outfit.Type.name; + string packedID = outfit.materialIndex.ToString(); + //Unpacked Outfit Making Extra Set Up + if (outfit.materialIndex == -1 && !meshes.ContainsKey(unpackedID)) + { + InitalizeWorkSpace(outfit.materialIndex, outfit.Type.name); + } + else if (!meshes.ContainsKey(outfit.materialIndex + "MainTexture")) + { + InitalizeWorkSpace(outfit.materialIndex); + } + + /* Annoying and causes problems but keeping it here just in case I need to set it back up + + var extensions = outfit.GetComponentsInChildren(); + foreach (var extension in extensions) + { + if (extension.GetValueType() != typeof(Texture)) continue; + if (extension.GetValue() as UnityEngine.Object == null) { continue; } + + if (!meshes.ContainsKey(outfit.materialIndex + extension.GetID())) + { + properties.Add(extension.GetID()); + allProperties.Add(outfit.materialIndex + extension.GetID()); + var outfitID = ""; + if (outfit.materialIndex == -1) outfitID = outfit.Type.name; + AddToWorkSpace(outfit.materialIndex, extension.GetID(), outfitID, Color.red); + } + } + + */ + + //Adding Decal System ---------------------------------------------------------------------------------------------- + if (outfit.supportDecals) + { + var outfitCopy = Instantiate(outfit, proxySystem.transform); + outfitCopy.Attach(true); + outfitCopy.gameObject.SetActive(true); + + outfitCopy.gameObject.AddComponent(); + var decalBaker = outfitCopy.GetComponent(); + decalBaker.bones = proxySystem.GetBones(); + decalBaker.Init(outfit, outfitCopy, outfitSystem); + + + decalOutfit[outfitCopy.Type.name] = decalBaker; + decalBaker.onDecalChanged += PrepareRender; + + + if (outfit.materialIndex == -1) + { + decalBaker.SetBoundsPosition(meshes[unpackedID + "MainTexture"].transform.localPosition); + } + else + { + decalBaker.SetBoundsPosition(meshes[packedID + "MainTexture"].transform.localPosition); + } + } + //---------------------------------------------------------------------------------------------- + + if (outfit.gameObject.activeSelf == false) return; + + Material editMat = null; + + + foreach (var key in properties) + { + var fullKey = outfit.materialIndex + key; + if (outfit.materialIndex == -1) fullKey = outfit.materialIndex + outfit.Type.name + key; + + if (outfit.editMaterials.ContainsKey(fullKey)) + { + editMat = outfit.editMaterials[fullKey]; + } + else + { + editMat = new Material(Shader.Find("BoZo/BakeTexture")); + editMat.enableInstancing = true; + + if (outfit.material.GetTexture("_IDMap") != null) + { + editMat.SetTexture("_IDMap", outfit.material.GetTexture("_IDMap")); + editMat.SetFloat("_UsingIDMap", 1); + } + + editMat.name = outfit.OutfitName; + + if (key == "MainTexture") + { + editMat.mainTexture = outfit.material.mainTexture; + var colors = outfit.GetColors(); + + if (outfit.material.HasProperty("_UseCustomTexture")) + { + if (outfit.material.GetFloat("_UseCustomTexture") == 1) + { + for (int i = 1; i < 9; i++) + { + if (editMat.HasProperty("_Color_" + i)) + { + editMat.SetColor("_Color_" + i, colors[i - 1]); + } + } + } + else + { + editMat.SetFloat("_UseCustomTexture", 0); + editMat.color = outfit.GetColor(1); + } + } + } + else if (!key.Contains("_")) + { + //Special Texture + foreach (var ext in outfit.GetComponentsInChildren()) + { + if (ext.GetID() == key) + { + editMat.mainTexture = (Texture)ext.GetValue(); + if (meshes[fullKey].sharedMaterials.Length == 0) + { + outfitSystem.customMaps.Remove(key); + } + else + { + outfitSystem.customMaps[key] = rts[fullKey]; + } + break; + } + } + } + else + { + if (outfit.material.HasProperty(key)) + { + editMat.mainTexture = outfit.material.GetTexture(key); + editMat.SetFloat("_UseCustomTexture", 0); + + } + var ID = fullKey.Replace(key, "MainTexture"); + editMat.SetTexture("_IDMap", materials[ID][outfit.Type.name].mainTexture); + editMat.SetFloat("_UsingIDMap", 1); + if (key.Contains("Normal") || key.Contains("normal")) editMat.SetFloat("_isNormalMap", 1); + } + } + + editMat.SetColor("_BaseColor", baseColors[key]); + if (editMat.mainTexture == null) + { + editMat.SetFloat("_hasTextureMap", 0); + } + + materials[fullKey][outfit.Type.name] = editMat; + ReassignMaterials(); + + outfit.editMaterials[fullKey] = editMat; + Render(fullKey, true); + + + } + + + Material mat; + var list = masterMaterials; + if (outfit.materialIndex == -1) list = unpackedMaterials; + + if (list.ContainsKey(outfit.materialIndex + outfit.Type.name)) + { + mat = list[outfit.materialIndex + outfit.Type.name]; + } + else + { + mat = list[outfit.materialIndex.ToString()]; + } + + outfit.SetMaterial(mat); + + + outfit.editMode = true; + outfit.OnColorChanged += PrepareRender; + } + + public void InitalizeWorkSpace(int materialIndex = 0, string outfitID = "") + { + var subID = materialIndex + outfitID; + + if (allProperties.Contains(subID + "MainTexture")) return; + var sys = outfitSystem; + + SubIDs.Add(subID); + + allProperties.Add(subID + "MainTexture"); + if (!properties.Contains("MainTexture")) properties.Add("MainTexture"); + AddToWorkSpace(materialIndex, "MainTexture", outfitID, Color.black); + + for (int i = 0; i < sys.materialData.Length; i++) + { + var prop = sys.materialData[i].toMateiralProperty; + + if (!allProperties.Contains(subID + prop)) allProperties.Add(subID + prop); + if (!properties.Contains(prop)) properties.Add(prop); + AddToWorkSpace(materialIndex, prop, outfitID, sys.materialData[i].backgroundColor); + } + } + + public void AddToWorkSpace(int materialIndex, string propertyID, string outfitID, Color color) + { + + + var index = materialIndex; + if (materialIndex == -1) index = 12 + unpackedMaterials.Count; + var z = (index + 1) * 3; + + var y = properties.IndexOf(propertyID) - 1; + + var subID = materialIndex + outfitID + propertyID; + + + Material masterMat; + var list = masterMaterials; // Good boy list + if (subID.Contains("-1")) list = unpackedMaterials; //Naughty List + + var MatID = materialIndex.ToString(); + if (materialIndex == -1) MatID = MatID + outfitID; + + //Good Boy List (PrePacked Outfits) + if (list.ContainsKey(MatID)) + { + masterMat = list[MatID]; + } + else + { + masterMat = new Material(outfitSystem.mergeMaterial); + masterMat.name = MatID; + list[MatID] = masterMat; + } + + var quad = GameObject.CreatePrimitive(PrimitiveType.Quad); + quad.transform.parent = parent; + quad.transform.localPosition = new Vector3(0, -2 * (y + 1), z); + quad.name = subID + "_Quad"; + meshes[subID] = quad.GetComponent(); + + + RenderTexture rt = new RenderTexture(2048, 2048, 0, GraphicsFormat.R8G8B8A8_SRGB); + rt.wrapMode = TextureWrapMode.Repeat; + rt.depthStencilFormat = UnityEngine.Experimental.Rendering.GraphicsFormat.D16_UNorm; + rt.enableRandomWrite = false; + rt.useMipMap = false; + rt.Create(); + + rts[subID] = rt; + + + + materials[subID] = new Dictionary(); + if (propertyID == "MainTexture") { masterMat.mainTexture = rt; } + else if (masterMat.HasProperty(propertyID)) { masterMat.SetTexture(propertyID, rt); } + + baseColors[propertyID] = color; + } + + public void RemoveOutfit(Outfit outfit) + { + if (!outfits.ContainsValue(outfit)) { return; }; + + outfits[outfit.Type.name].OnColorChanged -= PrepareRender; + + outfits.Remove(outfit.Type.name); + + ReassignMaterials(); + + + foreach (var id in meshes.Keys) { Render(id); } + } + + public void ReassignMaterials() + { + var outfitList = new List(outfits.Values.ToList()); + outfitList.Sort((a, b) => b.materialPriority.CompareTo(a.materialPriority)); + + foreach (var key in allProperties) + { + var matList = new List(); + foreach (var o in outfitList) + { + var fullKey = key; + if (!meshes.ContainsKey(fullKey)) return; + if (!meshes[fullKey]) return; + + + if (materials[fullKey].ContainsKey(o.Type.name)) + { + matList.Add(materials[fullKey][o.Type.name]); + meshes[fullKey].sharedMaterials = matList.ToArray(); + if (key.Contains("MainTexture")) o.SetControlMaterial(meshes[fullKey], matList.Count - 1); + o.UpdateMaterialBlock(); + } + for (int i = 0; i < meshes[fullKey].sharedMaterials.Length; i++) + { + meshes[fullKey].sharedMaterials[i].renderQueue = 1000 + i; + } + } + } + } + + public void Remove() + { + locked = true; + Clean(); + cam.targetTexture = null; + Destroy(parent.gameObject); + Destroy(proxySystem.gameObject); + foreach (var item in meshes.Values) + { + Destroy(item.gameObject); + } + } + + public void Clean() + { + masterMaterials.Clear(); + unpackedMaterials.Clear(); + + foreach (var key in materials.Keys) + { + foreach (var value in materials[key].Values) + { + Destroy(value); + } + } + materials.Clear(); + + properties.Clear(); + allProperties.Clear(); + SubIDs.Clear(); + rts.Clear(); // Don't release them since objects still use them + + foreach (var mesh in meshes.Values) + { + Destroy(mesh); + } + meshes.Clear(); + + //if (outfitSystem) Destroy(outfitSystem.gameObject); + outfitSystem = null; + } + + public void Organize(int x) + { + parent.position = new Vector3(10 * x, -5000, 0); + return; + var index = 0; + } + + public void PrepareRender(Outfit outfit) + { + var id = outfit.materialIndex + outfit.Type.name + "MainTexture"; + if (rts.ContainsKey(id)) + { + Render(id); + } + else + { + id = id.Replace(outfit.Type.name, ""); + Render(id); + } + } + + public void PrepareRender() + { + Render(); + } + + public async void Render(string id = "", bool force = false) + { + if (!cam) return; + if (outfitSystem?.isloading == true) + { + if (id != "") renderQueue.Add(id); + return; + } + + + if (locked) return; + + + renderCooldown = true; + + if (rts.ContainsKey(id)) + { + + var activeRT = RenderTexture.active; + RenderTexture.active = rts[id]; + GL.Clear(true, true, Color.clear); + RenderTexture.active = activeRT; + + + cam.targetTexture = rts[id]; + var meshPos = meshes[id].transform.position; + cam.transform.position = new Vector3(meshPos.x, meshPos.y, meshPos.z - 1); + cam.Render(); + + } + + renderCooldown = false; + + if (renderQueue.Count != 0) + { + id = renderQueue.First(); + renderQueue.Remove(id); + Render(id); + } + } + + public List GetMaterials() + { + var list = new List(); + list.AddRange(masterMaterials.Values.ToList()); + list.AddRange(unpackedMaterials.Values.ToList()); + + foreach (var item in list) + { + item.name = item.name.Replace("-1", ""); + } + + return list; + } + } + } + + struct DecalPositions + { + public Vector3 pos; + public Vector3 rot; + public Vector3 scale; + } + } +} + + diff --git a/Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/BoZo_TextureBuilder.cs.meta b/Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/BoZo_TextureBuilder.cs.meta new file mode 100644 index 00000000..4969f8a7 --- /dev/null +++ b/Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/BoZo_TextureBuilder.cs.meta @@ -0,0 +1,18 @@ +fileFormatVersion: 2 +guid: e02341f36802a0b42af4552f74adf30c +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: +AssetOrigin: + serializedVersion: 1 + productId: 323550 + packageName: 'BoZo: Modular Anime Characters - Base Pack' + packageVersion: 1.8.6 + assetPath: Assets/BoZo_ModularAnimeCharacters/Scripts/CharacterCreator/BoZo_TextureBuilder.cs + uploadId: 917032 diff --git a/Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/BodyShapeSliders.cs b/Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/BodyShapeSliders.cs new file mode 100644 index 00000000..8da055e9 --- /dev/null +++ b/Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/BodyShapeSliders.cs @@ -0,0 +1,117 @@ +using UnityEngine; +using UnityEngine.UI; +using TMPro; + +namespace Bozo.AnimeCharacters +{ + public class BodyShapeSliders : MonoBehaviour + { + private OutfitSystem system; + private BodyShapeModifier bodyShape; + [SerializeField] TMP_Text title; + [SerializeField] Transform scaleContainer; + [SerializeField] Slider scaleSlider; + [SerializeField] Slider xScaleSlider; + [SerializeField] Slider yScaleSlider; + [SerializeField] Slider zScaleSlider; + + [SerializeField] Transform positionContainer; + [SerializeField] Slider xPositionSlider; + [SerializeField] Slider yPositionSlider; + [SerializeField] Slider zPositionSlider; + + [SerializeField] Transform rotationContainer; + [SerializeField] Slider rotationSlider; + + private void Start() + { + if(system != null && bodyShape != null) + { + Init(system, bodyShape); + } + } + + public void Init(OutfitSystem system, BodyShapeModifier mod) + { + this.system = system; + bodyShape = mod; + title.text = mod.shapeName; + + if (bodyShape.useScale) + { + if (bodyShape.linkScaleAxis) + { + xScaleSlider.transform.parent.gameObject.SetActive(false); + yScaleSlider.transform.parent.gameObject.SetActive(false); + zScaleSlider.transform.parent.gameObject.SetActive(false); + } + else + { + if (!bodyShape.useXScale) xScaleSlider.transform.parent.gameObject.SetActive(false); + if (!bodyShape.useYScale) yScaleSlider.transform.parent.gameObject.SetActive(false); + if (!bodyShape.useZScale) zScaleSlider.transform.parent.gameObject.SetActive(false); + scaleSlider.transform.parent.gameObject.SetActive(false); + scaleSlider.onValueChanged.AddListener(SetScale); + } + scaleSlider.onValueChanged.AddListener(SetScale); + xScaleSlider.onValueChanged.AddListener(SetScale); + yScaleSlider.onValueChanged.AddListener(SetScale); + zScaleSlider.onValueChanged.AddListener(SetScale); + + scaleSlider.minValue = bodyShape.scaleRange.x; scaleSlider.maxValue = bodyShape.scaleRange.y; + xScaleSlider.minValue = bodyShape.scaleRange.x; xScaleSlider.maxValue = bodyShape.scaleRange.y; + yScaleSlider.minValue = bodyShape.scaleRange.x; yScaleSlider.maxValue = bodyShape.scaleRange.y; + zScaleSlider.minValue = bodyShape.scaleRange.x; zScaleSlider.maxValue = bodyShape.scaleRange.y; + } + else + { + scaleContainer.gameObject.SetActive(false); + } + + if (bodyShape.usePosition) + { + if (!bodyShape.useXPos) xPositionSlider.transform.parent.gameObject.SetActive(false); + if (!bodyShape.useYPos) yPositionSlider.transform.parent.gameObject.SetActive(false); + if (!bodyShape.useZPos) zPositionSlider.transform.parent.gameObject.SetActive(false); + + xPositionSlider.minValue = bodyShape.posRange.x; xPositionSlider.maxValue = bodyShape.posRange.y; + yPositionSlider.minValue = bodyShape.posRange.x; yPositionSlider.maxValue = bodyShape.posRange.y; + zPositionSlider.minValue = bodyShape.posRange.x; zPositionSlider.maxValue = bodyShape.posRange.y; + + xPositionSlider.onValueChanged.AddListener(SetPosition); + yPositionSlider.onValueChanged.AddListener(SetPosition); + zPositionSlider.onValueChanged.AddListener(SetPosition); + } + else + { + positionContainer.gameObject.SetActive(false); + } + + if (bodyShape.useRotation) + { + rotationSlider.onValueChanged.AddListener(SetRotation); + rotationSlider.minValue = bodyShape.rotRange.x; rotationSlider.maxValue = bodyShape.rotRange.y; + } + else + { + rotationContainer.gameObject.SetActive(false); + } + } + + public void SetScale(float v) + { + bodyShape.SetScale(xScaleSlider.value, yScaleSlider.value, zScaleSlider.value, scaleSlider.value); + } + + public void SetPosition(float v) + { + bodyShape.SetPosition(xPositionSlider.value, yPositionSlider.value, zPositionSlider.value); + } + + public void SetRotation(float v) + { + bodyShape.SetRotation(rotationSlider.value); + } + } + +} diff --git a/Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/BodyShapeSliders.cs.meta b/Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/BodyShapeSliders.cs.meta new file mode 100644 index 00000000..fbde3fa5 --- /dev/null +++ b/Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/BodyShapeSliders.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 5e1babcebe207f94b9aa4a53a2626694 +AssetOrigin: + serializedVersion: 1 + productId: 323550 + packageName: 'BoZo: Modular Anime Characters - Base Pack' + packageVersion: 1.8.6 + assetPath: Assets/BoZo_ModularAnimeCharacters/Scripts/CharacterCreator/BodyShapeSliders.cs + uploadId: 917032 diff --git a/Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/CameraController.cs b/Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/CameraController.cs new file mode 100644 index 00000000..325cfaf4 --- /dev/null +++ b/Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/CameraController.cs @@ -0,0 +1,136 @@ +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.EventSystems; +using UnityEngine.UI; + +#if ENABLE_INPUT_SYSTEM +using UnityEngine.InputSystem; +#endif + +namespace Bozo.AnimeCharacters +{ + public class CameraController : MonoBehaviour + { + Camera cam; + float position; + public float scrollSpeed; + public Transform startPosition; + public Transform endPosition; + public Vector2 fov; + public Slider slider; + + public float tweenSpeed; + + float tweenTimer; + float currentPosition; + float targetPosition; + + [SerializeField] CameraPositions[] cameraPositions; + Dictionary camPos = new Dictionary(); + + +#if ENABLE_INPUT_SYSTEM + [SerializeField] private InputActionReference zoomAction; +#endif + + + private void Awake() + { + cam = Camera.main; + foreach (var item in cameraPositions) + { + camPos.Add(item.type, item); + } + } + +#if ENABLE_INPUT_SYSTEM + private void OnEnable() + { + if (zoomAction != null) + zoomAction.action.Enable(); + } + + private void OnDisable() + { + if (zoomAction != null) + zoomAction.action.Disable(); + } +#endif + + private void Update() + { + float scrollInput = 0f; + +#if ENABLE_INPUT_SYSTEM + if (zoomAction != null) + { + scrollInput = zoomAction.action.ReadValue().y; + } +#else + scrollInput = Input.GetAxis("Mouse ScrollWheel"); +#endif + + + if (scrollInput > 0f) + { + position += scrollSpeed; + tweenTimer = -1; + } + else if (scrollInput < 0f) + { + position -= scrollSpeed; + tweenTimer = -1; + } + + slider.value = position; + position = Mathf.Clamp(position, 0, 1); + + if (tweenTimer >= 0) + { + position = Mathf.Lerp(targetPosition, currentPosition, tweenTimer); + tweenTimer -= Time.deltaTime * tweenSpeed; + } + + cam.transform.position = Vector3.Lerp(startPosition.position, endPosition.position, position); + cam.transform.rotation = Quaternion.Lerp(startPosition.rotation, endPosition.rotation, position); + cam.fieldOfView = Mathf.Lerp(fov.x, fov.y, position); + } + + public void SetPosition(float value) + { + position = value; + } + + public void tweenPosition(float value) + { + tweenTimer = 1; + targetPosition = value; + currentPosition = position; + } + + public void TweenPosition(OutfitType type) + { + CameraPositions settings = null; + if (!camPos.TryGetValue(type, out settings)) { settings = cameraPositions[0]; } + startPosition = settings.ZoomOutPos; + endPosition = settings.ZoomInPos; + fov.x = settings.fovOut; + fov.y = settings.fovIn; + + tweenTimer = 1; + targetPosition = settings.startingPosition; + currentPosition = position; + } + + [System.Serializable] + private class CameraPositions + { + public OutfitType type; + public Transform ZoomOutPos; + public Transform ZoomInPos; + public float fovOut; + public float fovIn; + public float startingPosition; + } + } +} diff --git a/Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/CameraController.cs.meta b/Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/CameraController.cs.meta new file mode 100644 index 00000000..9bd6add1 --- /dev/null +++ b/Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/CameraController.cs.meta @@ -0,0 +1,18 @@ +fileFormatVersion: 2 +guid: 8de4c66bd7f475d4faab94d46d62a3f6 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: +AssetOrigin: + serializedVersion: 1 + productId: 323550 + packageName: 'BoZo: Modular Anime Characters - Base Pack' + packageVersion: 1.8.6 + assetPath: Assets/BoZo_ModularAnimeCharacters/Scripts/CharacterCreator/CameraController.cs + uploadId: 917032 diff --git a/Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/CameraUpdate.cs b/Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/CameraUpdate.cs new file mode 100644 index 00000000..22551416 --- /dev/null +++ b/Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/CameraUpdate.cs @@ -0,0 +1,21 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +public class CameraUpdate : MonoBehaviour +{ + + public Camera cam; + public float renderSpeed = 1; + public float timer; + + void Update() + { + timer -= Time.deltaTime; + if (timer <= 0) + { + cam.Render(); + timer = renderSpeed; + } + } +} diff --git a/Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/CameraUpdate.cs.meta b/Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/CameraUpdate.cs.meta new file mode 100644 index 00000000..249a6980 --- /dev/null +++ b/Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/CameraUpdate.cs.meta @@ -0,0 +1,18 @@ +fileFormatVersion: 2 +guid: d57a185797be28247a7cb183089897ab +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: +AssetOrigin: + serializedVersion: 1 + productId: 323550 + packageName: 'BoZo: Modular Anime Characters - Base Pack' + packageVersion: 1.8.6 + assetPath: Assets/BoZo_ModularAnimeCharacters/Scripts/CharacterCreator/CameraUpdate.cs + uploadId: 917032 diff --git a/Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/CharacterCreator.cs b/Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/CharacterCreator.cs new file mode 100644 index 00000000..f422957c --- /dev/null +++ b/Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/CharacterCreator.cs @@ -0,0 +1,492 @@ +using System; +using System.Collections.Generic; +using UnityEngine; +using UnityEditor; +using System.Collections; +using TMPro; +using System.Linq; +using UnityEngine.Events; + + +namespace Bozo.AnimeCharacters +{ + public class CharacterCreator : MonoBehaviour + { + [Header("Creator Dependencies")] + public OutfitSystem character; + public ColorPickerControl colorPickerControl; + public DecalController decalController; + [SerializeField] CharacterSpinner Spinner; + [SerializeField] Camera iconCamera; + [SerializeField] RenderTexture iconTexture; + public OutfitType[] outfitTypes; + + [Header("Outfit Dependencies")] + private Dictionary OutfitDataBase = new Dictionary(); + [SerializeField] OutfitSelector outfitSelectorObject; + private List outfitSelectors = new List(); + [SerializeField] Transform outfitContainer; + + [Header("Texture Dependencies")] + [SerializeField] TextureSelector textureSelectorObject; + private List textureSelectors = new List(); + [SerializeField] Transform decalContainer; + [SerializeField] Transform patternContainer; + + [Header("BodyShape Dependencies")] + [SerializeField] BlendSlider blendSliderObject; + private List blendSliders = new List(); + private List faceBlendSliders = new List(); + + [SerializeField] BodyShapeSliders modSliderObject; + private List ModSliders = new List(); + + [SerializeField] Transform bodyShapeContainer; + [SerializeField] Transform bodyModContainer; + [SerializeField] Transform faceShapeContainer; + [SerializeField] Transform faceModContainer; + + [SerializeField] GameObject currentPage; + private GameObject previousPage; + + private Dictionary> outfits = new Dictionary>(); + private List textures = new List(); + + [Header("Save Dependencies")] + [SerializeField] SaveSelector saveSelector; + [SerializeField] Dictionary saveSlots = new Dictionary(); + [SerializeField] Transform saveContainer; + [SerializeField] GameObject DeleteConfirmWindow; + [SerializeField] TMP_Text loadedCharacterNameText; + [SerializeField] TMP_Text DeleteCharacterNameText; + [SerializeField] OutfitVisibilityToggler visibilityToggler; + + //Events + public UnityAction onCategoryChanged; + + + public OutfitType type; + + [Header("Save Options")] + public TMP_InputField CharacterName; + + private void Awake() + { + outfits.Clear(); + OutfitDataBase.Clear(); + + var ob = Resources.LoadAll(""); + var textureObjects = Resources.LoadAll(""); + foreach (var item in ob) + { + if (!item.showCharacterCreator) continue; + + if (OutfitDataBase.ContainsKey(item.name)) + { + Debug.LogWarning($"Outfit: {item.name} has already been added, you may have a duplicate outfit in your project"); + } + else + { + OutfitDataBase.Add(item.name, item.GetComponent()); + } + + } + foreach (var item in textureObjects) + { + textures.Add(item.GetComponent()); + } + + GenerateOutfitSelection(); + GenerateTextureSelection(); + } + + private void OnEnable() + { + character.OnOutfitChanged += OnOutfitUpdate; + character.OnRigChanged += OnRigUpdate; + } + + private void OnDisable() + { + character.OnOutfitChanged -= OnOutfitUpdate; + character.OnRigChanged -= OnRigUpdate; + } + + public void Start() + { + GetBodyBlends(); + GetFaceBlends(); + GetBodyMods(); + SwitchCatagory("Top"); + + UpdateCharacterSaves(); + + } + + public void GenerateOutfitSelection() + { + var outfits = OutfitDataBase.Values.ToArray(); + foreach (var item in outfits) + { + var selector = Instantiate(outfitSelectorObject, outfitContainer); + selector.Init(item, this); + outfitSelectors.Add(selector); + } + } + + public void GenerateTextureSelection() + { + foreach (var item in textures) + { + Transform container = null; + + if (item.type == TextureType.Decal) container = decalContainer; + if (item.type == TextureType.Pattern) container = patternContainer; + + var selector = Instantiate(textureSelectorObject, container); + selector.Init(item, this); + textureSelectors.Add(selector); + } + } + + public void GetBodyBlends() + { + for (int i = 0; i < blendSliders.Count; i++) + { + Destroy(blendSliders[i].gameObject); + } + blendSliders.Clear(); + + var shapes = character.GetShapes(); + foreach (var item in shapes) + { + var blendSlider = Instantiate(blendSliderObject, bodyShapeContainer); + blendSlider.Init(character, item); + blendSliders.Add(blendSlider); + } + } + + public void GetFaceBlends() + { + for (int i = 0; i < faceBlendSliders.Count; i++) + { + Destroy(faceBlendSliders[i].gameObject); + } + faceBlendSliders.Clear(); + + var shapes = character.GetFaceShapes(); + foreach (var item in shapes) + { + var blendSlider = Instantiate(blendSliderObject, faceShapeContainer); + blendSlider.Init(character, item); + faceBlendSliders.Add(blendSlider); + } + } + + public void GetBodyMods() + { + var mods = character.GetMods().Values.ToList(); + + for (int i = 0; i < ModSliders.Count; i++) + { + Destroy(ModSliders[i].gameObject); + } + ModSliders.Clear(); + + var container = bodyShapeContainer; + foreach (var item in mods) + { + if (item.sorting == "Head") container = faceModContainer; + else container = bodyModContainer; + var blendSlider = Instantiate(modSliderObject, container); + blendSlider.Init(character, item); + ModSliders.Add(blendSlider); + } + } + + public void UpdateCharacterSaves() + { + var saves = saveSlots.Values.ToArray(); + foreach (var item in saves) + { + Destroy(item.gameObject); + } + saveSlots.Clear(); + + if (!System.IO.Directory.Exists(BMAC_SaveSystem.filePath)) + { + System.IO.Directory.CreateDirectory(BMAC_SaveSystem.filePath); + System.IO.Directory.CreateDirectory(BMAC_SaveSystem.iconFilePath); + print("Created Save JSON save Location At: " + BMAC_SaveSystem.filePath); + } + + string path = BMAC_SaveSystem.filePath; + string[] jsonFiles = System.IO.Directory.GetFiles(path, "*.json"); + string[] icons = System.IO.Directory.GetFiles(BMAC_SaveSystem.iconFilePath, "*.png"); + + for (int i = 0; i < jsonFiles.Length; i++) + { + var json = System.IO.File.ReadAllText(jsonFiles[i]); + var data = JsonUtility.FromJson(json); + var image = System.IO.File.ReadAllBytes(icons[i]); + var texture = new Texture2D(2, 2); + Sprite icon = null; + if (texture.LoadImage(image)) + { + icon = Sprite.Create(texture, new Rect(0, 0, texture.width, texture.height), new Vector2(0.5f, 0.5f)); + } + + var selector = Instantiate(saveSelector, saveContainer); + selector.Init(data, icon, this); + saveSlots.Add(data.characterName, selector); + } + + var saveObjects = Resources.LoadAll(""); + + for (int i = 0; i < saveObjects.Length; i++) + { + var ob = saveObjects[i]; + if (saveSlots.ContainsKey(ob.data.characterName)) + { + continue; + } + else + { + var selector = Instantiate(saveSelector, saveContainer); + Sprite icon = null; + if (ob.icon != null) + { + icon = Sprite.Create(ob.icon, new Rect(0, 0, ob.icon.width, ob.icon.height), new Vector2(0.5f, 0.5f)); + } + selector.Init(ob.data, icon, this); + saveSlots.Add(ob.data.characterName, selector); + } + } + } + public void OpenPage(GameObject page) + { + currentPage.SetActive(false); + previousPage = currentPage; + currentPage = page; + currentPage.SetActive(true); + } + + public void BackPage() + { + currentPage.SetActive(false); + currentPage = previousPage; + currentPage.SetActive(true); + colorPickerControl.RemoveObject(); + } + + public void SetOutfit(Outfit outfit) + { + var inst = Instantiate(outfit, character.transform); + SetColorPickerObject(inst); + SwitchTextureCatagory(outfit.TextureCatagory); + type = outfit.Type; + + // var type = (OutfitType)Enum.Parse(typeof(OutfitType), catagory); + } + + public void OnOutfitUpdate(Outfit outfit) + { + visibilityToggler.Set(outfit); + + if (outfit == null) return; + if (outfit.Type.name == "Head") + { + GetFaceBlends(); + } + if (outfit.Type.name == "Body") + { + GetBodyBlends(); + } + } + + public void OnRigUpdate(SkinnedMeshRenderer rig) + { + //GetBodyBlends(); + GetBodyMods(); + } + + public void SetOutfitDecal(Texture texture, Color[] colors = null) + { + if (!colorPickerControl.colorObject) return; + colorPickerControl.colorObject.SetDecal(texture); + } + public void SetOutfitPattern(Texture texture, Color[] colors = null) + { + if (!colorPickerControl.colorObject) return; + colorPickerControl.colorObject.SetPattern(texture); + } + + public void RemoveOutfit() + { + if (type == null) return; + character.RemoveOutfit(type, true); + colorPickerControl.RemoveObject(); + } + + public void RemoveOutfitDecal() + { + if (!colorPickerControl.colorObject) return; + colorPickerControl.colorObject.SetDecal(null); + } + + public void RemoveOutfitPattern() + { + if (!colorPickerControl.colorObject) return; + colorPickerControl.colorObject.SetPattern(null); + } + + + public void SwitchCatagory(string catagory) + { + foreach (var item in outfitSelectors) + { + item.SetVisable(catagory); + } + + var outfit = character.GetOutfit(catagory); + + SetColorPickerObject(outfit); + visibilityToggler.Set(outfit); + + if (outfit == null) return; + + SwitchTextureCatagory(outfit.TextureCatagory); + type = outfit.Type; + onCategoryChanged?.Invoke(catagory); + } + + public void SwitchTextureCatagory(string catagory) + { + if (catagory == "") + { + catagory = "Outfit"; + } + + foreach (var item in textureSelectors) + { + item.SetVisable(catagory); + } + } + + public void SetColorPickerObject(string type) + { + var outfit = character.GetOutfit(type); + colorPickerControl.ChangeObject(outfit); + } + + public void SetColorPickerObject(Outfit outfit) + { + colorPickerControl.ChangeObject(outfit); + } + + public void ReplaceCharacter(OutfitSystem character) + { + Destroy(this.character.gameObject); + this.character = character; + Spinner.SetCharacter(character.transform); + } + + public void GetCurrentCatagory() + { + if (type == null) return; + SwitchCatagory(type.name); + } + + public void CopyColor(string copyTo) + { + var copyOutfit = character.GetOutfit((OutfitType)Enum.Parse(typeof(OutfitType), copyTo)); + colorPickerControl.CopyColor(copyOutfit); + } + + public void ToggleWalk(bool value) + { + character.animator.SetBool("isWalk", value); + } + + public void SaveCharacter() + { + StartCoroutine(Save()); + } + + public Outfit GetOutfit(string outfitName) + { + return OutfitDataBase[outfitName]; + } + + [ContextMenu("Save")] + private IEnumerator Save() + { + yield return new WaitForEndOfFrame(); + if (CharacterName.text.Length == 0) + { + Debug.LogWarning("Please enter in a name with at least one letter"); + yield break; + } + + RenderTexture.active = iconTexture; + Texture2D icon = new Texture2D(iconTexture.width, iconTexture.height, TextureFormat.RGBA32, false); + Rect rect = new Rect(new Rect(0, 0, iconTexture.width, iconTexture.height)); + icon.ReadPixels(rect, 0, 0); + icon.Apply(); + + byte[] bytes = icon.EncodeToPNG(); + + Texture2D characterIcon = null; + +#if UNITY_EDITOR + + System.IO.File.WriteAllBytes(Application.dataPath + BMAC_SaveSystem.iconAssetPath + CharacterName.text + ".png", bytes); + AssetDatabase.Refresh(); + + characterIcon = AssetDatabase.LoadAssetAtPath("Assets/" + BMAC_SaveSystem.iconAssetPath + CharacterName.text + ".png"); + print(BMAC_SaveSystem.iconAssetPath + CharacterName.text + ".png"); + TextureImporter importer = AssetImporter.GetAtPath("Assets/" + BMAC_SaveSystem.iconAssetPath + CharacterName.text + ".png") as TextureImporter; + + if (importer != null) + { + importer.textureType = TextureImporterType.Sprite; + importer.spriteImportMode = SpriteImportMode.Single; + importer.SaveAndReimport(); + } +#endif + + if (!System.IO.Directory.Exists(BMAC_SaveSystem.iconFilePath)) + { + System.IO.Directory.CreateDirectory(BMAC_SaveSystem.iconFilePath); + } + + System.IO.File.WriteAllBytes(BMAC_SaveSystem.iconFilePath + "/" + CharacterName.text + ".png", bytes); + BMAC_SaveSystem.SaveCharacter(character, CharacterName.text, characterIcon); + + UpdateCharacterSaves(); + + + } + + public void LoadCharacter(CharacterData data) + { + loadedCharacterNameText.text = data.characterName; + character.LoadCharacter(data); + } + + public void DeleteCharacter() + { + if (loadedCharacterNameText.text == "") return; + DeleteCharacterNameText.text = "Delete: " + loadedCharacterNameText.text; + DeleteConfirmWindow.SetActive(true); + } + + public void ConfirmDelete() + { + BMAC_SaveSystem.DeleteCharacter(loadedCharacterNameText.text); + loadedCharacterNameText.text = ""; + UpdateCharacterSaves(); + } + + } +} diff --git a/Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/CharacterCreator.cs.meta b/Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/CharacterCreator.cs.meta new file mode 100644 index 00000000..f6e3c80f --- /dev/null +++ b/Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/CharacterCreator.cs.meta @@ -0,0 +1,18 @@ +fileFormatVersion: 2 +guid: a7ff0168c5a8aae45abec3f8e5dc6957 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: +AssetOrigin: + serializedVersion: 1 + productId: 323550 + packageName: 'BoZo: Modular Anime Characters - Base Pack' + packageVersion: 1.8.6 + assetPath: Assets/BoZo_ModularAnimeCharacters/Scripts/CharacterCreator/CharacterCreator.cs + uploadId: 917032 diff --git a/Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/CharacterSpinner.cs b/Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/CharacterSpinner.cs new file mode 100644 index 00000000..86c7bc6b --- /dev/null +++ b/Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/CharacterSpinner.cs @@ -0,0 +1,75 @@ +using UnityEngine; +using UnityEngine.EventSystems; + + +namespace Bozo.AnimeCharacters +{ + public class CharacterSpinner : MonoBehaviour, IDragHandler, IPointerDownHandler, IPointerUpHandler + { + + + public float spinDir; + public Transform character; + private Animator anim; + float dizzyTimer = 1; + + bool spinning; + + public void SetCharacter(Transform character) + { + this.character = character; + anim = character.GetComponentInChildren(); + } + + public void OnDrag(PointerEventData eventData) + { + spinDir = -eventData.delta.x * 0.1f; + character.Rotate(0, spinDir, 0); + dizzyTimer = 0.5f; + } + + public void OnPointerDown(PointerEventData eventData) + { + spinning = true; + } + + public void OnPointerUp(PointerEventData eventData) + { + spinning = false; + OnDrag(eventData); + } + + private void Start() + { + SetCharacter(character); + } + + private void Update() + { + if (!anim) SetCharacter(character); + if (dizzyTimer <= 0) + { + if (spinDir >= 5 || spinDir <= -5) + { + anim.SetBool("Dizzy", true); + } + else + { + anim.SetBool("Dizzy", false); + } + } + + if (!spinning) + { + character.Rotate(0, spinDir, 0); + spinDir = Mathf.Lerp(spinDir, 0, Time.deltaTime); + dizzyTimer -= Time.deltaTime; + } + + + + } + + + } +} diff --git a/Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/CharacterSpinner.cs.meta b/Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/CharacterSpinner.cs.meta new file mode 100644 index 00000000..1146a7f2 --- /dev/null +++ b/Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/CharacterSpinner.cs.meta @@ -0,0 +1,18 @@ +fileFormatVersion: 2 +guid: 52defae866fd958429021f2e841897ff +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: +AssetOrigin: + serializedVersion: 1 + productId: 323550 + packageName: 'BoZo: Modular Anime Characters - Base Pack' + packageVersion: 1.8.6 + assetPath: Assets/BoZo_ModularAnimeCharacters/Scripts/CharacterCreator/CharacterSpinner.cs + uploadId: 917032 diff --git a/Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/ColorPickerControl.cs b/Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/ColorPickerControl.cs new file mode 100644 index 00000000..e6e8cc49 --- /dev/null +++ b/Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/ColorPickerControl.cs @@ -0,0 +1,606 @@ +using System; +using System.Collections.Generic; +using TMPro; +using UnityEngine; +using UnityEngine.UI; + + +namespace Bozo.AnimeCharacters +{ + public class ColorPickerControl : MonoBehaviour + { + [Header("Picker Dependencies")] + public CharacterCreator creator; + public SVImageControl svContoller; + [Header("Picker")] + public float currentHue; + public float currentSat; + public float currentVal; + public float currentColor; + + [SerializeField] private RawImage hueImage; + [SerializeField] private RawImage satValImage; + [SerializeField] private RawImage outputImage; + + [SerializeField] private Slider hueSlider; + + private Texture2D hueTexture; + private Texture2D svTexture; + private Texture2D outputTexture; + + public Outfit colorObject; + public OutfitType outfitType; + public Material colorMaterial; + public int MaterialSlot; + + [Header("Editor")] + + [SerializeField] OutfitSystem outfitSystem; + [SerializeField] TMP_Text objectName; + [SerializeField] TMP_Text channelText; + [SerializeField] Image Swatch; + + [SerializeField] TMP_Text CopyCatagoryText; + public List outfitTypes = new List(); + private int copyIndex; + + [SerializeField] TextureType mode = TextureType.Base; + [SerializeField] int currentChannel; + [SerializeField] int maxChannel; + [SerializeField] string[] channelNames; + + [Header("Decal Editor")] + [SerializeField] DecalController decalController; + [SerializeField] GameObject decalButton; + + + [Header("Pattern Editor")] + [SerializeField] GameObject patternContainer; + [SerializeField] GameObject patternButton; + [SerializeField] Slider patternXSlider; + [SerializeField] Slider patternYSlider; + private Vector2 outfitDefaultPatternSize; + + [Header("Swatch Editor")] + [SerializeField] GameObject swatchParentContainer; + [SerializeField] Transform swatchContainer; + [SerializeField] SwatchSelector swatchSelectorObject; + private List swatchSelectors = new List(); + + [Header("AdvancedEditor")] + [SerializeField] TMP_Text hexValueTex; + [SerializeField] List HeldColors = new List(); + [SerializeField] bool maintainColors; + [SerializeField] Toggle maintainColorsToggle; + [SerializeField] TMP_InputField inputR; + [SerializeField] TMP_InputField inputG; + [SerializeField] TMP_InputField inputB; + + [SerializeField] TMP_InputField inputH; + [SerializeField] TMP_InputField inputS; + [SerializeField] TMP_InputField inputV; + private Dictionary outfitPickerSettings = new Dictionary(); + + private void Awake() + { + CreateHueImage(); + CreateSVImage(); + CreateOutputImage(); + UpdateOutputImage(); + + foreach (var type in creator.outfitTypes) + { + outfitTypes.Add(type.name); + } + CopyCatagoryText.text = outfitTypes[0]; + if (colorObject == null) gameObject.SetActive(false); + } + + private void CreateHueImage() + { + hueTexture = new Texture2D(1, 16); + hueTexture.wrapMode = TextureWrapMode.Clamp; + hueTexture.name = "HueTexture"; + + for (int i = 0; i < hueTexture.height; i++) + { + hueTexture.SetPixel(0, i, Color.HSVToRGB((float)i / hueTexture.height, 1, 1)); + } + + hueTexture.Apply(); + + currentHue = 0; + hueImage.texture = hueTexture; + } + + private void CreateSVImage() + { + svTexture = new Texture2D(16, 16); + svTexture.wrapMode = TextureWrapMode.Clamp; + svTexture.name = "SVTexture"; + + for (int y = 0; y < svTexture.height; y++) + { + for (int x = 0; x < svTexture.width; x++) + { + svTexture.SetPixel(x, y, Color.HSVToRGB(currentHue, (float)x / svTexture.width, (float)y / svTexture.height)); + } + } + + svTexture.Apply(); + + currentSat = 0; + currentVal = 0; + satValImage.texture = svTexture; + } + + private void CreateOutputImage() + { + outputTexture = new Texture2D(1, 16); + outputTexture.wrapMode = TextureWrapMode.Clamp; + outputTexture.name = "OutputTexture"; + + Color currentColor = Color.HSVToRGB(currentHue, currentSat, currentVal); + + for (int i = 0; i < hueTexture.height; i++) + { + outputTexture.SetPixel(0, 1, currentColor); + } + + outputTexture.Apply(); + + currentHue = 0; + outputImage.texture = outputTexture; + } + + private void UpdateOutputImage() + { + Color currentColor = Color.HSVToRGB(currentHue, currentSat, currentVal); + + for (int i = 0; i < outputTexture.height; i++) + { + outputTexture.SetPixel(0, i, currentColor); + } + + //Updating RBG Input + inputR.text = ((int)(currentColor.r * 255f)).ToString(); + inputG.text = ((int)(currentColor.g * 255f)).ToString(); + inputB.text = ((int)(currentColor.b * 255f)).ToString(); + + //Updating HSV Input + inputH.text = (currentHue.ToString("F2")); + inputS.text = (currentSat.ToString("F2")); + inputV.text = (currentVal.ToString("F2")); + + //Updating Hex Input + string hexRGB = ColorUtility.ToHtmlStringRGB(currentColor); + hexValueTex.text = "#" + hexRGB; + + + outputTexture.Apply(); + + if (!colorObject) return; + + Swatch.color = currentColor; + SetColor(currentColor, currentChannel); + channelText.color = new Color(1 - currentVal, 1 - currentVal, 1 - currentVal, 1); + + var settings = outfitPickerSettings[colorObject.Type]; + SetMaintainColors(settings.maintainColors); + + svContoller.setPickerPosition(currentSat, currentVal); + } + + public void SetSV(float S, float V) + { + currentSat = S; + currentVal = V; + UpdateOutputImage(); + } + + public void SetHSV(float H, float S, float V) + { + currentHue = H; + currentSat = S; + currentVal = V; + UpdateOutputImage(); + } + + public void SetHSV() + { + float.TryParse(inputH.text, out currentHue); + float.TryParse(inputS.text, out currentSat); + float.TryParse(inputV.text, out currentVal); + UpdateOutputImage(); + } + + public void SetRGB() + { + byte r = 0; + byte.TryParse(inputR.text, out r); + byte g = 0; + byte.TryParse(inputG.text, out g); + byte b = 0; + byte.TryParse(inputB.text, out b); + + var color = new Color32(r, g, b, 255); + Color.RGBToHSV(color, out float h, out float s, out float v); + SetHSV(h, s, v); + } + + + public void UpdateSVImage() + { + currentHue = hueSlider.value; + + for (int y = 0; y < svTexture.height; y++) + { + for (int x = 0; x < svTexture.width; x++) + { + svTexture.SetPixel(x, y, Color.HSVToRGB(currentHue, (float)x / svTexture.width, (float)y / svTexture.height)); + + } + } + + svTexture.Apply(); + UpdateOutputImage(); + } + + private void SetColor(Color color, int channel) + { + switch (mode) + { + case TextureType.Base: + colorObject.SetColor(color, channel); + break; + case TextureType.Decal: + maxChannel = 3; + decalController.SetColor(color); + break; + case TextureType.Pattern: + maxChannel = 3; + colorObject.SetPatternColor(color, channel); + break; + + } + } + + public void SetPattern(Texture texture, Color[] colors, Vector2 maxScale) + { + SwitchMode("Pattern"); + colorObject.SetPattern(texture); + for (int i = 0; i < colors.Length; i++) { SetColor(colors[i], i + 1); } + + if (maxScale.x < 0) + { + patternXSlider.gameObject.SetActive(false); + patternXSlider.maxValue = 1; + patternXSlider.value = 1; + } + else + { + patternXSlider.gameObject.SetActive(true); + patternXSlider.maxValue = maxScale.x; + patternXSlider.value = 1; + } + + if (maxScale.y < 0) + { + patternYSlider.gameObject.SetActive(false); + patternYSlider.maxValue = 1; + patternYSlider.value = 1; + } + else + { + patternYSlider.gameObject.SetActive(true); + patternYSlider.maxValue = maxScale.y; + patternYSlider.value = 1; + } + + SetPatternSize(); + } + + public void ChangeSwatch(int value) + { + if (mode == TextureType.Decal) return; + currentChannel += value; + + if (currentChannel > maxChannel) { currentChannel = 1; } + if (currentChannel < 1) { currentChannel = maxChannel; }; + + Color swatchColor = Color.black; + + switch (mode) + { + case TextureType.Base: + swatchColor = colorObject.GetColor(currentChannel); + break; + case TextureType.Decal: + + break; + case TextureType.Pattern: + swatchColor = colorObject.GetPatternColor(currentChannel); + break; + default: + break; + } + + Swatch.color = swatchColor; + + SetChannelName(); + + Color.RGBToHSV(swatchColor, out float h, out float s, out float v); + hueSlider.value = h; + SetHSV(h, s, v); + UpdateSVImage(); + } + + public void ChangeObject(Outfit ob) + { + if (!ob) { RemoveObject(); return; } + var colorOutfit = ob.GetComponent(); + + //Keeping color of previous Outfit if turned on and type is the same + if (maintainColors && !colorOutfit.customShader && colorObject != null) + { + //HeldColors = colorObject.GetColors(); + if (colorOutfit.Type == outfitType) + { + for (int i = 0; i < HeldColors.Count; i++) + { + colorOutfit.SetColor(HeldColors[i], i + 1); + } + } + } + + //initalizing values + channelNames = new string[] { "Base" }; + outfitType = colorOutfit.Type; + mode = TextureType.Base; + colorObject = ob; + + //RememberSettings + if (!outfitPickerSettings.ContainsKey(colorOutfit.Type)) + { + var newSettings = new OutfitPickerSettings(); + outfitPickerSettings.Add(colorOutfit.Type, newSettings); + + } + var settings = outfitPickerSettings[colorOutfit.Type]; + SetMaintainColors(settings.maintainColors); + SetCopyIndex(settings.copyIndex); + + //Custom Shaders + if (colorObject.customShader == true) + { + patternContainer.SetActive(false); + swatchParentContainer.SetActive(true); + maxChannel = 1; + + foreach (var item in swatchSelectors) + { + Destroy(item.gameObject); + } + swatchSelectors.Clear(); + for (int i = 0; i < colorOutfit.outfitSwatches.Count; i++) + { + var swatch = Instantiate(swatchSelectorObject, swatchContainer); + swatch.Init(this, colorOutfit.outfitSwatches[i], i); + swatchSelectors.Add(swatch); + } + + } + //BoZo_Toon Shader + else + { + var color = colorObject.GetColor(1); + color.a = 1; + currentChannel = 1; + Swatch.color = color; + patternContainer.SetActive(true); + channelNames = colorOutfit.ColorChannels; + + if (colorOutfit) + { + maxChannel = colorOutfit.ColorChannels.Length; + if (!colorOutfit.supportPatterns) patternContainer.SetActive(false); + swatchParentContainer.SetActive(false); + } + else + { + maxChannel = 9; + } + + var patternSize = colorObject.GetPatternSize(); + patternXSlider.value = patternSize.x; + patternYSlider.value = patternSize.y; + } + + SetChannelName(); + + ChangeSwatch(0); + objectName.text = colorObject.OutfitName; + + decalButton.SetActive(colorObject.supportDecals); + patternButton.SetActive(colorObject.supportPatterns); + + decalController.gameObject.SetActive(false); + patternContainer.gameObject.SetActive(false); + + + if (colorObject == null) gameObject.SetActive(false); + else gameObject.SetActive(true); + + } + + public void SetPatternSize() + { + var scale = new Vector2(patternXSlider.value, patternYSlider.value); + colorObject.SetPatternSize(scale); + } + + public void RemoveObject() + { + colorObject = null; + SetMaintainColors(false); + gameObject.SetActive(false); + } + + public void SetBaseTexture(int textureIndex) + { + var outfit = colorObject.GetComponent(); + outfit.SetSwatch(textureIndex); + } + + public void SwitchMode(string mode) + { + var type = (TextureType)Enum.Parse(typeof(TextureType), mode); + this.mode = type; + + switch (this.mode) + { + case TextureType.Base: + ChangeObject(colorObject); + break; + case TextureType.Decal: + + maxChannel = 1; + channelText.text = "Decal"; + var decal = decalController.color; + decal.a = 1; + currentChannel = 1; + Swatch.color = decal; + break; + + case TextureType.Pattern: + maxChannel = 3; + channelText.text = "Pattern 1/" + maxChannel; + var pattern = colorObject.GetPatternColor(1); + pattern.a = 1; + currentChannel = 1; + Swatch.color = pattern; + break; + + } + } + + public void ChangeCopyIndex(int value) + { + copyIndex += value; + if (copyIndex > outfitTypes.Count - 1) + { + copyIndex = 0; + } + else if (copyIndex < 0) + { + copyIndex = outfitTypes.Count - 1; + } + CopyCatagoryText.text = outfitTypes[copyIndex]; + if (outfitType != null) + { + outfitPickerSettings[outfitType].copyIndex = copyIndex; + } + } + + public void SetCopyIndex(int value) + { + copyIndex = value; + CopyCatagoryText.text = outfitTypes[copyIndex]; + outfitPickerSettings[outfitType].copyIndex = copyIndex; + } + + public void CopyColor(Outfit copyOutfit) + { + var from = colorObject; + var to = copyOutfit; + + for (int i = 1; i < 9; i++) + { + to.SetColor(from.GetColor(i), i); + } + } + + public void CopyColor() + { + var from = colorObject; + var to = outfitSystem.GetOutfit(CopyCatagoryText.text); + + if (to == null) return; + + for (int i = 1; i < 9; i++) + { + to.SetColor(from.GetColor(i), i); + } + } + + public void SetColorByHex(string hex) + { + if (hex[0].ToString() != "#") + { + hex = "#" + hex; + } + + if (ColorUtility.TryParseHtmlString(hex, out Color hexColor)) + { + print(hexColor); + Color.RGBToHSV(hexColor, out float h, out float s, out float v); + SetHSV(h, s, v); + } + else + { + Debug.LogWarning("Invalid hex string!"); + } + } + + public void CopyHex() + { + GUIUtility.systemCopyBuffer = hexValueTex.text; + print("Copied HEX to Clipboard: " + hexValueTex.text); + } + + public void SetChannelName() + { + var channelName = ""; + + switch (mode) + { + case TextureType.Base: + if (colorObject.customShader) break; + if (currentChannel - 1 < channelNames.Length) + { + channelName = channelNames[currentChannel - 1]; + } + break; + case TextureType.Decal: + channelName = "Decal"; + break; + case TextureType.Pattern: + channelName = "Pattern"; + break; + + } + + channelText.text = channelName + " " + currentChannel + "/" + maxChannel; + } + + public void SetMaintainColors(bool value) + { + if (value && colorObject != null) + { + HeldColors = colorObject.GetColors(); + } + maintainColors = value; + maintainColorsToggle.isOn = maintainColors; + if (outfitType != null) + { + outfitPickerSettings[outfitType].maintainColors = maintainColors; + } + } + + private class OutfitPickerSettings + { + public bool maintainColors = false; + public int copyIndex = 0; + } + } +} diff --git a/Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/ColorPickerControl.cs.meta b/Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/ColorPickerControl.cs.meta new file mode 100644 index 00000000..860116e9 --- /dev/null +++ b/Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/ColorPickerControl.cs.meta @@ -0,0 +1,18 @@ +fileFormatVersion: 2 +guid: 6ad41dc542643ad4994079a3430133a5 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: +AssetOrigin: + serializedVersion: 1 + productId: 323550 + packageName: 'BoZo: Modular Anime Characters - Base Pack' + packageVersion: 1.8.6 + assetPath: Assets/BoZo_ModularAnimeCharacters/Scripts/CharacterCreator/ColorPickerControl.cs + uploadId: 917032 diff --git a/Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/Creator_BlendSlider.cs b/Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/Creator_BlendSlider.cs new file mode 100644 index 00000000..1a771845 --- /dev/null +++ b/Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/Creator_BlendSlider.cs @@ -0,0 +1,47 @@ +using UnityEngine; +using UnityEngine.UI; +using TMPro; + + +namespace Bozo.AnimeCharacters +{ + public class BlendSlider : MonoBehaviour + { + Slider slider; + [SerializeField] TMP_Text title; + [SerializeField] TMP_Text sliderValue; + + [SerializeField] OutfitSystem system; + [SerializeField] string shape; + + public void Init(OutfitSystem system, string key) + { + slider = GetComponentInChildren(); + slider.onValueChanged.AddListener(Apply); + + this.system = system; + title.text = key; + shape = key; + var weight = system.GetShapeValue(key); + slider.value = weight; + + } + + private void OnEnable() + { + var weight = system.GetShapeValue(shape); + slider.value = weight; + } + + private void UpdateSlider() + { + + } + + public void Apply(float value) + { + system.SetShape(shape, value); + sliderValue.text = $"{slider.value}%"; + } + } +} diff --git a/Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/Creator_BlendSlider.cs.meta b/Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/Creator_BlendSlider.cs.meta new file mode 100644 index 00000000..8df0099d --- /dev/null +++ b/Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/Creator_BlendSlider.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: bf57ed88aed245749b3cc66844288e5b +AssetOrigin: + serializedVersion: 1 + productId: 323550 + packageName: 'BoZo: Modular Anime Characters - Base Pack' + packageVersion: 1.8.6 + assetPath: Assets/BoZo_ModularAnimeCharacters/Scripts/CharacterCreator/Creator_BlendSlider.cs + uploadId: 917032 diff --git a/Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/DecalBaker.cs b/Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/DecalBaker.cs new file mode 100644 index 00000000..27e96ecb --- /dev/null +++ b/Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/DecalBaker.cs @@ -0,0 +1,299 @@ + +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.Events; + +namespace Bozo.AnimeCharacters +{ + public class DecalBaker : MonoBehaviour + { + public OutfitSystem system; + public Outfit sourceOutfit; + public Outfit outfit; + + public List anchorProjector = new List(); + public List axisProjector = new List(); + public List oriProjector = new List(); + public List decalProjector = new List(); + + public List materials = new List(); + + public Vector3 postion; + public Quaternion rotation; + public Vector3 scale; + + public Dictionary bones; + + public string parent; + public List decals = new List(); + public int index; + + public List decalDatas = new List(); + + public bool debug = true; + + public UnityAction onDecalChanged; + + + public void Init(Outfit source, Outfit control, OutfitSystem system) + { + this.system = system; + sourceOutfit = source; + outfit = control; + + + system.OnShapeChanged += UpdateShape; + system.OnOutfitRemoved += Remove; + } + + private void Start() + { + if (sourceOutfit == null) return; + for (int i = 0; i < sourceOutfit.decalDatas.Count; i++) + { + AddDecal(); + } + + decalDatas = sourceOutfit.decalDatas; + + for (int i = 0; i < sourceOutfit.decalDatas.Count; i++) + { + var data = sourceOutfit.decalDatas[i]; + var decal = Resources.Load("Decal/" + data.decal); + SetDecal(decal, i); + + SetPosition(data, i); + } + } + + public void UpdateShape(string key, float value) + { + outfit.SetShape(key, value); + onDecalChanged?.Invoke(outfit); + } + + public void SetDecal(Texture texture, int index = 0) + { + if (decalDatas.Count == 0) return; + decals[index] = texture; + outfit.skinnedRenderer.sharedMaterials[index].mainTexture = texture; + } + + public void SetPosition(DecalData data, int index = 0) + { + if (decalDatas.Count == 0) return; + if (decalDatas.Count == 0) decalDatas.Add(new DecalData()); + decalDatas[index] = data; + this.index = index; + SetParent(data.parent); + + + if (data.parent.EndsWith("_r")) data.pos.z = -data.pos.z; + decalProjector[index].localPosition = new Vector3(data.pos.x, data.pos.y, data.pos.z); + decalProjector[index].localRotation = Quaternion.AngleAxis(data.roll, Vector3.forward); + decalProjector[index].localScale = new Vector3(data.scale, data.scale, 0.15f); + + var dir = Vector3.one; + if (parent == "head") dir = new Vector3(data.pitch, data.yaw); + else dir = new Vector3(data.yaw, 0, data.pitch); + axisProjector[index].localRotation = Quaternion.Euler(dir); + + Matrix4x4 inverseMat = decalProjector[index].worldToLocalMatrix; + outfit.skinnedRenderer.sharedMaterials[index].SetMatrix("_DecalInverseMatrix", inverseMat); + outfit.skinnedRenderer.sharedMaterials[index].SetColor("_Color", data.color); + + sourceOutfit.decalDatas = decalDatas; + onDecalChanged?.Invoke(outfit); + } + + public void SetParent(string boneName) + { + anchorProjector[index].localScale = Vector3.one; + + parent = boneName; + + oriProjector[index].SetLocalPositionAndRotation(Vector3.zero, Quaternion.identity); + axisProjector[index].SetLocalPositionAndRotation(Vector3.zero, Quaternion.identity); + decalProjector[index].SetLocalPositionAndRotation(Vector3.zero, Quaternion.identity); + anchorProjector[index].SetLocalPositionAndRotation(Vector3.zero, Quaternion.identity); + + + Transform bone = bones[boneName]; + anchorProjector[index].parent = bone; + anchorProjector[index].SetLocalPositionAndRotation(Vector3.zero, Quaternion.identity); + anchorProjector[index].localScale = Vector3.one; + + Vector3 direction = decalProjector[index].up; + if (boneName.EndsWith("_r")) direction = -direction; + if (parent == "head") direction = -Vector3.forward; + + oriProjector[index].position = bone.position + (-direction * 0.05f); + oriProjector[index].LookAt(anchorProjector[index]); + } + + public void SetBoundsPosition(Vector3 pos) + { + if(outfit.skinnedRenderers== null) + { + outfit.skinnedRenderers = GetComponentsInChildren(); + } + + foreach (var item in outfit.skinnedRenderers) + { + var bounds = item.localBounds; + bounds.center = new Vector3(0, 0, pos.z * 2); + bounds.extents += new Vector3(0.5f, 0.5f, 0.5f); + item.localBounds = bounds; + } + } + + public void Remove(Outfit outfit) + { + if (outfit == null) return; + if (outfit.Type == sourceOutfit.Type) + { + if (gameObject) Destroy(gameObject); + } + } + + public void AddDecal() + { + var h = GetComponentInChildren(); + if(h) Destroy(h); + + anchorProjector.Add(new GameObject("Anchor" + decalProjector.Count).transform); + axisProjector.Add(new GameObject("Anchor Axis" + axisProjector.Count).transform); + + oriProjector.Add(new GameObject("Projector Orientation" + oriProjector.Count).transform); + decalProjector.Add(new GameObject("Projector Decal" + decalProjector.Count).transform); + + decalProjector[decalProjector.Count - 1].parent = oriProjector[oriProjector.Count - 1]; + oriProjector[oriProjector.Count - 1].parent = axisProjector[axisProjector.Count - 1]; + axisProjector[axisProjector.Count - 1].parent = anchorProjector[anchorProjector.Count - 1]; + anchorProjector[anchorProjector.Count - 1].parent = transform; + + Texture decal = null; + if (decals.Count != 0) decal = decals[decals.Count - 1]; + decals.Add(null); + + var data = new DecalData(); + data.color = Color.white; + if (decalDatas.Count != 0) data = decalDatas[decalDatas.Count - 1]; + decalDatas.Add(data); + + var decalMat = new Material(Shader.Find("Hidden/BoZo_DecalProjector")); + materials.Add(decalMat); + foreach (var item in outfit.skinnedRenderers) + { + item.sharedMaterials = materials.ToArray(); + item.gameObject.SetActive(true); + } + + + onDecalChanged?.Invoke(outfit); + + } + + public void RemoveDecal() + { + if (materials.Count == 0) return; + + Destroy(anchorProjector[anchorProjector.Count - 1].gameObject); + + anchorProjector.RemoveAt(anchorProjector.Count - 1); + axisProjector.RemoveAt(axisProjector.Count - 1); + oriProjector.RemoveAt(oriProjector.Count - 1); + decalProjector.RemoveAt(decalProjector.Count - 1); + + Destroy(materials[materials.Count - 1]); + materials.RemoveAt(materials.Count - 1); + + decals.RemoveAt(decals.Count - 1); + decalDatas.RemoveAt(decalDatas.Count - 1); + + foreach (var item in outfit.skinnedRenderers) { item.sharedMaterials = materials.ToArray(); } + + onDecalChanged?.Invoke(outfit); + } + + private void OnDestroy() + { + system.OnShapeChanged -= UpdateShape; + system.OnOutfitRemoved -= Remove; + onDecalChanged?.Invoke(outfit); + foreach (var item in anchorProjector) + { + Destroy(item.gameObject); + } + } + + void OnDrawGizmos() + { + if (!debug) return; + if (decalDatas.Count == 0) return; + if (outfit.skinnedRenderer == null) return; + + Gizmos.color = new Color(1, 0, 0, 0.05f); // Transparent red + Gizmos.DrawMesh(outfit.skinnedRenderer.sharedMesh, transform.position, transform.rotation, transform.lossyScale); + + // You can also draw the wireframe to see the UV islands better + Gizmos.DrawWireMesh(outfit.skinnedRenderer.sharedMesh, transform.position, transform.rotation, transform.lossyScale); + + // Apply the object's transform to the Gizmo drawing space + Gizmos.matrix = decalProjector[index].localToWorldMatrix; + + // Draw a semi-transparent red cube + Gizmos.color = Color.cyan; + Gizmos.DrawCube(Vector3.zero, Vector3.one); + + // Draw a solid wireframe border so it's easier to see + Gizmos.color = Color.green; + Gizmos.DrawWireCube(Vector3.zero, Vector3.one); + + // 3. Draw the "Forward" Arrow (Z-Axis) + Gizmos.color = Color.blue; // Standard color for Z/Forward + Vector3 direction = Vector3.forward * 1; + + // Draw the main stem of the arrow + Gizmos.DrawRay(Vector3.zero, direction); + + // Draw simple arrow "head" (two small lines at the tip) + Vector3 right = (Vector3.back + Vector3.right).normalized * 0.3f; + Vector3 left = (Vector3.back + Vector3.left).normalized * 0.3f; + + Gizmos.DrawRay(direction, right); + Gizmos.DrawRay(direction, left); + } + + + public enum BoneAxis { Right, Left, Up, Down, Forward, Backward } + + private Vector3 GetTransformVector(Transform t, BoneAxis axis) + { + return axis switch + { + BoneAxis.Right => t.right, + BoneAxis.Left => -t.right, + BoneAxis.Up => t.up, + BoneAxis.Down => -t.up, + BoneAxis.Forward => t.forward, + BoneAxis.Backward => -t.forward, + _ => t.forward + }; + } + + private Vector3 GetVector(Transform t, BoneAxis axis) + { + return axis switch + { + BoneAxis.Right => Vector3.right, + BoneAxis.Left => -Vector3.right, + BoneAxis.Up => Vector3.up, + BoneAxis.Down => -Vector3.up, + BoneAxis.Forward => Vector3.forward, + BoneAxis.Backward => -Vector3.forward, + _ => t.forward + }; + } + } +} \ No newline at end of file diff --git a/Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/DecalBaker.cs.meta b/Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/DecalBaker.cs.meta new file mode 100644 index 00000000..dd1907ca --- /dev/null +++ b/Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/DecalBaker.cs.meta @@ -0,0 +1,18 @@ +fileFormatVersion: 2 +guid: 081b88e7019e821428311f10773397fd +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: +AssetOrigin: + serializedVersion: 1 + productId: 323550 + packageName: 'BoZo: Modular Anime Characters - Base Pack' + packageVersion: 1.8.6 + assetPath: Assets/BoZo_ModularAnimeCharacters/Scripts/CharacterCreator/DecalBaker.cs + uploadId: 917032 diff --git a/Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/DecalController.cs b/Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/DecalController.cs new file mode 100644 index 00000000..05ac67ff --- /dev/null +++ b/Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/DecalController.cs @@ -0,0 +1,170 @@ +using System.Collections; +using System.Collections.Generic; +using TMPro; +using UnityEngine; +using UnityEngine.UI; + +namespace Bozo.AnimeCharacters +{ + public class DecalController : MonoBehaviour + { + public CharacterCreator characterCreator; + public OutfitSystem system; + + public DecalBaker decalBaker; + + public TMP_Dropdown anchorSelect; + public TMP_Text indexText; + + public Slider XSlider; + public Slider YSlider; + public Slider ZSlider; + + public Slider YawSlider; + public Slider RollSlider; + public Slider pitchSlider; + + public Slider ScaleSlider; + + public Texture decal; + public Color color = Color.white; + + public int DecalIndex; + public int DecalIndexMax = 1; + + Outfit outfit; + + private void Awake() + { + system = characterCreator.character; + } + + private void OnEnable() + { + characterCreator.onCategoryChanged += Init; + if (characterCreator.type == null) return; + + Init(characterCreator.type.name); + } + + private void OnDisable() + { + characterCreator.onCategoryChanged -= Init; + } + + private void Init(string type) + { + outfit = system.GetOutfit(type); + if (!outfit) return; + + decalBaker = BoZo_TextureBuilder.GetDecalControl(system, outfit); + + if (outfit.decalDatas.Count == 0) + { + decal = null; + DecalIndexMax = 0; + indexText.text = "-/-"; + return; + } + + + + DecalIndexMax = outfit.decalDatas.Count; + DecalIndex = Mathf.Clamp(DecalIndex, 0, DecalIndexMax - 1); + indexText.text = DecalIndex + 1 + "/" + DecalIndexMax; + + decal = decalBaker.decals[DecalIndex]; + var data = outfit.decalDatas[DecalIndex]; + color = data.color; + + string boneToFind = data.parent; + int index = anchorSelect.options.FindIndex(option => option.text == boneToFind); + + if (index != -1) + { + anchorSelect.SetValueWithoutNotify(index); + anchorSelect.RefreshShownValue(); + } + + XSlider.value = data.pos.x; + YSlider.value = data.pos.y; + ZSlider.value = data.pos.z; + + YawSlider.value = data.yaw; + RollSlider.value = data.roll; + pitchSlider.value = data.pitch; + ScaleSlider.value = data.scale; + } + + public void SetDecal(Texture texture) + { + if(decalBaker == null) + { + Init(characterCreator.type.name); + } + if (decalBaker == null) return; + + decal = texture; + decalBaker.SetDecal(texture, DecalIndex); + UpdateDecal(); + } + + public void UpdateDecal() + { + if (decalBaker == null) return; + if (decal == null) return; + + var x = XSlider.value; + var y = YSlider.value; + var z = ZSlider.value; + var anchor = anchorSelect.options[anchorSelect.value].text; + var data = new DecalData(decal.name, anchor, new Vector3(x, y, z), YawSlider.value, RollSlider.value, pitchSlider.value, ScaleSlider.value, color); + + decalBaker.SetPosition(data, DecalIndex); + } + + public void SetColor(Color color) + { + this.color = color; + UpdateDecal(); + } + + public void AddDecal() + { + decalBaker.AddDecal(); + DecalIndexMax++; + DecalIndex = Mathf.Clamp(DecalIndex, 0, DecalIndexMax -1); + indexText.text = DecalIndex + 1 + "/" + DecalIndexMax; + } + + public void RemoveDecal() + { + if (DecalIndexMax == 0) return; + decalBaker.RemoveDecal(); + DecalIndexMax--; + DecalIndex = Mathf.Clamp(DecalIndex, 0, DecalIndexMax - 1); + indexText.text = DecalIndex + 1 + "/" + DecalIndexMax; + } + + public void IndexUp() + { + DecalIndex++; + DecalIndex = Mathf.Clamp(DecalIndex, 0, DecalIndexMax - 1); + indexText.text = DecalIndex + 1 + "/" + DecalIndexMax; + + Init(outfit.Type.name); + + } + + public void IndexDown() + { + DecalIndex--; + DecalIndex = Mathf.Clamp(DecalIndex, 0, DecalIndexMax - 1); + indexText.text = DecalIndex + 1 + "/" + DecalIndexMax; + + Init(outfit.Type.name); + } + } + +} + diff --git a/Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/DecalController.cs.meta b/Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/DecalController.cs.meta new file mode 100644 index 00000000..00cd17e1 --- /dev/null +++ b/Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/DecalController.cs.meta @@ -0,0 +1,18 @@ +fileFormatVersion: 2 +guid: c9845e5b42f729a4ea6397ba0ecb60fe +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: +AssetOrigin: + serializedVersion: 1 + productId: 323550 + packageName: 'BoZo: Modular Anime Characters - Base Pack' + packageVersion: 1.8.6 + assetPath: Assets/BoZo_ModularAnimeCharacters/Scripts/CharacterCreator/DecalController.cs + uploadId: 917032 diff --git a/Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/Drawer.cs b/Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/Drawer.cs new file mode 100644 index 00000000..8a690ff2 --- /dev/null +++ b/Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/Drawer.cs @@ -0,0 +1,51 @@ +using UnityEngine; +using UnityEngine.EventSystems; + +namespace Bozo.AnimeCharacters +{ + + + public class Drawer : MonoBehaviour, IDeselectHandler + { + public RectTransform scroll; + + private Vector3 target; + + private float dur = 1; + private float time = 1; + + + private void OnEnable() + { + scroll.localPosition = new Vector3(1000, scroll.localPosition.y, scroll.localPosition.z); + //Invoke("Close", 0.01f); + } + + public void Open() + { + target = new Vector3(0, scroll.localPosition.y, scroll.localPosition.z); + time = 0; + } + + public void Close() + { + target = new Vector3(scroll.rect.width, scroll.localPosition.y, scroll.localPosition.z); + time = 0; + } + + private void Update() + { + if (time < dur) + { + var t = time / dur; + time += Time.deltaTime; + scroll.localPosition = Vector3.Lerp(scroll.localPosition, target, t); + } + } + + public void OnDeselect(BaseEventData eventData) + { + Invoke("Close", 0.2f); + } + } +} diff --git a/Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/Drawer.cs.meta b/Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/Drawer.cs.meta new file mode 100644 index 00000000..5e1a0c47 --- /dev/null +++ b/Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/Drawer.cs.meta @@ -0,0 +1,18 @@ +fileFormatVersion: 2 +guid: c27b23af744481542b0480cca56a99e0 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: +AssetOrigin: + serializedVersion: 1 + productId: 323550 + packageName: 'BoZo: Modular Anime Characters - Base Pack' + packageVersion: 1.8.6 + assetPath: Assets/BoZo_ModularAnimeCharacters/Scripts/CharacterCreator/Drawer.cs + uploadId: 917032 diff --git a/Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/Editor.meta b/Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/Editor.meta new file mode 100644 index 00000000..2a0c8a45 --- /dev/null +++ b/Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/Editor.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: dbcfef44c692d3c4097524f2d10e88f5 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/Editor/CharacterEditor.cs b/Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/Editor/CharacterEditor.cs new file mode 100644 index 00000000..d30a842c --- /dev/null +++ b/Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/Editor/CharacterEditor.cs @@ -0,0 +1,38 @@ +using UnityEditor; +using UnityEngine; + +namespace Bozo.AnimeCharacters +{ + [CustomEditor(typeof(CharacterObject))] + public class CharacterEditor : Editor + { + public override void OnInspectorGUI() + { + CharacterObject myObj = (CharacterObject)target; + serializedObject.Update(); + float size = 128f; + + EditorGUILayout.PropertyField(serializedObject.FindProperty("icon")); + + if (myObj.icon != null) + { + + // Define a clean Unity-style frame using GUIStyle + GUIStyle frameStyle = new GUIStyle(GUI.skin.box); + + frameStyle.padding = new RectOffset(10, 10, 10, 10); + frameStyle.margin = new RectOffset(5, 5, 5, 5); + frameStyle.margin = new RectOffset(5, 5, 5, 5); + + GUILayout.BeginHorizontal(frameStyle); + Rect previewRect = GUILayoutUtility.GetRect(size, size, GUILayout.ExpandWidth(true)); + EditorGUI.DrawPreviewTexture(previewRect, myObj.icon, null, ScaleMode.ScaleToFit); + GUILayout.EndHorizontal(); + } + + EditorGUILayout.PropertyField(serializedObject.FindProperty("data")); + + serializedObject.ApplyModifiedProperties(); + } + } +} diff --git a/Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/Editor/CharacterEditor.cs.meta b/Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/Editor/CharacterEditor.cs.meta new file mode 100644 index 00000000..c4824958 --- /dev/null +++ b/Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/Editor/CharacterEditor.cs.meta @@ -0,0 +1,18 @@ +fileFormatVersion: 2 +guid: 03ad0fb1979a42547bfd21ad94bb5ffb +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: +AssetOrigin: + serializedVersion: 1 + productId: 323550 + packageName: 'BoZo: Modular Anime Characters - Base Pack' + packageVersion: 1.8.6 + assetPath: Assets/BoZo_ModularAnimeCharacters/Scripts/CharacterCreator/Editor/CharacterEditor.cs + uploadId: 917032 diff --git a/Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/Editor/IconCaptureEditor.cs b/Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/Editor/IconCaptureEditor.cs new file mode 100644 index 00000000..853bfe86 --- /dev/null +++ b/Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/Editor/IconCaptureEditor.cs @@ -0,0 +1,26 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEditor; +using UnityEngine; + +namespace Bozo.AnimeCharacters +{ + [CustomEditor(typeof(IconCapture))] + public class IconCaptureEditor : Editor + { + + public override void OnInspectorGUI() + { + base.OnInspectorGUI(); + + IconCapture icon = (IconCapture)target; + + GUILayout.BeginHorizontal(); + if (GUILayout.Button("Take ScreenShot")) + { + icon.Capture(); + } + GUILayout.EndHorizontal(); + } + } +} diff --git a/Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/Editor/IconCaptureEditor.cs.meta b/Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/Editor/IconCaptureEditor.cs.meta new file mode 100644 index 00000000..1feaba45 --- /dev/null +++ b/Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/Editor/IconCaptureEditor.cs.meta @@ -0,0 +1,18 @@ +fileFormatVersion: 2 +guid: f87dc63653e81464eb2154dd1728e834 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: +AssetOrigin: + serializedVersion: 1 + productId: 323550 + packageName: 'BoZo: Modular Anime Characters - Base Pack' + packageVersion: 1.8.6 + assetPath: Assets/BoZo_ModularAnimeCharacters/Scripts/CharacterCreator/Editor/IconCaptureEditor.cs + uploadId: 917032 diff --git a/Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/Editor/TextureBakerEditor.cs b/Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/Editor/TextureBakerEditor.cs new file mode 100644 index 00000000..47c59e53 --- /dev/null +++ b/Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/Editor/TextureBakerEditor.cs @@ -0,0 +1,31 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using UnityEditor; + +namespace Bozo.AnimeCharacters +{ + + [CustomEditor(typeof(TextureBaker))] + public class TextureBakerEditor : Editor + { + public override void OnInspectorGUI() + { + base.OnInspectorGUI(); + + TextureBaker baker = (TextureBaker)target; + + GUILayout.BeginHorizontal(); + if(GUILayout.Button("Export Outfit")) + { + baker.ExportOutfit(); + } + + if (GUILayout.Button("Create Swatch")) + { + baker.CreateSwatch(); + } + GUILayout.EndHorizontal(); + } + } +} diff --git a/Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/Editor/TextureBakerEditor.cs.meta b/Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/Editor/TextureBakerEditor.cs.meta new file mode 100644 index 00000000..2c2fd4c8 --- /dev/null +++ b/Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/Editor/TextureBakerEditor.cs.meta @@ -0,0 +1,18 @@ +fileFormatVersion: 2 +guid: 6fcb6ec024ec6474a93423073e9f2f71 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: +AssetOrigin: + serializedVersion: 1 + productId: 323550 + packageName: 'BoZo: Modular Anime Characters - Base Pack' + packageVersion: 1.8.6 + assetPath: Assets/BoZo_ModularAnimeCharacters/Scripts/CharacterCreator/Editor/TextureBakerEditor.cs + uploadId: 917032 diff --git a/Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/ExpressionSelect.cs b/Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/ExpressionSelect.cs new file mode 100644 index 00000000..77c2c8a8 --- /dev/null +++ b/Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/ExpressionSelect.cs @@ -0,0 +1,41 @@ +using UnityEngine; + +namespace Bozo.AnimeCharacters +{ + public class ExpressionSelect : MonoBehaviour + { + public OutfitSystem outfitSystem; + public Animator animator; + + public string parameterID; + + private void OnEnable() + { + outfitSystem.OnOutfitChanged += GetHead; + } + + private void GetHead(Outfit outfit) + { + var head = outfitSystem.GetOutfit("Head"); + if (head) animator = head.GetComponentInChildren(); + else animator = outfitSystem.animator; + } + + private void OnDisable() + { + outfitSystem.OnOutfitChanged -= GetHead; + } + + public void SetExpression(float value) + { + if(animator == null) + { + var head = outfitSystem.GetOutfit("Head"); + if (head) animator = head.GetComponentInChildren(); + else animator = outfitSystem.animator; + } + + animator.SetFloat(parameterID, value); + } + } +} \ No newline at end of file diff --git a/Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/ExpressionSelect.cs.meta b/Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/ExpressionSelect.cs.meta new file mode 100644 index 00000000..5c52225c --- /dev/null +++ b/Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/ExpressionSelect.cs.meta @@ -0,0 +1,18 @@ +fileFormatVersion: 2 +guid: 57776f57f2fa13549ab17323a6064af0 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: +AssetOrigin: + serializedVersion: 1 + productId: 323550 + packageName: 'BoZo: Modular Anime Characters - Base Pack' + packageVersion: 1.8.6 + assetPath: Assets/BoZo_ModularAnimeCharacters/Scripts/CharacterCreator/ExpressionSelect.cs + uploadId: 917032 diff --git a/Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/IconCapture.cs b/Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/IconCapture.cs new file mode 100644 index 00000000..d31ce9f3 --- /dev/null +++ b/Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/IconCapture.cs @@ -0,0 +1,169 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEditor; +using UnityEngine; + +namespace Bozo.AnimeCharacters +{ + public class IconCapture : MonoBehaviour + { + [SerializeField] RenderTexture iconTexture; + [SerializeField] Camera iconCamera; + [SerializeField] Transform parent; + [SerializeField] string path = "BoZo_ModularAnimeCharacters/Textures/OutfitIcons"; + + [SerializeField] GameObject BackingBody; + [SerializeField] GameObject BackingHead; + [SerializeField] List outfits = new List(); + [SerializeField] Color[] Colors; + + private Camera activeCam; + [SerializeField] IconCaptureSettings[] cameraSettings; + [SerializeField] Dictionary cameras = new Dictionary(); + + private void Awake() + { + foreach (var item in cameraSettings) + { + cameras.Add(item.type, item); + } + } + + [ContextMenu("Capture")] + public void Capture() + { +#if UNITY_EDITOR + StartCoroutine(CaptureCoroutine()); +#endif + } + + public void Capture(GameObject gameObject) + { +#if UNITY_EDITOR + outfits.Clear(); + var outfit = gameObject.GetComponent(); + if (outfit == null) return; + + path = AssetDatabase.GetAssetPath(gameObject.gameObject); + path = path.Replace(gameObject.name + ".prefab", ""); + path = path.Replace("Assets", ""); + + outfits.Add(outfit); + + StartCoroutine(CaptureCoroutine()); +#endif + } + +#if UNITY_EDITOR + private IEnumerator CaptureCoroutine() + { + + if(outfits.Count == 0) + { + yield return new WaitForEndOfFrame(); + + RenderTexture.active = iconTexture; + + Texture2D icon = new Texture2D(iconTexture.width, iconTexture.height, TextureFormat.RGBA32, false); + Rect rect = new Rect(new Rect(0, 0, iconTexture.width, iconTexture.height)); + icon.ReadPixels(rect, 0, 0); + icon.Apply(); + + byte[] bytes = icon.EncodeToPNG(); + System.IO.File.WriteAllBytes(Application.dataPath + "/" + path + "/" + "ICON" + ".png", bytes); + AssetDatabase.Refresh(); + + TextureImporter importer = AssetImporter.GetAtPath("Assets/" + path + "/" + "ICON" + ".png") as TextureImporter; + + + if (importer != null) + { + importer.textureType = TextureImporterType.Sprite; + importer.spriteImportMode = SpriteImportMode.Single; + importer.SaveAndReimport(); + } + + yield return null; + } + + foreach (var item in outfits) + { + //Match the camera to the outfit + if (activeCam != null) activeCam.gameObject.SetActive(false); + activeCam = cameras[item.Type].camera; + activeCam.gameObject.SetActive(true); + + BackingBody.SetActive(cameras[item.Type].showBody); + BackingHead.SetActive(cameras[item.Type].showHead); + + + var outfit = Instantiate(item, parent); + if (cameras[item.Type].colorOverride.Length == 0) + { + for (int i = 0; i < Colors.Length; i++) + { + outfit.SetColor(Colors[i], i + 1); + } + } + else + { + for (int i = 0; i < cameras[item.Type].colorOverride.Length; i++) + { + outfit.SetColor(cameras[item.Type].colorOverride[i], i + 1); + } + } + + activeCam.Render(); + yield return new WaitForEndOfFrame(); + + RenderTexture.active = iconTexture; + + Texture2D icon = new Texture2D(iconTexture.width, iconTexture.height, TextureFormat.RGBA32, false); + Rect rect = new Rect(new Rect(0, 0, iconTexture.width, iconTexture.height)); + icon.ReadPixels(rect, 0, 0); + icon.Apply(); + + byte[] bytes = icon.EncodeToPNG(); + + System.IO.File.WriteAllBytes(Application.dataPath + "/" + path + "/" + item.name + ".png", bytes); + AssetDatabase.Refresh(); + print("IconCreated: " + Application.dataPath + "/" + path + "/" + item.name + ".png"); + + TextureImporter importer = AssetImporter.GetAtPath("Assets/" + path + "/" + item.name + ".png") as TextureImporter; + + Destroy(outfit.gameObject); + + if (importer != null) + { + importer.textureType = TextureImporterType.Sprite; + importer.spriteImportMode = SpriteImportMode.Single; + importer.SaveAndReimport(); + } + + if (outfit) + { + var spritrIcon = AssetDatabase.LoadAssetAtPath("Assets/" + path + "/" + item.name + ".png"); + item.OutfitIcon = spritrIcon; + EditorUtility.SetDirty(item); + AssetDatabase.SaveAssets(); + AssetDatabase.Refresh(); + } + if (activeCam != null) activeCam.gameObject.SetActive(false); + yield return null; + } + } +#endif + + + [System.Serializable] + public class IconCaptureSettings + { + public OutfitType type; + public Camera camera; + public bool showHead = true; + public bool showBody = true; + public Color[] colorOverride; + } + } + +} diff --git a/Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/IconCapture.cs.meta b/Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/IconCapture.cs.meta new file mode 100644 index 00000000..49f3d9e2 --- /dev/null +++ b/Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/IconCapture.cs.meta @@ -0,0 +1,18 @@ +fileFormatVersion: 2 +guid: 4e147bfe656788040a25848b79cbab1f +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: +AssetOrigin: + serializedVersion: 1 + productId: 323550 + packageName: 'BoZo: Modular Anime Characters - Base Pack' + packageVersion: 1.8.6 + assetPath: Assets/BoZo_ModularAnimeCharacters/Scripts/CharacterCreator/IconCapture.cs + uploadId: 917032 diff --git a/Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/OutfitVisibilityToggler.cs b/Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/OutfitVisibilityToggler.cs new file mode 100644 index 00000000..38218924 --- /dev/null +++ b/Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/OutfitVisibilityToggler.cs @@ -0,0 +1,56 @@ +using System.Collections; +using System.Collections.Generic; +using TMPro; +using UnityEngine; +using UnityEngine.UI; + + +namespace Bozo.AnimeCharacters +{ + public class OutfitVisibilityToggler : MonoBehaviour + { + [SerializeField] GameObject toggle; + List toggles = new List(); + GameObject[] pieces; + + public void Set(Outfit outfit) + { + foreach (var item in toggles) + { + Destroy(item); + } + toggles.Clear(); + pieces = new GameObject[0]; + + if (outfit == null) { gameObject.SetActive(false); return; }; + if (outfit.optionalPieces.Length == 0) { gameObject.SetActive(false); return; }; + + gameObject.SetActive(true); + + pieces = outfit.optionalPieces; + + for (int i = 0; i < outfit.optionalPieces.Length; i++) + { + if (outfit.optionalPieces[i] == null) continue; + var target = outfit.optionalPieces[i]; + var tog = Instantiate(toggle, transform); + toggles.Add(tog); + + var text = tog.GetComponentInChildren(); + text.text = outfit.optionalPieces[i].name; + + var button = tog.GetComponentInChildren(); + button.isOn = outfit.optionalPieces[i].activeSelf; + var index = i; + button.onValueChanged.AddListener(isOn => { onToggle(index, isOn); }); + } + } + + void onToggle(int index, bool value) + { + pieces[index].SetActive(value); + } + + + } +} diff --git a/Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/OutfitVisibilityToggler.cs.meta b/Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/OutfitVisibilityToggler.cs.meta new file mode 100644 index 00000000..3890f40c --- /dev/null +++ b/Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/OutfitVisibilityToggler.cs.meta @@ -0,0 +1,18 @@ +fileFormatVersion: 2 +guid: 5fe7280a561aa1b46bc2cb8678cd765e +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: +AssetOrigin: + serializedVersion: 1 + productId: 323550 + packageName: 'BoZo: Modular Anime Characters - Base Pack' + packageVersion: 1.8.6 + assetPath: Assets/BoZo_ModularAnimeCharacters/Scripts/CharacterCreator/OutfitVisibilityToggler.cs + uploadId: 917032 diff --git a/Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/SVImageControl.cs b/Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/SVImageControl.cs new file mode 100644 index 00000000..25696dfb --- /dev/null +++ b/Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/SVImageControl.cs @@ -0,0 +1,94 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.UI; +using UnityEngine.EventSystems; + +namespace Bozo.AnimeCharacters +{ + + + public class SVImageControl : MonoBehaviour, IDragHandler, IPointerClickHandler + { + [SerializeField] Image PickerImage; + + private RawImage SVImage; + + private ColorPickerControl CC; + private RectTransform rect; + private RectTransform pickerTransform; + + + private void Awake() + { + SVImage = GetComponent(); + CC = FindFirstObjectByType(); + rect = GetComponent(); + pickerTransform = PickerImage.GetComponent(); + + pickerTransform = PickerImage.GetComponent(); + pickerTransform.position = new Vector2(-(rect.sizeDelta.x * 0.5f), -(rect.sizeDelta.y * 0.5f)); + } + + private void UpdateColor(PointerEventData eventData) + { + Vector3 pos = rect.InverseTransformPoint(eventData.position); + + float deltaX = rect.sizeDelta.x * 0.5f; + float deltaY = rect.sizeDelta.y * 0.5f; + + if (pos.x < -deltaX) + { + pos.x = -deltaX; + } + if (pos.x > deltaX) + { + pos.x = deltaX; + } + if (pos.y < -deltaY) + { + pos.y = -deltaY; + } + if (pos.y > deltaY) + { + pos.y = deltaY; + } + + float x = pos.x + deltaX; + float y = pos.y + deltaY; + + float xNorm = x / rect.sizeDelta.x; + float YNorm = y / rect.sizeDelta.y; + + //pickerTransform.localPosition = pos; + + PickerImage.color = Color.HSVToRGB(0, 0, 1 - YNorm); + + CC.SetSV(xNorm, YNorm); + + } + + public void setPickerPosition(float x, float y) + { + if(!rect) rect = GetComponent(); + if(!pickerTransform) pickerTransform = PickerImage.GetComponent(); + + var xPos = Mathf.Lerp(-rect.sizeDelta.x / 2, rect.sizeDelta.x/ 2, x); + var yPos = Mathf.Lerp(-rect.sizeDelta.y / 2, rect.sizeDelta.y / 2, y); + + var pos = new Vector2(xPos, yPos); + + pickerTransform.localPosition = pos; + } + + public void OnDrag(PointerEventData eventData) + { + UpdateColor(eventData); + } + + public void OnPointerClick(PointerEventData eventData) + { + UpdateColor(eventData); + } + } +} diff --git a/Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/SVImageControl.cs.meta b/Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/SVImageControl.cs.meta new file mode 100644 index 00000000..c468a5d2 --- /dev/null +++ b/Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/SVImageControl.cs.meta @@ -0,0 +1,18 @@ +fileFormatVersion: 2 +guid: ed18d41614dff814fa3781f04180cd92 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: +AssetOrigin: + serializedVersion: 1 + productId: 323550 + packageName: 'BoZo: Modular Anime Characters - Base Pack' + packageVersion: 1.8.6 + assetPath: Assets/BoZo_ModularAnimeCharacters/Scripts/CharacterCreator/SVImageControl.cs + uploadId: 917032 diff --git a/Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/SaveSelector.cs b/Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/SaveSelector.cs new file mode 100644 index 00000000..1a6a8cab --- /dev/null +++ b/Assets/04_Models/Characters/ToonCharacterModular/Scripts/CharacterCreator/SaveSelector.cs @@ -0,0 +1,27 @@ +using UnityEngine; +using UnityEngine.UI; + +namespace Bozo.AnimeCharacters +{ + public class SaveSelector : MonoBehaviour + { + public Image icon; + private CharacterData data; + private CharacterCreator characterCreator; + private Button button; + public void Init(CharacterData characterData, Sprite icon, CharacterCreator characterCreator) + { + button = GetComponentInChildren