2026-07-08 유나 프로토타입버전 추가
This commit is contained in:
Binary file not shown.
8
Assets/04_Models/Characters/ToonCharacterModular.meta
Normal file
8
Assets/04_Models/Characters/ToonCharacterModular.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3482dc3b742575540a4eb3e378061de7
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5741a1eab842f6248abde98003f31243
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Assets/04_Models/Characters/ToonCharacterModular/Animations/BMAC_Dizzy.anim
LFS
Normal file
BIN
Assets/04_Models/Characters/ToonCharacterModular/Animations/BMAC_Dizzy.anim
LFS
Normal file
Binary file not shown.
@@ -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
|
||||
BIN
Assets/04_Models/Characters/ToonCharacterModular/Animations/BMAC_F_Idle.anim
LFS
Normal file
BIN
Assets/04_Models/Characters/ToonCharacterModular/Animations/BMAC_F_Idle.anim
LFS
Normal file
Binary file not shown.
@@ -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
|
||||
BIN
Assets/04_Models/Characters/ToonCharacterModular/Animations/BMAC_F_Walk.anim
LFS
Normal file
BIN
Assets/04_Models/Characters/ToonCharacterModular/Animations/BMAC_F_Walk.anim
LFS
Normal file
Binary file not shown.
@@ -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
|
||||
BIN
Assets/04_Models/Characters/ToonCharacterModular/Animations/BMAC_M_Idle.anim
LFS
Normal file
BIN
Assets/04_Models/Characters/ToonCharacterModular/Animations/BMAC_M_Idle.anim
LFS
Normal file
Binary file not shown.
@@ -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
|
||||
BIN
Assets/04_Models/Characters/ToonCharacterModular/Animations/BMAC_M_Walk.anim
LFS
Normal file
BIN
Assets/04_Models/Characters/ToonCharacterModular/Animations/BMAC_M_Walk.anim
LFS
Normal file
Binary file not shown.
@@ -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
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: aa846307b4d822348aefd5e144151454
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
@@ -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
|
||||
Binary file not shown.
@@ -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
|
||||
Binary file not shown.
@@ -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
|
||||
Binary file not shown.
@@ -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
|
||||
Binary file not shown.
@@ -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
|
||||
Binary file not shown.
@@ -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
|
||||
Binary file not shown.
@@ -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
|
||||
Binary file not shown.
@@ -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
|
||||
Binary file not shown.
@@ -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
|
||||
Binary file not shown.
@@ -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
|
||||
Binary file not shown.
@@ -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
|
||||
Binary file not shown.
@@ -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
|
||||
Binary file not shown.
@@ -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
|
||||
Binary file not shown.
@@ -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
|
||||
Binary file not shown.
@@ -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
|
||||
Binary file not shown.
@@ -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
|
||||
@@ -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}
|
||||
@@ -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
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f75e2f20683ce41499160f432da7a487
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5526c56224d87cd449c7c4e54162026c
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9fc4d30249db24f4ca2c00e76f917a92
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: cab7c43bf94d34e48b34919b0c543608
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Assets/04_Models/Characters/ToonCharacterModular/Models/Common/Body/BodyRig.fbx
LFS
Normal file
BIN
Assets/04_Models/Characters/ToonCharacterModular/Models/Common/Body/BodyRig.fbx
LFS
Normal file
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
@@ -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
|
||||
BIN
Assets/04_Models/Characters/ToonCharacterModular/Models/Common/Body/Body_D.png
LFS
Normal file
BIN
Assets/04_Models/Characters/ToonCharacterModular/Models/Common/Body/Body_D.png
LFS
Normal file
Binary file not shown.
@@ -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
|
||||
BIN
Assets/04_Models/Characters/ToonCharacterModular/Models/Common/Body/Body_N.png
LFS
Normal file
BIN
Assets/04_Models/Characters/ToonCharacterModular/Models/Common/Body/Body_N.png
LFS
Normal file
Binary file not shown.
@@ -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
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2d03eea3297f36a40962b5beb04239b0
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -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<string, Vector3> counterSources = new Dictionary<string, Vector3>();
|
||||
|
||||
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<OutfitSystem>();
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ea08c4f4b86500b469cce7c78d00d32f
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -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<CharacterObject>();
|
||||
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<BodyModData>();
|
||||
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<OutfitData>();
|
||||
|
||||
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<Outfit> outfits = new List<Outfit>();
|
||||
|
||||
if (async)
|
||||
{
|
||||
outfits = await LoadOutfits(loadData.outfitDatas);
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach (var item in loadData.outfitDatas)
|
||||
{
|
||||
outfits.Add(Resources.Load<Outfit>(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<Texture>(outfitData.decal);
|
||||
inst.SetDecal(decal);
|
||||
inst.SetDecalSize(outfitData.decalScale);
|
||||
|
||||
var pattern = Resources.Load<Texture>(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<CharacterData>(data);
|
||||
return loadData;
|
||||
}
|
||||
}
|
||||
|
||||
public static async Task<List<Outfit>> LoadOutfits(List<OutfitData> outfitDatas)
|
||||
{
|
||||
var loadTasks = outfitDatas.Select(data => LoadResourceAsync<Outfit>(data.outfit));
|
||||
return (await Task.WhenAll(loadTasks)).ToList();
|
||||
}
|
||||
|
||||
public static async Task<T> LoadResourceAsync<T>(string path) where T : UnityEngine.Object
|
||||
{
|
||||
ResourceRequest request = Resources.LoadAsync<T>(path);
|
||||
var tcs = new TaskCompletionSource<T>();
|
||||
|
||||
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<string> bodyIDs;
|
||||
public List<float> bodyShapes;
|
||||
public List<string> faceIDs;
|
||||
public List<float> faceShapes;
|
||||
public List<string> bodyModsKeys;
|
||||
public List<BodyModData> bodyMods;
|
||||
public List<OutfitData> outfitDatas;
|
||||
public OutfitData bodyData;
|
||||
public float stance;
|
||||
|
||||
|
||||
public CharacterData()
|
||||
{
|
||||
|
||||
}
|
||||
public CharacterData(CharacterData copyData)
|
||||
{
|
||||
characterName = copyData.characterName;
|
||||
bodyIDs = new List<string>(copyData.bodyIDs);
|
||||
bodyShapes = new List<float>(copyData.bodyShapes);
|
||||
faceIDs = new List<string>(copyData.faceIDs);
|
||||
faceShapes = new List<float>(copyData.faceShapes);
|
||||
bodyModsKeys = new List<string>(copyData.bodyModsKeys);
|
||||
bodyMods = new List<BodyModData>(copyData.bodyMods);
|
||||
outfitDatas = new List<OutfitData>(copyData.outfitDatas);
|
||||
bodyData = copyData.bodyData;
|
||||
stance = copyData.stance;
|
||||
}
|
||||
}
|
||||
|
||||
[System.Serializable]
|
||||
public struct OutfitData
|
||||
{
|
||||
public string outfit;
|
||||
public List<Color> colors;
|
||||
|
||||
public string decal;
|
||||
public List<Color> decalColors;
|
||||
public Vector4 decalScale;
|
||||
|
||||
public string pattern;
|
||||
public List<Color> patternColors;
|
||||
public Vector4 patternScale;
|
||||
|
||||
public bool[] partVisibility;
|
||||
|
||||
//Custom Shader Data
|
||||
public Color color;
|
||||
public int swatch;
|
||||
|
||||
public List<DecalData> 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;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -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
|
||||
File diff suppressed because it is too large
Load Diff
@@ -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
|
||||
@@ -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<InputSystemUIInputModule>();
|
||||
var oldModule = GetComponent<StandaloneInputModule>();
|
||||
|
||||
if (newModule == null)
|
||||
{
|
||||
newModule = gameObject.AddComponent<InputSystemUIInputModule>();
|
||||
}
|
||||
|
||||
if (oldModule != null)
|
||||
{
|
||||
oldModule.enabled = false;
|
||||
}
|
||||
|
||||
newModule.enabled = true;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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
|
||||
@@ -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()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -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
|
||||
@@ -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<BoZo_TextureBuilderManager>();
|
||||
}
|
||||
|
||||
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<Material> 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<OutfitSystem, TextureBuilder> builders = new Dictionary<OutfitSystem, TextureBuilder>();
|
||||
public List<TextureBuilder> visableBuilders = new List<TextureBuilder>();
|
||||
|
||||
private static HashSet<OutfitSystem> buildQueue = new HashSet<OutfitSystem>();
|
||||
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<OutfitSystem>("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<Material> 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<string, Material> masterMaterials = new Dictionary<string, Material>();
|
||||
private Dictionary<string, Material> unpackedMaterials = new Dictionary<string, Material>();
|
||||
|
||||
private Dictionary<string, Outfit> outfits = new Dictionary<string, Outfit>();
|
||||
private Dictionary<string, Dictionary<string, Material>> materials = new Dictionary<string, Dictionary<string, Material>>();
|
||||
|
||||
|
||||
public Dictionary<string, DecalBaker> decalOutfit = new Dictionary<string, DecalBaker>();
|
||||
|
||||
public Camera cam;
|
||||
public List<string> properties = new List<string>();
|
||||
public HashSet<string> allProperties = new HashSet<string>();
|
||||
public HashSet<string> SubIDs = new HashSet<string>();
|
||||
public Dictionary<string, Color> baseColors = new Dictionary<string, Color>();
|
||||
public Dictionary<string, Renderer> meshes = new Dictionary<string, Renderer>();
|
||||
public Dictionary<string, RenderTexture> rts = new Dictionary<string, RenderTexture>();
|
||||
|
||||
private bool renderCooldown;
|
||||
public bool locked; //prevent textures from updating
|
||||
public HashSet<string> renderQueue = new HashSet<string>();
|
||||
|
||||
|
||||
|
||||
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<Camera>();
|
||||
|
||||
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<OutfitSystem>("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<IOutfitExtension>();
|
||||
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<DecalBaker>();
|
||||
var decalBaker = outfitCopy.GetComponent<DecalBaker>();
|
||||
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<IOutfitExtension>())
|
||||
{
|
||||
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<Renderer>();
|
||||
|
||||
|
||||
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<string, Material>();
|
||||
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<Outfit>(outfits.Values.ToList());
|
||||
outfitList.Sort((a, b) => b.materialPriority.CompareTo(a.materialPriority));
|
||||
|
||||
foreach (var key in allProperties)
|
||||
{
|
||||
var matList = new List<Material>();
|
||||
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<Material> GetMaterials()
|
||||
{
|
||||
var list = new List<Material>();
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -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
|
||||
@@ -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<OutfitType, CameraPositions> camPos = new Dictionary<OutfitType, CameraPositions>();
|
||||
|
||||
|
||||
#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<Vector2>().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;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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
|
||||
@@ -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<string, Outfit> OutfitDataBase = new Dictionary<string, Outfit>();
|
||||
[SerializeField] OutfitSelector outfitSelectorObject;
|
||||
private List<OutfitSelector> outfitSelectors = new List<OutfitSelector>();
|
||||
[SerializeField] Transform outfitContainer;
|
||||
|
||||
[Header("Texture Dependencies")]
|
||||
[SerializeField] TextureSelector textureSelectorObject;
|
||||
private List<TextureSelector> textureSelectors = new List<TextureSelector>();
|
||||
[SerializeField] Transform decalContainer;
|
||||
[SerializeField] Transform patternContainer;
|
||||
|
||||
[Header("BodyShape Dependencies")]
|
||||
[SerializeField] BlendSlider blendSliderObject;
|
||||
private List<BlendSlider> blendSliders = new List<BlendSlider>();
|
||||
private List<BlendSlider> faceBlendSliders = new List<BlendSlider>();
|
||||
|
||||
[SerializeField] BodyShapeSliders modSliderObject;
|
||||
private List<BodyShapeSliders> ModSliders = new List<BodyShapeSliders>();
|
||||
|
||||
[SerializeField] Transform bodyShapeContainer;
|
||||
[SerializeField] Transform bodyModContainer;
|
||||
[SerializeField] Transform faceShapeContainer;
|
||||
[SerializeField] Transform faceModContainer;
|
||||
|
||||
[SerializeField] GameObject currentPage;
|
||||
private GameObject previousPage;
|
||||
|
||||
private Dictionary<string, List<GameObject>> outfits = new Dictionary<string, List<GameObject>>();
|
||||
private List<TexturePackage> textures = new List<TexturePackage>();
|
||||
|
||||
[Header("Save Dependencies")]
|
||||
[SerializeField] SaveSelector saveSelector;
|
||||
[SerializeField] Dictionary<string, SaveSelector> saveSlots = new Dictionary<string, SaveSelector>();
|
||||
[SerializeField] Transform saveContainer;
|
||||
[SerializeField] GameObject DeleteConfirmWindow;
|
||||
[SerializeField] TMP_Text loadedCharacterNameText;
|
||||
[SerializeField] TMP_Text DeleteCharacterNameText;
|
||||
[SerializeField] OutfitVisibilityToggler visibilityToggler;
|
||||
|
||||
//Events
|
||||
public UnityAction<string> onCategoryChanged;
|
||||
|
||||
|
||||
public OutfitType type;
|
||||
|
||||
[Header("Save Options")]
|
||||
public TMP_InputField CharacterName;
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
outfits.Clear();
|
||||
OutfitDataBase.Clear();
|
||||
|
||||
var ob = Resources.LoadAll<Outfit>("");
|
||||
var textureObjects = Resources.LoadAll<TexturePackage>("");
|
||||
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<Outfit>());
|
||||
}
|
||||
|
||||
}
|
||||
foreach (var item in textureObjects)
|
||||
{
|
||||
textures.Add(item.GetComponent<TexturePackage>());
|
||||
}
|
||||
|
||||
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<CharacterData>(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<CharacterObject>("");
|
||||
|
||||
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<Texture2D>("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();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -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
|
||||
@@ -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<Animator>();
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -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
|
||||
@@ -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<string> outfitTypes = new List<string>();
|
||||
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<SwatchSelector> swatchSelectors = new List<SwatchSelector>();
|
||||
|
||||
[Header("AdvancedEditor")]
|
||||
[SerializeField] TMP_Text hexValueTex;
|
||||
[SerializeField] List<Color> HeldColors = new List<Color>();
|
||||
[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<OutfitType, OutfitPickerSettings> outfitPickerSettings = new Dictionary<OutfitType, OutfitPickerSettings>();
|
||||
|
||||
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<Outfit>();
|
||||
|
||||
//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>();
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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
|
||||
@@ -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>();
|
||||
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}%";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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
|
||||
@@ -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<Transform> anchorProjector = new List<Transform>();
|
||||
public List<Transform> axisProjector = new List<Transform>();
|
||||
public List<Transform> oriProjector = new List<Transform>();
|
||||
public List<Transform> decalProjector = new List<Transform>();
|
||||
|
||||
public List<Material> materials = new List<Material>();
|
||||
|
||||
public Vector3 postion;
|
||||
public Quaternion rotation;
|
||||
public Vector3 scale;
|
||||
|
||||
public Dictionary<string, Transform> bones;
|
||||
|
||||
public string parent;
|
||||
public List<Texture> decals = new List<Texture>();
|
||||
public int index;
|
||||
|
||||
public List<DecalData> decalDatas = new List<DecalData>();
|
||||
|
||||
public bool debug = true;
|
||||
|
||||
public UnityAction<Outfit> 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<Texture>("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<SkinnedMeshRenderer>();
|
||||
}
|
||||
|
||||
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<OutfitHideByTag>();
|
||||
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
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -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
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user