├── .editorconfig ├── .gitignore ├── Assets ├── Mochineko.meta └── Mochineko │ ├── DynamicUnityAvatarGenerator.Samples.meta │ ├── DynamicUnityAvatarGenerator.Samples │ ├── AnimatorController.controller │ ├── AnimatorController.controller.meta │ ├── AvatarAnimationSample.cs │ ├── AvatarAnimationSample.cs.meta │ ├── GLTFSample.unity │ ├── GLTFSample.unity.meta │ ├── Mochineko.DynamicUnityAvatarGenerator.Samples.asmdef │ ├── Mochineko.DynamicUnityAvatarGenerator.Samples.asmdef.meta │ ├── X Bot.fbx │ └── X Bot.fbx.meta │ ├── DynamicUnityAvatarGenerator.Tests.meta │ ├── DynamicUnityAvatarGenerator.Tests │ ├── AvatarGeneratorTest.cs │ ├── AvatarGeneratorTest.cs.meta │ ├── DummySkeletonCreator.cs │ ├── DummySkeletonCreator.cs.meta │ ├── Mochineko.DynamicUnityAvatarGenerator.Tests.asmdef │ ├── Mochineko.DynamicUnityAvatarGenerator.Tests.asmdef.meta │ ├── RegularExpressionHumanBoneRetrieverTest.cs │ ├── RegularExpressionHumanBoneRetrieverTest.cs.meta │ ├── RegularExpressionRootBoneRetrieverTest.cs │ └── RegularExpressionRootBoneRetrieverTest.cs.meta │ ├── DynamicUnityAvatarGenerator.meta │ └── DynamicUnityAvatarGenerator │ ├── AvatarGenerator.cs │ ├── AvatarGenerator.cs.meta │ ├── HumanBoneTransformMapCreator.cs │ ├── HumanBoneTransformMapCreator.cs.meta │ ├── HumanDescriptionParameters.cs │ ├── HumanDescriptionParameters.cs.meta │ ├── IHumanBoneRetriever.cs │ ├── IHumanBoneRetriever.cs.meta │ ├── IRootBoneRetriever.cs │ ├── IRootBoneRetriever.cs.meta │ ├── LICENSE │ ├── LICENSE.meta │ ├── Mochineko.DynamicUnityAvatarGenerator.asmdef │ ├── Mochineko.DynamicUnityAvatarGenerator.asmdef.meta │ ├── Presets.meta │ ├── Presets │ ├── HumanDescriptionParametersPreset.cs │ ├── HumanDescriptionParametersPreset.cs.meta │ ├── MixamoAndBipedHumanBoneRetrievers.cs │ ├── MixamoAndBipedHumanBoneRetrievers.cs.meta │ ├── MixamoAndBipedRootBoneRetriever.cs │ ├── MixamoAndBipedRootBoneRetriever.cs.meta │ ├── Mochineko.DynamicUnityAvatarGenerator.Presets.asmdef │ └── Mochineko.DynamicUnityAvatarGenerator.Presets.asmdef.meta │ ├── RegularExpressionHumanBoneRetriever.cs │ ├── RegularExpressionHumanBoneRetriever.cs.meta │ ├── RegularExpressionRootBoneRetriever.cs │ ├── RegularExpressionRootBoneRetriever.cs.meta │ ├── SpecifiedRootBoneRetriever.cs │ ├── SpecifiedRootBoneRetriever.cs.meta │ ├── StringComparisionExtension.cs │ ├── StringComparisionExtension.cs.meta │ ├── StringComparison.cs │ ├── StringComparison.cs.meta │ ├── StringComparisonHumanBoneRetriever.cs │ ├── StringComparisonHumanBoneRetriever.cs.meta │ ├── StringComparisonRootBoneRetriever.cs │ ├── StringComparisonRootBoneRetriever.cs.meta │ ├── package.json │ └── package.json.meta ├── CHANGELOG.md ├── LICENSE ├── NOTICE.md ├── Packages ├── manifest.json └── packages-lock.json ├── ProjectSettings ├── AudioManager.asset ├── ClusterInputManager.asset ├── DynamicsManager.asset ├── EditorBuildSettings.asset ├── EditorSettings.asset ├── GraphicsSettings.asset ├── InputManager.asset ├── MemorySettings.asset ├── NavMeshAreas.asset ├── PackageManagerSettings.asset ├── Packages │ └── com.unity.testtools.codecoverage │ │ └── Settings.json ├── Physics2DSettings.asset ├── PresetManager.asset ├── ProjectSettings.asset ├── ProjectVersion.txt ├── QualitySettings.asset ├── SceneTemplateSettings.json ├── TagManager.asset ├── TimeManager.asset ├── UnityConnectSettings.asset ├── VFXManager.asset ├── VersionControlSettings.asset └── XRSettings.asset └── README.md /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | end_of_line = lf 6 | insert_final_newline = true 7 | indent_style = space 8 | indent_size = 4 9 | trim_trailing_whitespace = true 10 | 11 | [*.md] 12 | trim_trailing_whitespace = false 13 | 14 | [*.{yml,yaml}] 15 | indent_size = 2 -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # This .gitignore file should be placed at the root of your Unity project directory 2 | # 3 | # Get latest from https://github.com/github/gitignore/blob/main/Unity.gitignore 4 | # 5 | /[Ll]ibrary/ 6 | /[Tt]emp/ 7 | /[Oo]bj/ 8 | /[Bb]uild/ 9 | /[Bb]uilds/ 10 | /[Ll]ogs/ 11 | /[Uu]ser[Ss]ettings/ 12 | 13 | # MemoryCaptures can get excessive in size. 14 | # They also could contain extremely sensitive data 15 | /[Mm]emoryCaptures/ 16 | 17 | # Recordings can get excessive in size 18 | /[Rr]ecordings/ 19 | 20 | # Uncomment this line if you wish to ignore the asset store tools plugin 21 | # /[Aa]ssets/AssetStoreTools* 22 | 23 | # Autogenerated Jetbrains Rider plugin 24 | /[Aa]ssets/Plugins/Editor/JetBrains* 25 | 26 | # Visual Studio cache directory 27 | .vs/ 28 | 29 | # Gradle cache directory 30 | .gradle/ 31 | 32 | # Autogenerated VS/MD/Consulo solution and project files 33 | ExportedObj/ 34 | .consulo/ 35 | *.csproj 36 | *.unityproj 37 | *.sln 38 | *.suo 39 | *.tmp 40 | *.user 41 | *.userprefs 42 | *.pidb 43 | *.booproj 44 | *.svd 45 | *.pdb 46 | *.mdb 47 | *.opendb 48 | *.VC.db 49 | 50 | # Unity3D generated meta files 51 | *.pidb.meta 52 | *.pdb.meta 53 | *.mdb.meta 54 | 55 | # Unity3D generated file on crash reports 56 | sysinfo.txt 57 | 58 | # Builds 59 | *.apk 60 | *.aab 61 | *.unitypackage 62 | *.app 63 | 64 | # Crashlytics generated file 65 | crashlytics-build.properties 66 | 67 | # Packed Addressables 68 | /[Aa]ssets/[Aa]ddressable[Aa]ssets[Dd]ata/*/*.bin* 69 | 70 | # Temporary auto-generated Android Assets 71 | /[Aa]ssets/[Ss]treamingAssets/aa.meta 72 | /[Aa]ssets/[Ss]treamingAssets/aa/* 73 | 74 | # Rider 75 | .idea 76 | 77 | # macOS 78 | .DS_Store 79 | -------------------------------------------------------------------------------- /Assets/Mochineko.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d2f189f4c7a625341838b805611221af 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Mochineko/DynamicUnityAvatarGenerator.Samples.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 42be7ac11befd47a59ba0f52754db948 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Mochineko/DynamicUnityAvatarGenerator.Samples/AnimatorController.controller: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1102 &-7784879038582530267 4 | AnimatorState: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 1 7 | m_CorrespondingSourceObject: {fileID: 0} 8 | m_PrefabInstance: {fileID: 0} 9 | m_PrefabAsset: {fileID: 0} 10 | m_Name: TPose 11 | m_Speed: 1 12 | m_CycleOffset: 0 13 | m_Transitions: [] 14 | m_StateMachineBehaviours: [] 15 | m_Position: {x: 50, y: 50, z: 0} 16 | m_IKOnFeet: 0 17 | m_WriteDefaultValues: 1 18 | m_Mirror: 0 19 | m_SpeedParameterActive: 0 20 | m_MirrorParameterActive: 0 21 | m_CycleOffsetParameterActive: 0 22 | m_TimeParameterActive: 0 23 | m_Motion: {fileID: -203655887218126122, guid: 4ab46dc4889864b77b8708a1702b889b, type: 3} 24 | m_Tag: 25 | m_SpeedParameter: 26 | m_MirrorParameter: 27 | m_CycleOffsetParameter: 28 | m_TimeParameter: 29 | --- !u!1107 &-443331107873966021 30 | AnimatorStateMachine: 31 | serializedVersion: 6 32 | m_ObjectHideFlags: 1 33 | m_CorrespondingSourceObject: {fileID: 0} 34 | m_PrefabInstance: {fileID: 0} 35 | m_PrefabAsset: {fileID: 0} 36 | m_Name: Base Layer 37 | m_ChildStates: 38 | - serializedVersion: 1 39 | m_State: {fileID: -7784879038582530267} 40 | m_Position: {x: 270, y: 60, z: 0} 41 | m_ChildStateMachines: [] 42 | m_AnyStateTransitions: [] 43 | m_EntryTransitions: [] 44 | m_StateMachineTransitions: {} 45 | m_StateMachineBehaviours: [] 46 | m_AnyStatePosition: {x: 50, y: 20, z: 0} 47 | m_EntryPosition: {x: 50, y: 120, z: 0} 48 | m_ExitPosition: {x: 800, y: 120, z: 0} 49 | m_ParentStateMachinePosition: {x: 800, y: 20, z: 0} 50 | m_DefaultState: {fileID: -7784879038582530267} 51 | --- !u!91 &9100000 52 | AnimatorController: 53 | m_ObjectHideFlags: 0 54 | m_CorrespondingSourceObject: {fileID: 0} 55 | m_PrefabInstance: {fileID: 0} 56 | m_PrefabAsset: {fileID: 0} 57 | m_Name: AnimatorController 58 | serializedVersion: 5 59 | m_AnimatorParameters: [] 60 | m_AnimatorLayers: 61 | - serializedVersion: 5 62 | m_Name: Base Layer 63 | m_StateMachine: {fileID: -443331107873966021} 64 | m_Mask: {fileID: 0} 65 | m_Motions: [] 66 | m_Behaviours: [] 67 | m_BlendingMode: 0 68 | m_SyncedLayerIndex: -1 69 | m_DefaultWeight: 0 70 | m_IKPass: 0 71 | m_SyncedLayerAffectsTiming: 0 72 | m_Controller: {fileID: 9100000} 73 | -------------------------------------------------------------------------------- /Assets/Mochineko/DynamicUnityAvatarGenerator.Samples/AnimatorController.controller.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 246068892052947c3a30c2b802fe66cc 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 9100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Mochineko/DynamicUnityAvatarGenerator.Samples/AvatarAnimationSample.cs: -------------------------------------------------------------------------------- 1 | #nullable enable 2 | using System; 3 | using System.Net.Http; 4 | using System.Threading; 5 | using Cysharp.Threading.Tasks; 6 | using Mochineko.DynamicUnityAvatarGenerator.Presets; 7 | using Mochineko.Relent.Result; 8 | using UniGLTF; 9 | using UnityEngine; 10 | using VRMShaders; 11 | 12 | namespace Mochineko.DynamicUnityAvatarGenerator.Samples 13 | { 14 | internal sealed class AvatarAnimationSample : MonoBehaviour 15 | { 16 | [SerializeField] 17 | private RuntimeAnimatorController? animatorController = null; 18 | 19 | private readonly CancellationTokenSource cancellationTokenSource = new(); 20 | private IDisposable? disposable; 21 | 22 | private async void Start() 23 | { 24 | var cancellationToken = cancellationTokenSource.Token; 25 | 26 | var binary = await DownloadSampleModelAsync(cancellationToken); 27 | 28 | var instance = await LoadGLTFAsync(binary, "sample_glTF", cancellationToken); 29 | disposable = instance; 30 | foreach (var renderer in instance.gameObject.GetComponentsInChildren()) 31 | { 32 | renderer.enabled = true; 33 | } 34 | 35 | var (avatar, map) = AvatarGenerator.GenerateHumanoidAvatar( 36 | instance.gameObject, 37 | MixamoAndBipedRootBoneRetriever.Preset, 38 | MixamoAndBipedHumanBoneRetrievers.Preset, 39 | HumanDescriptionParametersPreset.Preset) 40 | .Unwrap(); 41 | 42 | var animator = instance.gameObject.AddComponent(); 43 | animator.avatar = avatar; 44 | animator.runtimeAnimatorController = animatorController; 45 | } 46 | 47 | private void OnDestroy() 48 | { 49 | cancellationTokenSource.Dispose(); 50 | disposable?.Dispose(); 51 | } 52 | 53 | private async UniTask DownloadSampleModelAsync(CancellationToken cancellationToken) 54 | { 55 | cancellationToken.ThrowIfCancellationRequested(); 56 | 57 | using var requestMessage = new HttpRequestMessage( 58 | HttpMethod.Get, 59 | "https://models.readyplayer.me/62209f5170f4fcd07809c611.glb"); 60 | 61 | using var httpClient = new HttpClient(); 62 | using var responseMessage = await httpClient.SendAsync(requestMessage, cancellationToken); 63 | 64 | return await responseMessage.Content.ReadAsByteArrayAsync(); 65 | } 66 | 67 | private async UniTask LoadGLTFAsync( 68 | byte[] binary, 69 | string name, 70 | CancellationToken cancellationToken) 71 | { 72 | cancellationToken.ThrowIfCancellationRequested(); 73 | 74 | using var glTF = new GlbBinaryParser(binary, name) 75 | .Parse(); 76 | 77 | using var loader = new ImporterContext( 78 | data:glTF, 79 | materialGenerator:null, 80 | externalObjectMap:null, 81 | textureDeserializer:null 82 | ); 83 | loader.InvertAxis = Axes.X; 84 | 85 | return await loader.LoadAsync(new RuntimeOnlyAwaitCaller()); 86 | } 87 | } 88 | } 89 | -------------------------------------------------------------------------------- /Assets/Mochineko/DynamicUnityAvatarGenerator.Samples/AvatarAnimationSample.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7b47128be3f0248a09e9eef8e9292fb6 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Mochineko/DynamicUnityAvatarGenerator.Samples/GLTFSample.unity: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!29 &1 4 | OcclusionCullingSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_OcclusionBakeSettings: 8 | smallestOccluder: 5 9 | smallestHole: 0.25 10 | backfaceThreshold: 100 11 | m_SceneGUID: 00000000000000000000000000000000 12 | m_OcclusionCullingData: {fileID: 0} 13 | --- !u!104 &2 14 | RenderSettings: 15 | m_ObjectHideFlags: 0 16 | serializedVersion: 9 17 | m_Fog: 0 18 | m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} 19 | m_FogMode: 3 20 | m_FogDensity: 0.01 21 | m_LinearFogStart: 0 22 | m_LinearFogEnd: 300 23 | m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} 24 | m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} 25 | m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} 26 | m_AmbientIntensity: 1 27 | m_AmbientMode: 0 28 | m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} 29 | m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0} 30 | m_HaloStrength: 0.5 31 | m_FlareStrength: 1 32 | m_FlareFadeSpeed: 3 33 | m_HaloTexture: {fileID: 0} 34 | m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} 35 | m_DefaultReflectionMode: 0 36 | m_DefaultReflectionResolution: 128 37 | m_ReflectionBounces: 1 38 | m_ReflectionIntensity: 1 39 | m_CustomReflection: {fileID: 0} 40 | m_Sun: {fileID: 0} 41 | m_IndirectSpecularColor: {r: 0.18028326, g: 0.22571333, b: 0.30692202, a: 1} 42 | m_UseRadianceAmbientProbe: 0 43 | --- !u!157 &3 44 | LightmapSettings: 45 | m_ObjectHideFlags: 0 46 | serializedVersion: 12 47 | m_GIWorkflowMode: 1 48 | m_GISettings: 49 | serializedVersion: 2 50 | m_BounceScale: 1 51 | m_IndirectOutputScale: 1 52 | m_AlbedoBoost: 1 53 | m_EnvironmentLightingMode: 0 54 | m_EnableBakedLightmaps: 1 55 | m_EnableRealtimeLightmaps: 0 56 | m_LightmapEditorSettings: 57 | serializedVersion: 12 58 | m_Resolution: 2 59 | m_BakeResolution: 40 60 | m_AtlasSize: 1024 61 | m_AO: 0 62 | m_AOMaxDistance: 1 63 | m_CompAOExponent: 1 64 | m_CompAOExponentDirect: 0 65 | m_ExtractAmbientOcclusion: 0 66 | m_Padding: 2 67 | m_LightmapParameters: {fileID: 0} 68 | m_LightmapsBakeMode: 1 69 | m_TextureCompression: 1 70 | m_FinalGather: 0 71 | m_FinalGatherFiltering: 1 72 | m_FinalGatherRayCount: 256 73 | m_ReflectionCompression: 2 74 | m_MixedBakeMode: 2 75 | m_BakeBackend: 1 76 | m_PVRSampling: 1 77 | m_PVRDirectSampleCount: 32 78 | m_PVRSampleCount: 512 79 | m_PVRBounces: 2 80 | m_PVREnvironmentSampleCount: 256 81 | m_PVREnvironmentReferencePointCount: 2048 82 | m_PVRFilteringMode: 1 83 | m_PVRDenoiserTypeDirect: 1 84 | m_PVRDenoiserTypeIndirect: 1 85 | m_PVRDenoiserTypeAO: 1 86 | m_PVRFilterTypeDirect: 0 87 | m_PVRFilterTypeIndirect: 0 88 | m_PVRFilterTypeAO: 0 89 | m_PVREnvironmentMIS: 1 90 | m_PVRCulling: 1 91 | m_PVRFilteringGaussRadiusDirect: 1 92 | m_PVRFilteringGaussRadiusIndirect: 5 93 | m_PVRFilteringGaussRadiusAO: 2 94 | m_PVRFilteringAtrousPositionSigmaDirect: 0.5 95 | m_PVRFilteringAtrousPositionSigmaIndirect: 2 96 | m_PVRFilteringAtrousPositionSigmaAO: 1 97 | m_ExportTrainingData: 0 98 | m_TrainingDataDestination: TrainingData 99 | m_LightProbeSampleCountMultiplier: 4 100 | m_LightingDataAsset: {fileID: 0} 101 | m_LightingSettings: {fileID: 0} 102 | --- !u!196 &4 103 | NavMeshSettings: 104 | serializedVersion: 2 105 | m_ObjectHideFlags: 0 106 | m_BuildSettings: 107 | serializedVersion: 3 108 | agentTypeID: 0 109 | agentRadius: 0.5 110 | agentHeight: 2 111 | agentSlope: 45 112 | agentClimb: 0.4 113 | ledgeDropHeight: 0 114 | maxJumpAcrossDistance: 0 115 | minRegionArea: 2 116 | manualCellSize: 0 117 | cellSize: 0.16666667 118 | manualTileSize: 0 119 | tileSize: 256 120 | buildHeightMesh: 0 121 | maxJobWorkers: 0 122 | preserveTilesOutsideBounds: 0 123 | debug: 124 | m_Flags: 0 125 | m_NavMeshData: {fileID: 0} 126 | --- !u!1 &40073155 127 | GameObject: 128 | m_ObjectHideFlags: 0 129 | m_CorrespondingSourceObject: {fileID: 0} 130 | m_PrefabInstance: {fileID: 0} 131 | m_PrefabAsset: {fileID: 0} 132 | serializedVersion: 6 133 | m_Component: 134 | - component: {fileID: 40073158} 135 | - component: {fileID: 40073157} 136 | - component: {fileID: 40073156} 137 | m_Layer: 0 138 | m_Name: Main Camera 139 | m_TagString: MainCamera 140 | m_Icon: {fileID: 0} 141 | m_NavMeshLayer: 0 142 | m_StaticEditorFlags: 0 143 | m_IsActive: 1 144 | --- !u!81 &40073156 145 | AudioListener: 146 | m_ObjectHideFlags: 0 147 | m_CorrespondingSourceObject: {fileID: 0} 148 | m_PrefabInstance: {fileID: 0} 149 | m_PrefabAsset: {fileID: 0} 150 | m_GameObject: {fileID: 40073155} 151 | m_Enabled: 1 152 | --- !u!20 &40073157 153 | Camera: 154 | m_ObjectHideFlags: 0 155 | m_CorrespondingSourceObject: {fileID: 0} 156 | m_PrefabInstance: {fileID: 0} 157 | m_PrefabAsset: {fileID: 0} 158 | m_GameObject: {fileID: 40073155} 159 | m_Enabled: 1 160 | serializedVersion: 2 161 | m_ClearFlags: 1 162 | m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} 163 | m_projectionMatrixMode: 1 164 | m_GateFitMode: 2 165 | m_FOVAxisMode: 0 166 | m_Iso: 200 167 | m_ShutterSpeed: 0.005 168 | m_Aperture: 16 169 | m_FocusDistance: 10 170 | m_FocalLength: 50 171 | m_BladeCount: 5 172 | m_Curvature: {x: 2, y: 11} 173 | m_BarrelClipping: 0.25 174 | m_Anamorphism: 0 175 | m_SensorSize: {x: 36, y: 24} 176 | m_LensShift: {x: 0, y: 0} 177 | m_NormalizedViewPortRect: 178 | serializedVersion: 2 179 | x: 0 180 | y: 0 181 | width: 1 182 | height: 1 183 | near clip plane: 0.3 184 | far clip plane: 1000 185 | field of view: 60 186 | orthographic: 0 187 | orthographic size: 5 188 | m_Depth: -1 189 | m_CullingMask: 190 | serializedVersion: 2 191 | m_Bits: 4294967295 192 | m_RenderingPath: -1 193 | m_TargetTexture: {fileID: 0} 194 | m_TargetDisplay: 0 195 | m_TargetEye: 3 196 | m_HDR: 1 197 | m_AllowMSAA: 1 198 | m_AllowDynamicResolution: 0 199 | m_ForceIntoRT: 0 200 | m_OcclusionCulling: 1 201 | m_StereoConvergence: 10 202 | m_StereoSeparation: 0.022 203 | --- !u!4 &40073158 204 | Transform: 205 | m_ObjectHideFlags: 0 206 | m_CorrespondingSourceObject: {fileID: 0} 207 | m_PrefabInstance: {fileID: 0} 208 | m_PrefabAsset: {fileID: 0} 209 | m_GameObject: {fileID: 40073155} 210 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 211 | m_LocalPosition: {x: 0, y: 1, z: -2} 212 | m_LocalScale: {x: 1, y: 1, z: 1} 213 | m_ConstrainProportionsScale: 0 214 | m_Children: [] 215 | m_Father: {fileID: 0} 216 | m_RootOrder: 0 217 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 218 | --- !u!1001 &289621261 219 | PrefabInstance: 220 | m_ObjectHideFlags: 0 221 | serializedVersion: 2 222 | m_Modification: 223 | serializedVersion: 3 224 | m_TransformParent: {fileID: 0} 225 | m_Modifications: 226 | - target: {fileID: -8679921383154817045, guid: 4ab46dc4889864b77b8708a1702b889b, type: 3} 227 | propertyPath: m_RootOrder 228 | value: 3 229 | objectReference: {fileID: 0} 230 | - target: {fileID: -8679921383154817045, guid: 4ab46dc4889864b77b8708a1702b889b, type: 3} 231 | propertyPath: m_LocalPosition.x 232 | value: 2 233 | objectReference: {fileID: 0} 234 | - target: {fileID: -8679921383154817045, guid: 4ab46dc4889864b77b8708a1702b889b, type: 3} 235 | propertyPath: m_LocalPosition.y 236 | value: 0 237 | objectReference: {fileID: 0} 238 | - target: {fileID: -8679921383154817045, guid: 4ab46dc4889864b77b8708a1702b889b, type: 3} 239 | propertyPath: m_LocalPosition.z 240 | value: 0 241 | objectReference: {fileID: 0} 242 | - target: {fileID: -8679921383154817045, guid: 4ab46dc4889864b77b8708a1702b889b, type: 3} 243 | propertyPath: m_LocalRotation.w 244 | value: 1 245 | objectReference: {fileID: 0} 246 | - target: {fileID: -8679921383154817045, guid: 4ab46dc4889864b77b8708a1702b889b, type: 3} 247 | propertyPath: m_LocalRotation.x 248 | value: 0 249 | objectReference: {fileID: 0} 250 | - target: {fileID: -8679921383154817045, guid: 4ab46dc4889864b77b8708a1702b889b, type: 3} 251 | propertyPath: m_LocalRotation.y 252 | value: 0 253 | objectReference: {fileID: 0} 254 | - target: {fileID: -8679921383154817045, guid: 4ab46dc4889864b77b8708a1702b889b, type: 3} 255 | propertyPath: m_LocalRotation.z 256 | value: 0 257 | objectReference: {fileID: 0} 258 | - target: {fileID: -8679921383154817045, guid: 4ab46dc4889864b77b8708a1702b889b, type: 3} 259 | propertyPath: m_LocalEulerAnglesHint.x 260 | value: 0 261 | objectReference: {fileID: 0} 262 | - target: {fileID: -8679921383154817045, guid: 4ab46dc4889864b77b8708a1702b889b, type: 3} 263 | propertyPath: m_LocalEulerAnglesHint.y 264 | value: 0 265 | objectReference: {fileID: 0} 266 | - target: {fileID: -8679921383154817045, guid: 4ab46dc4889864b77b8708a1702b889b, type: 3} 267 | propertyPath: m_LocalEulerAnglesHint.z 268 | value: 0 269 | objectReference: {fileID: 0} 270 | - target: {fileID: 919132149155446097, guid: 4ab46dc4889864b77b8708a1702b889b, type: 3} 271 | propertyPath: m_Name 272 | value: X Bot 273 | objectReference: {fileID: 0} 274 | - target: {fileID: 5866666021909216657, guid: 4ab46dc4889864b77b8708a1702b889b, type: 3} 275 | propertyPath: m_Controller 276 | value: 277 | objectReference: {fileID: 9100000, guid: 246068892052947c3a30c2b802fe66cc, type: 2} 278 | m_RemovedComponents: [] 279 | m_RemovedGameObjects: [] 280 | m_AddedGameObjects: [] 281 | m_AddedComponents: [] 282 | m_SourcePrefab: {fileID: 100100000, guid: 4ab46dc4889864b77b8708a1702b889b, type: 3} 283 | --- !u!1 &971779450 284 | GameObject: 285 | m_ObjectHideFlags: 0 286 | m_CorrespondingSourceObject: {fileID: 0} 287 | m_PrefabInstance: {fileID: 0} 288 | m_PrefabAsset: {fileID: 0} 289 | serializedVersion: 6 290 | m_Component: 291 | - component: {fileID: 971779452} 292 | - component: {fileID: 971779451} 293 | m_Layer: 0 294 | m_Name: Directional Light 295 | m_TagString: Untagged 296 | m_Icon: {fileID: 0} 297 | m_NavMeshLayer: 0 298 | m_StaticEditorFlags: 0 299 | m_IsActive: 1 300 | --- !u!108 &971779451 301 | Light: 302 | m_ObjectHideFlags: 0 303 | m_CorrespondingSourceObject: {fileID: 0} 304 | m_PrefabInstance: {fileID: 0} 305 | m_PrefabAsset: {fileID: 0} 306 | m_GameObject: {fileID: 971779450} 307 | m_Enabled: 1 308 | serializedVersion: 10 309 | m_Type: 1 310 | m_Shape: 0 311 | m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1} 312 | m_Intensity: 1 313 | m_Range: 10 314 | m_SpotAngle: 30 315 | m_InnerSpotAngle: 21.80208 316 | m_CookieSize: 10 317 | m_Shadows: 318 | m_Type: 2 319 | m_Resolution: -1 320 | m_CustomResolution: -1 321 | m_Strength: 1 322 | m_Bias: 0.05 323 | m_NormalBias: 0.4 324 | m_NearPlane: 0.2 325 | m_CullingMatrixOverride: 326 | e00: 1 327 | e01: 0 328 | e02: 0 329 | e03: 0 330 | e10: 0 331 | e11: 1 332 | e12: 0 333 | e13: 0 334 | e20: 0 335 | e21: 0 336 | e22: 1 337 | e23: 0 338 | e30: 0 339 | e31: 0 340 | e32: 0 341 | e33: 1 342 | m_UseCullingMatrixOverride: 0 343 | m_Cookie: {fileID: 0} 344 | m_DrawHalo: 0 345 | m_Flare: {fileID: 0} 346 | m_RenderMode: 0 347 | m_CullingMask: 348 | serializedVersion: 2 349 | m_Bits: 4294967295 350 | m_RenderingLayerMask: 1 351 | m_Lightmapping: 4 352 | m_LightShadowCasterMode: 0 353 | m_AreaSize: {x: 1, y: 1} 354 | m_BounceIntensity: 1 355 | m_ColorTemperature: 6570 356 | m_UseColorTemperature: 0 357 | m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0} 358 | m_UseBoundingSphereOverride: 0 359 | m_UseViewFrustumForShadowCasterCull: 1 360 | m_ShadowRadius: 0 361 | m_ShadowAngle: 0 362 | --- !u!4 &971779452 363 | Transform: 364 | m_ObjectHideFlags: 0 365 | m_CorrespondingSourceObject: {fileID: 0} 366 | m_PrefabInstance: {fileID: 0} 367 | m_PrefabAsset: {fileID: 0} 368 | m_GameObject: {fileID: 971779450} 369 | m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261} 370 | m_LocalPosition: {x: 0, y: 3, z: 0} 371 | m_LocalScale: {x: 1, y: 1, z: 1} 372 | m_ConstrainProportionsScale: 0 373 | m_Children: [] 374 | m_Father: {fileID: 0} 375 | m_RootOrder: 1 376 | m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} 377 | --- !u!1 &2046878077 378 | GameObject: 379 | m_ObjectHideFlags: 0 380 | m_CorrespondingSourceObject: {fileID: 0} 381 | m_PrefabInstance: {fileID: 0} 382 | m_PrefabAsset: {fileID: 0} 383 | serializedVersion: 6 384 | m_Component: 385 | - component: {fileID: 2046878079} 386 | - component: {fileID: 2046878078} 387 | m_Layer: 0 388 | m_Name: GameObject 389 | m_TagString: Untagged 390 | m_Icon: {fileID: 0} 391 | m_NavMeshLayer: 0 392 | m_StaticEditorFlags: 0 393 | m_IsActive: 1 394 | --- !u!114 &2046878078 395 | MonoBehaviour: 396 | m_ObjectHideFlags: 0 397 | m_CorrespondingSourceObject: {fileID: 0} 398 | m_PrefabInstance: {fileID: 0} 399 | m_PrefabAsset: {fileID: 0} 400 | m_GameObject: {fileID: 2046878077} 401 | m_Enabled: 1 402 | m_EditorHideFlags: 0 403 | m_Script: {fileID: 11500000, guid: 7b47128be3f0248a09e9eef8e9292fb6, type: 3} 404 | m_Name: 405 | m_EditorClassIdentifier: 406 | animatorController: {fileID: 9100000, guid: 246068892052947c3a30c2b802fe66cc, type: 2} 407 | --- !u!4 &2046878079 408 | Transform: 409 | m_ObjectHideFlags: 0 410 | m_CorrespondingSourceObject: {fileID: 0} 411 | m_PrefabInstance: {fileID: 0} 412 | m_PrefabAsset: {fileID: 0} 413 | m_GameObject: {fileID: 2046878077} 414 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 415 | m_LocalPosition: {x: 0, y: 0, z: 0} 416 | m_LocalScale: {x: 1, y: 1, z: 1} 417 | m_ConstrainProportionsScale: 0 418 | m_Children: [] 419 | m_Father: {fileID: 0} 420 | m_RootOrder: 2 421 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 422 | -------------------------------------------------------------------------------- /Assets/Mochineko/DynamicUnityAvatarGenerator.Samples/GLTFSample.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6667a40be992245e2b472a64b8682efa 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Mochineko/DynamicUnityAvatarGenerator.Samples/Mochineko.DynamicUnityAvatarGenerator.Samples.asmdef: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Mochineko.DynamicUnityAvatarGenerator.Samples", 3 | "rootNamespace": "", 4 | "references": [ 5 | "GUID:d067d112c52abab44a061317a9c238cf", 6 | "GUID:dfcbe65ceb847ec43a1baf0239104373", 7 | "GUID:3ed995982eec04b2e9d304b5b6242945", 8 | "GUID:f51ebe6a0ceec4240a699833d6309b23", 9 | "GUID:8d76e605759c3f64a957d63ef96ada7c", 10 | "GUID:da3e51d19d51a544fa14d43fee843098" 11 | ], 12 | "includePlatforms": [], 13 | "excludePlatforms": [], 14 | "allowUnsafeCode": false, 15 | "overrideReferences": true, 16 | "precompiledReferences": [], 17 | "autoReferenced": false, 18 | "defineConstraints": [], 19 | "versionDefines": [], 20 | "noEngineReferences": false 21 | } -------------------------------------------------------------------------------- /Assets/Mochineko/DynamicUnityAvatarGenerator.Samples/Mochineko.DynamicUnityAvatarGenerator.Samples.asmdef.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 436100facbdb74557bfed488747ece86 3 | AssemblyDefinitionImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Mochineko/DynamicUnityAvatarGenerator.Samples/X Bot.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mochi-neko/dynamic-unity-avatar-generator/bbcb1e6e5613b52b812fc32a28d9eb3b9c5cedc0/Assets/Mochineko/DynamicUnityAvatarGenerator.Samples/X Bot.fbx -------------------------------------------------------------------------------- /Assets/Mochineko/DynamicUnityAvatarGenerator.Samples/X Bot.fbx.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4ab46dc4889864b77b8708a1702b889b 3 | ModelImporter: 4 | serializedVersion: 22200 5 | internalIDToNameTable: [] 6 | externalObjects: {} 7 | materials: 8 | materialImportMode: 2 9 | materialName: 0 10 | materialSearch: 1 11 | materialLocation: 1 12 | animations: 13 | legacyGenerateAnimations: 4 14 | bakeSimulation: 0 15 | resampleCurves: 1 16 | optimizeGameObjects: 0 17 | removeConstantScaleCurves: 0 18 | motionNodeName: 19 | rigImportErrors: 20 | rigImportWarnings: 21 | animationImportErrors: 22 | animationImportWarnings: 23 | animationRetargetingWarnings: 24 | animationDoRetargetingWarnings: 0 25 | importAnimatedCustomProperties: 0 26 | importConstraints: 0 27 | animationCompression: 3 28 | animationRotationError: 0.5 29 | animationPositionError: 0.5 30 | animationScaleError: 0.5 31 | animationWrapMode: 0 32 | extraExposedTransformPaths: [] 33 | extraUserProperties: [] 34 | clipAnimations: [] 35 | isReadable: 0 36 | meshes: 37 | lODScreenPercentages: [] 38 | globalScale: 1 39 | meshCompression: 0 40 | addColliders: 0 41 | useSRGBMaterialColor: 1 42 | sortHierarchyByName: 1 43 | importPhysicalCameras: 1 44 | importVisibility: 1 45 | importBlendShapes: 1 46 | importCameras: 1 47 | importLights: 1 48 | nodeNameCollisionStrategy: 1 49 | fileIdsGeneration: 2 50 | swapUVChannels: 0 51 | generateSecondaryUV: 0 52 | useFileUnits: 1 53 | keepQuads: 0 54 | weldVertices: 1 55 | bakeAxisConversion: 0 56 | preserveHierarchy: 0 57 | skinWeightsMode: 0 58 | maxBonesPerVertex: 4 59 | minBoneWeight: 0.001 60 | optimizeBones: 1 61 | meshOptimizationFlags: -1 62 | indexFormat: 0 63 | secondaryUVAngleDistortion: 8 64 | secondaryUVAreaDistortion: 15.000001 65 | secondaryUVHardAngle: 88 66 | secondaryUVMarginMethod: 1 67 | secondaryUVMinLightmapResolution: 40 68 | secondaryUVMinObjectScale: 1 69 | secondaryUVPackMargin: 4 70 | useFileScale: 1 71 | strictVertexDataChecks: 0 72 | tangentSpace: 73 | normalSmoothAngle: 60 74 | normalImportMode: 0 75 | tangentImportMode: 3 76 | normalCalculationMode: 4 77 | legacyComputeAllNormalsFromSmoothingGroupsWhenMeshHasBlendShapes: 0 78 | blendShapeNormalImportMode: 1 79 | normalSmoothingSource: 0 80 | referencedClips: [] 81 | importAnimation: 1 82 | humanDescription: 83 | serializedVersion: 3 84 | human: [] 85 | skeleton: [] 86 | armTwist: 0.5 87 | foreArmTwist: 0.5 88 | upperLegTwist: 0.5 89 | legTwist: 0.5 90 | armStretch: 0.05 91 | legStretch: 0.05 92 | feetSpacing: 0 93 | globalScale: 1 94 | rootMotionBoneName: 95 | hasTranslationDoF: 0 96 | hasExtraRoot: 1 97 | skeletonHasParents: 1 98 | lastHumanDescriptionAvatarSource: {instanceID: 0} 99 | autoGenerateAvatarMappingIfUnspecified: 1 100 | animationType: 3 101 | humanoidOversampling: 1 102 | avatarSetup: 1 103 | addHumanoidExtraRootOnlyWhenUsingAvatar: 1 104 | importBlendShapeDeformPercent: 1 105 | remapMaterialsIfMaterialImportModeIsNone: 0 106 | additionalBone: 0 107 | userData: 108 | assetBundleName: 109 | assetBundleVariant: 110 | -------------------------------------------------------------------------------- /Assets/Mochineko/DynamicUnityAvatarGenerator.Tests.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3f2bbcff1b3ce77488984c4f194e0ee7 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Mochineko/DynamicUnityAvatarGenerator.Tests/AvatarGeneratorTest.cs: -------------------------------------------------------------------------------- 1 | #nullable enable 2 | using System.Threading.Tasks; 3 | using FluentAssertions; 4 | using Mochineko.DynamicUnityAvatarGenerator.Presets; 5 | using Mochineko.Relent.Result; 6 | using NUnit.Framework; 7 | using UnityEngine; 8 | using UnityEngine.TestTools; 9 | 10 | namespace Mochineko.DynamicUnityAvatarGenerator.Tests 11 | { 12 | internal sealed class AvatarGeneratorTest 13 | { 14 | [Test] 15 | [RequiresPlayMode(true)] 16 | public void GenerateHumanoidAvatarTest() 17 | { 18 | var gameObject = DummySkeletonCreator.CreateDummyHumanoidHierarchy(); 19 | var rootBoneRetriever = new RegularExpressionRootBoneRetriever(@".*(?i)Hips$"); 20 | var humanBoneRetrievers = DummySkeletonCreator.CreateDummyHumanBoneRetrievers(); 21 | 22 | var (avatar, map) = AvatarGenerator.GenerateHumanoidAvatar( 23 | gameObject, 24 | rootBoneRetriever, 25 | humanBoneRetrievers, 26 | new HumanDescriptionParameters() 27 | ).Unwrap(); 28 | 29 | avatar.isValid.Should().BeTrue(); 30 | avatar.isHuman.Should().BeTrue(); 31 | avatar.humanDescription.skeleton.Length.Should().Be(22); 32 | avatar.humanDescription.human.Length.Should().Be(21); 33 | avatar.humanDescription.human.Length.Should().Be(map.Count); 34 | 35 | map[HumanBodyBones.Hips].transform.name.Should().Be("bone.Hips"); 36 | 37 | var mappedFromAvatar = HumanBoneTransformMapCreator 38 | .MapFromAvatar(avatar, gameObject) 39 | .Unwrap(); 40 | 41 | foreach (var fromAvatar in mappedFromAvatar) 42 | { 43 | fromAvatar.Value.Should().Be(map[fromAvatar.Key]); 44 | } 45 | 46 | Object.Destroy(avatar); 47 | Object.Destroy(gameObject); 48 | } 49 | 50 | /// 51 | /// See https://docs.readyplayer.me/ready-player-me/api-reference/avatars/full-body-avatars 52 | /// 53 | [Test] 54 | [RequiresPlayMode(true)] 55 | public void ReadyPlayerMeAvatarGenerationTest() 56 | { 57 | var gameObject = DummySkeletonCreator.CreateReadyPlayerMeHumanoidHierarchy(); 58 | 59 | var (avatar, map) = AvatarGenerator.GenerateHumanoidAvatar( 60 | gameObject, 61 | MixamoAndBipedRootBoneRetriever.Preset, 62 | MixamoAndBipedHumanBoneRetrievers.Preset, 63 | HumanDescriptionParametersPreset.Preset) 64 | .Unwrap(); 65 | 66 | avatar.isValid.Should().BeTrue(); 67 | avatar.isHuman.Should().BeTrue(); 68 | avatar.humanDescription.skeleton.Length.Should().Be(33); 69 | avatar.humanDescription.human.Length.Should().Be(32); 70 | avatar.humanDescription.human.Length.Should().Be(map.Count); 71 | 72 | map[HumanBodyBones.Hips].transform.name.Should().Be("Hips"); 73 | 74 | var mappedFromAvatar = HumanBoneTransformMapCreator 75 | .MapFromAvatar(avatar, gameObject) 76 | .Unwrap(); 77 | 78 | foreach (var fromAvatar in mappedFromAvatar) 79 | { 80 | fromAvatar.Value.Should().Be(map[fromAvatar.Key]); 81 | } 82 | 83 | Object.Destroy(avatar); 84 | Object.Destroy(gameObject); 85 | } 86 | } 87 | } 88 | -------------------------------------------------------------------------------- /Assets/Mochineko/DynamicUnityAvatarGenerator.Tests/AvatarGeneratorTest.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 74eba97c1edb422da5a9b98666616c31 3 | timeCreated: 1691056909 -------------------------------------------------------------------------------- /Assets/Mochineko/DynamicUnityAvatarGenerator.Tests/DummySkeletonCreator.cs: -------------------------------------------------------------------------------- 1 | #nullable enable 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | namespace Mochineko.DynamicUnityAvatarGenerator.Tests 6 | { 7 | internal static class DummySkeletonCreator 8 | { 9 | public static GameObject CreateDummyHumanoidHierarchy() 10 | { 11 | var gameObject = new GameObject(name: "Root"); 12 | var root = gameObject.transform; 13 | 14 | var hips = new GameObject(name: "bone.Hips"); 15 | hips.transform.SetParent(root); 16 | 17 | var spine = new GameObject(name: "bone.Spine"); 18 | spine.transform.SetParent(hips.transform); 19 | var chest = new GameObject(name: "bone.Chest"); 20 | chest.transform.SetParent(spine.transform); 21 | var neck = new GameObject(name: "bone.Neck"); 22 | neck.transform.SetParent(chest.transform); 23 | var head = new GameObject(name: "bone.Head"); 24 | head.transform.SetParent(neck.transform); 25 | 26 | var leftUpperLeg = new GameObject(name: "bone.LeftUpperLeg"); 27 | leftUpperLeg.transform.SetParent(hips.transform); 28 | var leftLowerLeg = new GameObject(name: "bone.LeftLowerLeg"); 29 | leftLowerLeg.transform.SetParent(leftUpperLeg.transform); 30 | var leftFoot = new GameObject(name: "bone.LeftFoot"); 31 | leftFoot.transform.SetParent(leftLowerLeg.transform); 32 | var leftToes = new GameObject(name: "bone.LeftToes"); 33 | leftToes.transform.SetParent(leftFoot.transform); 34 | 35 | var rightUpperLeg = new GameObject(name: "bone.RightUpperLeg"); 36 | rightUpperLeg.transform.SetParent(hips.transform); 37 | var rightLowerLeg = new GameObject(name: "bone.RightLowerLeg"); 38 | rightLowerLeg.transform.SetParent(rightUpperLeg.transform); 39 | var rightFoot = new GameObject(name: "bone.RightFoot"); 40 | rightFoot.transform.SetParent(rightLowerLeg.transform); 41 | var rightToes = new GameObject(name: "bone.RightToes"); 42 | rightToes.transform.SetParent(rightFoot.transform); 43 | 44 | var leftShoulder = new GameObject(name: "bone.LeftShoulder"); 45 | leftShoulder.transform.SetParent(chest.transform); 46 | var leftUpperArm = new GameObject(name: "bone.LeftUpperArm"); 47 | leftUpperArm.transform.SetParent(leftShoulder.transform); 48 | var leftLowerArm = new GameObject(name: "bone.LeftLowerArm"); 49 | leftLowerArm.transform.SetParent(leftUpperArm.transform); 50 | var leftHand = new GameObject(name: "bone.LeftHand"); 51 | leftHand.transform.SetParent(leftLowerArm.transform); 52 | 53 | var rightShoulder = new GameObject(name: "bone.RightShoulder"); 54 | rightShoulder.transform.SetParent(chest.transform); 55 | var rightUpperArm = new GameObject(name: "bone.RightUpperArm"); 56 | rightUpperArm.transform.SetParent(rightShoulder.transform); 57 | var rightLowerArm = new GameObject(name: "bone.RightLowerArm"); 58 | rightLowerArm.transform.SetParent(rightUpperArm.transform); 59 | var rightHand = new GameObject(name: "bone.RightHand"); 60 | rightHand.transform.SetParent(rightLowerArm.transform); 61 | 62 | return gameObject; 63 | } 64 | 65 | public static IHumanBoneRetriever[] CreateDummyHumanBoneRetrievers() 66 | { 67 | var retrievers = new List(); 68 | 69 | retrievers.Add(new RegularExpressionHumanBoneRetriever( 70 | target: HumanBodyBones.Hips, 71 | limit: new HumanLimit(), 72 | pattern: @".*(?i)Hips$")); 73 | 74 | retrievers.Add(new RegularExpressionHumanBoneRetriever( 75 | target: HumanBodyBones.Spine, 76 | limit: new HumanLimit(), 77 | pattern: @".*(?i)Spine$")); 78 | 79 | retrievers.Add(new RegularExpressionHumanBoneRetriever( 80 | target: HumanBodyBones.Chest, 81 | limit: new HumanLimit(), 82 | pattern: @".*(?i)Chest$")); 83 | 84 | retrievers.Add(new RegularExpressionHumanBoneRetriever( 85 | target: HumanBodyBones.Neck, 86 | limit: new HumanLimit(), 87 | pattern: @".*(?i)Neck$")); 88 | 89 | retrievers.Add(new RegularExpressionHumanBoneRetriever( 90 | target: HumanBodyBones.Head, 91 | limit: new HumanLimit(), 92 | pattern: @".*(?i)Head$")); 93 | 94 | retrievers.Add(new RegularExpressionHumanBoneRetriever( 95 | target: HumanBodyBones.LeftUpperLeg, 96 | limit: new HumanLimit(), 97 | pattern: @".*(?i)LeftUpperLeg$")); 98 | 99 | retrievers.Add(new RegularExpressionHumanBoneRetriever( 100 | target: HumanBodyBones.LeftLowerLeg, 101 | limit: new HumanLimit(), 102 | pattern: @".*(?i)LeftLowerLeg$")); 103 | 104 | retrievers.Add(new RegularExpressionHumanBoneRetriever( 105 | target: HumanBodyBones.LeftFoot, 106 | limit: new HumanLimit(), 107 | pattern: @".*(?i)LeftFoot$")); 108 | 109 | retrievers.Add(new RegularExpressionHumanBoneRetriever( 110 | target: HumanBodyBones.LeftToes, 111 | limit: new HumanLimit(), 112 | pattern: @".*(?i)LeftToes$")); 113 | 114 | retrievers.Add(new RegularExpressionHumanBoneRetriever( 115 | target: HumanBodyBones.RightUpperLeg, 116 | limit: new HumanLimit(), 117 | pattern: @".*(?i)RightUpperLeg$")); 118 | 119 | retrievers.Add(new RegularExpressionHumanBoneRetriever( 120 | target: HumanBodyBones.RightLowerLeg, 121 | limit: new HumanLimit(), 122 | pattern: @".*(?i)RightLowerLeg$")); 123 | 124 | retrievers.Add(new RegularExpressionHumanBoneRetriever( 125 | target: HumanBodyBones.RightFoot, 126 | limit: new HumanLimit(), 127 | pattern: @".*(?i)RightFoot$")); 128 | 129 | retrievers.Add(new RegularExpressionHumanBoneRetriever( 130 | target: HumanBodyBones.RightToes, 131 | limit: new HumanLimit(), 132 | pattern: @".*(?i)RightToes$")); 133 | 134 | retrievers.Add(new RegularExpressionHumanBoneRetriever( 135 | target: HumanBodyBones.LeftShoulder, 136 | limit: new HumanLimit(), 137 | pattern: @".*(?i)LeftShoulder$")); 138 | 139 | retrievers.Add(new RegularExpressionHumanBoneRetriever( 140 | target: HumanBodyBones.LeftUpperArm, 141 | limit: new HumanLimit(), 142 | pattern: @".*(?i)LeftUpperArm$")); 143 | 144 | retrievers.Add(new RegularExpressionHumanBoneRetriever( 145 | target: HumanBodyBones.LeftLowerArm, 146 | limit: new HumanLimit(), 147 | pattern: @".*(?i)LeftLowerArm$")); 148 | 149 | retrievers.Add(new RegularExpressionHumanBoneRetriever( 150 | target: HumanBodyBones.LeftHand, 151 | limit: new HumanLimit(), 152 | pattern: @".*(?i)LeftHand$")); 153 | 154 | retrievers.Add(new RegularExpressionHumanBoneRetriever( 155 | target: HumanBodyBones.RightShoulder, 156 | limit: new HumanLimit(), 157 | pattern: @".*(?i)RightShoulder$")); 158 | 159 | retrievers.Add(new RegularExpressionHumanBoneRetriever( 160 | target: HumanBodyBones.RightUpperArm, 161 | limit: new HumanLimit(), 162 | pattern: @".*(?i)RightUpperArm$")); 163 | 164 | retrievers.Add(new RegularExpressionHumanBoneRetriever( 165 | target: HumanBodyBones.RightLowerArm, 166 | limit: new HumanLimit(), 167 | pattern: @".*(?i)RightLowerArm$")); 168 | 169 | retrievers.Add(new RegularExpressionHumanBoneRetriever( 170 | target: HumanBodyBones.RightHand, 171 | limit: new HumanLimit(), 172 | pattern: @".*(?i)RightHand$")); 173 | 174 | return retrievers.ToArray(); 175 | } 176 | 177 | /// 178 | /// See https://docs.readyplayer.me/ready-player-me/api-reference/avatars/full-body-avatars 179 | /// 180 | /// 181 | public static GameObject CreateReadyPlayerMeHumanoidHierarchy() 182 | { 183 | var gameObject = new GameObject(name: "Armature"); 184 | var root = gameObject.transform; 185 | 186 | var hips = new GameObject(name: "Hips").transform; 187 | hips.SetParent(root); 188 | 189 | var spine = new GameObject(name: "Spine").transform; 190 | spine.SetParent(hips); 191 | var chest = new GameObject(name: "Spine1").transform; 192 | chest.SetParent(spine); 193 | var upperChest = new GameObject(name: "Spine2").transform; 194 | upperChest.SetParent(chest); 195 | var neck = new GameObject(name: "Neck").transform; 196 | neck.SetParent(upperChest); 197 | var head = new GameObject(name: "Head").transform; 198 | head.SetParent(neck); 199 | 200 | var leftUpperLeg = new GameObject(name: "LeftUpLeg").transform; 201 | leftUpperLeg.SetParent(hips); 202 | var leftLowerLeg = new GameObject(name: "LeftLeg").transform; 203 | leftLowerLeg.SetParent(leftUpperLeg); 204 | var leftFoot = new GameObject(name: "LeftFoot").transform; 205 | leftFoot.SetParent(leftLowerLeg); 206 | var leftToes = new GameObject(name: "LeftToeBase").transform; 207 | leftToes.SetParent(leftFoot); 208 | 209 | var rightUpperLeg = new GameObject(name: "RightUpLeg").transform; 210 | rightUpperLeg.SetParent(hips); 211 | var rightLowerLeg = new GameObject(name: "RightLeg").transform; 212 | rightLowerLeg.SetParent(rightUpperLeg); 213 | var rightFoot = new GameObject(name: "RightFoot").transform; 214 | rightFoot.SetParent(rightLowerLeg); 215 | var rightToes = new GameObject(name: "RightToeBase").transform; 216 | rightToes.SetParent(rightFoot); 217 | 218 | var leftShoulder = new GameObject(name: "LeftShoulder").transform; 219 | leftShoulder.SetParent(chest); 220 | var leftUpperArm = new GameObject(name: "LeftArm").transform; 221 | leftUpperArm.SetParent(leftShoulder); 222 | var leftLowerArm = new GameObject(name: "LeftForeArm").transform; 223 | leftLowerArm.SetParent(leftUpperArm); 224 | var leftHand = new GameObject(name: "LeftHand").transform; 225 | leftHand.SetParent(leftLowerArm); 226 | 227 | var rightShoulder = new GameObject(name: "RightShoulder").transform; 228 | rightShoulder.SetParent(chest); 229 | var rightUpperArm = new GameObject(name: "RightArm").transform; 230 | rightUpperArm.SetParent(rightShoulder); 231 | var rightLowerArm = new GameObject(name: "RightForeArm").transform; 232 | rightLowerArm.SetParent(rightUpperArm); 233 | var rightHand = new GameObject(name: "RightHand").transform; 234 | rightHand.SetParent(rightLowerArm); 235 | 236 | var leftThumbProximal = new GameObject(name: "LeftHandThumb1").transform; 237 | leftThumbProximal.SetParent(leftHand); 238 | var leftIndexProximal = new GameObject(name: "LeftHandIndex1").transform; 239 | leftIndexProximal.SetParent(leftHand); 240 | var leftMiddleProximal = new GameObject(name: "LeftHandMiddle1").transform; 241 | leftMiddleProximal.SetParent(leftHand); 242 | var leftRingProximal = new GameObject(name: "LeftHandRing1").transform; 243 | leftRingProximal.SetParent(leftHand); 244 | var leftLittleProximal = new GameObject(name: "LeftHandPinky1").transform; 245 | leftLittleProximal.SetParent(leftHand); 246 | 247 | var rightThumbProximal = new GameObject(name: "RightHandThumb1").transform; 248 | rightThumbProximal.SetParent(rightHand); 249 | var rightIndexProximal = new GameObject(name: "RightHandIndex1").transform; 250 | rightIndexProximal.SetParent(rightHand); 251 | var rightMiddleProximal = new GameObject(name: "RightHandMiddle1").transform; 252 | rightMiddleProximal.SetParent(rightHand); 253 | var rightRingProximal = new GameObject(name: "RightHandRing1").transform; 254 | rightRingProximal.SetParent(rightHand); 255 | var rightLittleProximal = new GameObject(name: "RightHandPinky1").transform; 256 | rightLittleProximal.SetParent(rightHand); 257 | 258 | return gameObject; 259 | } 260 | } 261 | } 262 | -------------------------------------------------------------------------------- /Assets/Mochineko/DynamicUnityAvatarGenerator.Tests/DummySkeletonCreator.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 94236f3356824cb7bc54565c3599ecd4 3 | timeCreated: 1691198529 -------------------------------------------------------------------------------- /Assets/Mochineko/DynamicUnityAvatarGenerator.Tests/Mochineko.DynamicUnityAvatarGenerator.Tests.asmdef: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Mochineko.DynamicUnityAvatarGenerator.Tests", 3 | "rootNamespace": "", 4 | "references": [ 5 | "GUID:27619889b8ba8c24980f49ee34dbb44a", 6 | "GUID:0acc523941302664db1f4e527237feb3", 7 | "GUID:d067d112c52abab44a061317a9c238cf", 8 | "GUID:dfcbe65ceb847ec43a1baf0239104373", 9 | "GUID:3ed995982eec04b2e9d304b5b6242945", 10 | "GUID:e372c541aba5148868e12aa078ca7c20", 11 | "GUID:f51ebe6a0ceec4240a699833d6309b23" 12 | ], 13 | "includePlatforms": [], 14 | "excludePlatforms": [], 15 | "allowUnsafeCode": false, 16 | "overrideReferences": true, 17 | "precompiledReferences": [ 18 | "nunit.framework.dll" 19 | ], 20 | "autoReferenced": false, 21 | "defineConstraints": [ 22 | "UNITY_INCLUDE_TESTS" 23 | ], 24 | "versionDefines": [], 25 | "noEngineReferences": false 26 | } -------------------------------------------------------------------------------- /Assets/Mochineko/DynamicUnityAvatarGenerator.Tests/Mochineko.DynamicUnityAvatarGenerator.Tests.asmdef.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 03056cf02f1ac6d45875caeabde2d388 3 | AssemblyDefinitionImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Mochineko/DynamicUnityAvatarGenerator.Tests/RegularExpressionHumanBoneRetrieverTest.cs: -------------------------------------------------------------------------------- 1 | #nullable enable 2 | using System.Collections.Generic; 3 | using FluentAssertions; 4 | using NUnit.Framework; 5 | using UnityEngine; 6 | using UnityEngine.TestTools; 7 | 8 | namespace Mochineko.DynamicUnityAvatarGenerator.Tests 9 | { 10 | internal sealed class RegularExpressionHumanBoneRetrieverTest 11 | { 12 | // Ends with "Hips" with case sensitive 13 | [TestCase(@".*Hips$", "Hips", true)] 14 | [TestCase(@".*Hips$", "SomeBoneName.Hips", true)] 15 | [TestCase(@".*Hips$", "Hip", false)] 16 | [TestCase(@".*Hips$", "HipsX", false)] 17 | // Ends with "Hips" with case insensitive 18 | [TestCase(@".*(?i)Hips$", "hips", true)] 19 | [TestCase(@".*(?i)Hips$", "some_bone_name_hips", true)] 20 | [TestCase(@".*(?i)Hips$", "HIPS", true)] 21 | // Starts with "Hips" with case sensitive 22 | [TestCase(@"^Hips.*", "Hips", true)] 23 | [TestCase(@"^Hips.*", "Hips.SomeBoneName", true)] 24 | [TestCase(@"^Hips.*", "Hip.SomeBoneName", false)] 25 | [TestCase(@"^Hips.*", "XHip", false)] 26 | // Starts with "Hips" with case insensitive 27 | [TestCase(@"^(?i)Hips.*", "hips", true)] 28 | [TestCase(@"^(?i)Hips.*", "hips_some_bone_name", true)] 29 | // Contains "Hips" with case sensitive 30 | [TestCase(@".*Hips.*", "Prefix.Hips.Suffix", true)] 31 | [TestCase(@".*Hips.*", "Prefix.Hips", true)] 32 | [TestCase(@".*Hips.*", "Hips.Suffix", true)] 33 | [TestCase(@".*Hips.*", "Prefix.hip.Suffix", false)] 34 | // Contains "Hips" with case insensitive 35 | [TestCase(@".*(?i)Hips.*", "prefix_hips_suffix", true)] 36 | // Ends with "Head" or "Head1" with case insensitive 37 | [TestCase(@".*(Head|Head1)$", "Head", true)] 38 | [TestCase(@".*(Head|Head1)$", "Head1", true)] 39 | [TestCase(@".*(Head|Head1)$", "Head2", false)] 40 | // Ends with "Head" or plus one number with case insensitive 41 | [TestCase(@".*Head\d??$", "Head", true)] 42 | [TestCase(@".*Head\d??$", "Head1", true)] 43 | [TestCase(@".*Head\d??$", "HeadX", false)] 44 | [TestCase(@".*Head\d??$", "Head10", false)] 45 | [RequiresPlayMode(true)] 46 | public void RetrieveTest(string pattern, string name, bool match) 47 | { 48 | IHumanBoneRetriever retriever = new RegularExpressionHumanBoneRetriever( 49 | target: HumanBodyBones.Hips, 50 | limit: new HumanLimit(), 51 | pattern: pattern); 52 | 53 | var skeletonBones = new List<(SkeletonBone, Transform)> 54 | { 55 | ( 56 | new SkeletonBone { name = name }, 57 | new GameObject().transform 58 | ) 59 | }; 60 | 61 | retriever.Retrieve(skeletonBones) 62 | .result.Success 63 | .Should().Be(match); 64 | } 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /Assets/Mochineko/DynamicUnityAvatarGenerator.Tests/RegularExpressionHumanBoneRetrieverTest.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9591e5a812684e34b2d77441ccd6c305 3 | timeCreated: 1691033986 -------------------------------------------------------------------------------- /Assets/Mochineko/DynamicUnityAvatarGenerator.Tests/RegularExpressionRootBoneRetrieverTest.cs: -------------------------------------------------------------------------------- 1 | #nullable enable 2 | using FluentAssertions; 3 | using NUnit.Framework; 4 | using UnityEngine; 5 | using UnityEngine.TestTools; 6 | 7 | namespace Mochineko.DynamicUnityAvatarGenerator.Tests 8 | { 9 | internal sealed class RegularExpressionRootBoneRetrieverTest 10 | { 11 | [TestCase(@"(?i)Hips$", "Hips", true)] 12 | [TestCase(@"(?i)(Hips|Pelvis|Bip01)$", "Hips", true)] 13 | [RequiresPlayMode(false)] 14 | public void RetrieveTest(string pattern, string name, bool match) 15 | { 16 | IRootBoneRetriever retriever = new RegularExpressionRootBoneRetriever(pattern); 17 | 18 | var gameObject = new GameObject("Root"); 19 | var skeletonParent = new GameObject("SkeletonParent").transform; 20 | skeletonParent.parent = gameObject.transform; 21 | var hips = new GameObject("Hips").transform; 22 | hips.parent = skeletonParent; 23 | var spine = new GameObject("Spine").transform; 24 | spine.parent = hips; 25 | var another = new GameObject("Another").transform; 26 | another.parent = gameObject.transform; 27 | 28 | retriever.Retrieve(gameObject) 29 | .Success 30 | .Should().Be(match); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /Assets/Mochineko/DynamicUnityAvatarGenerator.Tests/RegularExpressionRootBoneRetrieverTest.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5f387f7c0e134ba48630823a1d13cde9 3 | timeCreated: 1691110278 -------------------------------------------------------------------------------- /Assets/Mochineko/DynamicUnityAvatarGenerator.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4fcd67997fe30714fb4fb319ad770d38 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Mochineko/DynamicUnityAvatarGenerator/AvatarGenerator.cs: -------------------------------------------------------------------------------- 1 | #nullable enable 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using Cysharp.Threading.Tasks; 5 | using Mochineko.Relent.Result; 6 | using Unity.Logging; 7 | using UnityEngine; 8 | 9 | namespace Mochineko.DynamicUnityAvatarGenerator 10 | { 11 | /// 12 | /// Generator of at runtime. 13 | /// 14 | public static class AvatarGenerator 15 | { 16 | /// 17 | /// Generates a humanoid avatar. 18 | /// 19 | /// Root GameObject of the model. 20 | /// Root bone retriever. 21 | /// Human bone retrievers. 22 | /// Human description parameters. 23 | /// 24 | /// 25 | public static IResult<(Avatar avatar, IReadOnlyDictionary transformMap)> 26 | GenerateHumanoidAvatar( 27 | GameObject gameObject, 28 | IRootBoneRetriever rootBoneRetriever, 29 | IHumanBoneRetriever[] humanBoneRetrievers, 30 | HumanDescriptionParameters parameters) 31 | { 32 | var retrieveRootBoneResult = rootBoneRetriever.Retrieve(gameObject); 33 | Transform rootBone; 34 | switch (retrieveRootBoneResult) 35 | { 36 | case ISuccessResult retrieveRootBoneSuccess: 37 | rootBone = retrieveRootBoneSuccess.Result; 38 | Log.Debug("[AvatarGenerator] Succeeded to retrieve root bone: {0}.", rootBone.name); 39 | break; 40 | 41 | case IFailureResult retrieveRootBoneFailure: 42 | Log.Error("[AvatarGenerator] Failed to retrieve root bone because -> {0}.", 43 | retrieveRootBoneFailure.Message); 44 | return Results.Fail<(Avatar, IReadOnlyDictionary)>( 45 | $"Failed to retrieve root bone because -> {retrieveRootBoneFailure.Message}"); 46 | 47 | default: 48 | Log.Fatal("[AvatarGenerator] Unexpected result: {0}.", nameof(retrieveRootBoneResult)); 49 | throw new ResultPatternMatchException(nameof(retrieveRootBoneResult)); 50 | } 51 | 52 | var skeletonBoneInfo = ConstructSkeletonBones(rootBone); 53 | Log.Debug("[AvatarGenerator] Finished to construct {0} skeleton bones from root bone: {1}.", 54 | skeletonBoneInfo.Length, rootBone.name); 55 | 56 | var constructHumanBonesResult = ConstructHumanBones(skeletonBoneInfo, humanBoneRetrievers); 57 | HumanBone[] humanBones; 58 | IReadOnlyDictionary transformMap; 59 | switch (constructHumanBonesResult) 60 | { 61 | case ISuccessResult<(HumanBone[] bones, IReadOnlyDictionary map)> 62 | constructHumanBonesSuccess: 63 | humanBones = constructHumanBonesSuccess.Result.bones; 64 | transformMap = constructHumanBonesSuccess.Result.map; 65 | Log.Debug("[AvatarGenerator] Succeeded to construct {0} human bones from {1} skeleton bones.", 66 | humanBones.Length, skeletonBoneInfo.Length); 67 | break; 68 | 69 | case IFailureResult<(HumanBone[], IReadOnlyDictionary)> 70 | constructHumanBonesFailure: 71 | Log.Error("[AvatarGenerator] Failed to construct human bones from {0} skeleton bones.", 72 | skeletonBoneInfo.Length); 73 | return Results.Fail<(Avatar, IReadOnlyDictionary)>( 74 | $"Failed to construct human bones from {skeletonBoneInfo.Length} skeleton bones because -> {constructHumanBonesFailure.Message}"); 75 | 76 | default: 77 | Log.Fatal("[AvatarGenerator] Unexpected result: {0}.", nameof(constructHumanBonesResult)); 78 | throw new ResultPatternMatchException(nameof(constructHumanBonesResult)); 79 | } 80 | 81 | var skeletonBones = skeletonBoneInfo 82 | .Select(pair => pair.skeletonBone) 83 | .ToArray(); 84 | 85 | EnforceSkeletonBonesOnTPose(skeletonBones, transformMap); 86 | Log.Info("[AvatarGenerator] Succeeded to enforce skeleton bones on T-Pose for {0} before building avatar.", 87 | gameObject.name); 88 | 89 | var description = new HumanDescription 90 | { 91 | human = humanBones, 92 | skeleton = skeletonBones, 93 | upperArmTwist = parameters.upperArmTwist, 94 | lowerArmTwist = parameters.lowerArmTwist, 95 | upperLegTwist = parameters.upperLegTwist, 96 | lowerLegTwist = parameters.lowerLegTwist, 97 | armStretch = parameters.armStretch, 98 | legStretch = parameters.legStretch, 99 | feetSpacing = parameters.feetSpacing, 100 | hasTranslationDoF = parameters.hasTranslationDoF 101 | }; 102 | 103 | var avatar = AvatarBuilder.BuildHumanAvatar(gameObject, description); 104 | if (!avatar.isValid) 105 | { 106 | Log.Error("[AvatarGenerator] Avatar is invalid construction for {0}.", 107 | gameObject.name); 108 | return Results.Fail<(Avatar, IReadOnlyDictionary)>( 109 | $"Avatar is invalid construction for {gameObject.name}."); 110 | } 111 | 112 | if (!avatar.isHuman) 113 | { 114 | Log.Error( 115 | "[AvatarGenerator] Avatar is not humanoid construction for {0}.", 116 | gameObject.name); 117 | return Results.Fail<(Avatar, IReadOnlyDictionary)>( 118 | $"Avatar is not humanoid construction for {gameObject.name}."); 119 | } 120 | 121 | Log.Info("[AvatarGenerator] Succeeded to generate humanoid avatar for {0}.", gameObject.name); 122 | return Results.Succeed((avatar, transformMap)); 123 | } 124 | 125 | /// 126 | /// Constructs skeleton bones from the root bone. 127 | /// 128 | /// 129 | /// 130 | private static (SkeletonBone skeletonBone, Transform transform)[] 131 | ConstructSkeletonBones(Transform rootBone) 132 | { 133 | var bones = new List<(SkeletonBone, Transform)>(); 134 | 135 | CreateSkeletonBoneRecursively(rootBone.parent, bones); 136 | 137 | return bones.ToArray(); 138 | } 139 | 140 | /// 141 | /// Creates skeleton bones into children recursively. 142 | /// 143 | /// 144 | /// 145 | private static void CreateSkeletonBoneRecursively( 146 | Transform transform, 147 | ICollection<(SkeletonBone, Transform)> bones) 148 | { 149 | Log.Debug("[AvatarGenerator] Create skeleton bone for {0}.", transform.name); 150 | 151 | bones.Add(( 152 | new SkeletonBone 153 | { 154 | name = transform.name, 155 | position = transform.localPosition, 156 | rotation = transform.localRotation, 157 | scale = transform.localScale 158 | }, 159 | transform 160 | )); 161 | 162 | foreach (Transform child in transform) 163 | { 164 | CreateSkeletonBoneRecursively(child, bones); 165 | } 166 | } 167 | 168 | /// 169 | /// Constructs human bones from skeleton bones. 170 | /// 171 | /// 172 | /// 173 | /// 174 | /// 175 | private static IResult<( 176 | HumanBone[] humanBones, 177 | IReadOnlyDictionary transformMap)> 178 | ConstructHumanBones( 179 | IReadOnlyCollection<(SkeletonBone skeletonBone, Transform transform)> skeletonBones, 180 | IEnumerable retrievers) 181 | { 182 | var humanBones = new List(); 183 | var transformMap = new Dictionary(); 184 | 185 | foreach (var retriever in retrievers) 186 | { 187 | var (part, result) = retriever.Retrieve(skeletonBones); 188 | switch (result) 189 | { 190 | case ISuccessResult<(HumanBone bone, Transform transform)> success: 191 | if (!transformMap.ContainsKey(part)) 192 | { 193 | Log.Debug("[AvatarGenerator] Succeeded to retrieve human bone {0} as {1}.", 194 | success.Result.bone.boneName, success.Result.bone.humanName); 195 | humanBones.Add(success.Result.bone); 196 | transformMap.Add(part, success.Result.transform); 197 | continue; 198 | } 199 | else 200 | { 201 | Log.Error( 202 | "[AvatarGenerator] The human bone part: {0} is already retrieved but found: {1}.", 203 | part, success.Result.bone.boneName); 204 | return Results.Fail<(HumanBone[], IReadOnlyDictionary)>( 205 | $"The human bone part: {part} is already retrieved but found: {success.Result.bone.boneName}."); 206 | } 207 | 208 | case IFailureResult<(HumanBone, Transform)> failure: 209 | if (IsHumanoidRequiredPart(part)) 210 | { 211 | Log.Error( 212 | "[AvatarGenerator] Failed to retrieve humanoid required human bone: {0} because -> {1}.", 213 | part, failure.Message); 214 | return Results.Fail<(HumanBone[], IReadOnlyDictionary)>( 215 | $"Failed to retrieve humanoid required human bone: {part} because -> {failure.Message}."); 216 | } 217 | else // Optional part 218 | { 219 | Log.Debug( 220 | "[AvatarGenerator] Failed to retrieve humanoid optional human bone: {0} because -> {1}.", 221 | part, failure.Message); 222 | continue; 223 | } 224 | 225 | default: 226 | Log.Fatal("[AvatarGenerator] Unexpected result: {0}.", nameof(result)); 227 | throw new ResultPatternMatchException(nameof(result)); 228 | } 229 | } 230 | 231 | return Results.Succeed<(HumanBone[], IReadOnlyDictionary)>(( 232 | humanBones.ToArray(), 233 | transformMap 234 | )); 235 | } 236 | 237 | /// 238 | /// Enforces T-Pose to the skeleton bones. 239 | /// 240 | /// Skeleton bones. 241 | /// Transform map of human bones. 242 | private static void EnforceSkeletonBonesOnTPose( 243 | SkeletonBone[] skeletonBones, 244 | IReadOnlyDictionary transformMap) 245 | { 246 | foreach (var (part, transform) in transformMap) 247 | { 248 | for (var i = 0; i < skeletonBones.Length; i++) 249 | { 250 | if (skeletonBones[i].name == transform.name) 251 | { 252 | // Override skeleton bone rotation by T-Pose 253 | skeletonBones[i].rotation = TPoseLocalRotation(part); 254 | } 255 | } 256 | } 257 | } 258 | 259 | /// 260 | /// Whether the part is humanoid required part. 261 | /// 262 | /// 263 | /// 264 | private static bool IsHumanoidRequiredPart(HumanBodyBones part) 265 | { 266 | switch (part) 267 | { 268 | // Required 269 | case HumanBodyBones.Hips: 270 | case HumanBodyBones.Spine: 271 | case HumanBodyBones.Head: 272 | case HumanBodyBones.LeftUpperArm: 273 | case HumanBodyBones.LeftLowerArm: 274 | case HumanBodyBones.LeftHand: 275 | case HumanBodyBones.RightUpperArm: 276 | case HumanBodyBones.RightLowerArm: 277 | case HumanBodyBones.RightHand: 278 | case HumanBodyBones.LeftUpperLeg: 279 | case HumanBodyBones.LeftLowerLeg: 280 | case HumanBodyBones.LeftFoot: 281 | case HumanBodyBones.RightUpperLeg: 282 | case HumanBodyBones.RightLowerLeg: 283 | case HumanBodyBones.RightFoot: 284 | return true; 285 | 286 | // Optional 287 | default: 288 | return false; 289 | } 290 | } 291 | 292 | /// 293 | /// T-Pose local rotation for each human bone part. 294 | /// 295 | /// Target part of human bone. 296 | /// 297 | private static Quaternion TPoseLocalRotation(HumanBodyBones part) 298 | { 299 | switch (part) 300 | { 301 | case HumanBodyBones.LeftUpperLeg: 302 | return Quaternion.Euler(new Vector3(0f, 0f, 180f)); 303 | 304 | case HumanBodyBones.LeftFoot: 305 | return Quaternion.Euler(new Vector3(90f, 0f, 0f)); 306 | 307 | case HumanBodyBones.RightUpperLeg: 308 | return Quaternion.Euler(new Vector3(0f, 0f, -180f)); 309 | 310 | case HumanBodyBones.RightFoot: 311 | return Quaternion.Euler(new Vector3(90f, 0f, 0f)); 312 | 313 | case HumanBodyBones.LeftShoulder: 314 | return Quaternion.Euler(new Vector3(90f, -90f, 0f)); 315 | 316 | case HumanBodyBones.RightShoulder: 317 | return Quaternion.Euler(new Vector3(90f, 90f, 0f)); 318 | 319 | default: 320 | return Quaternion.identity; 321 | } 322 | } 323 | } 324 | } 325 | -------------------------------------------------------------------------------- /Assets/Mochineko/DynamicUnityAvatarGenerator/AvatarGenerator.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6a4b2a4524b6e95489950937e172e808 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Mochineko/DynamicUnityAvatarGenerator/HumanBoneTransformMapCreator.cs: -------------------------------------------------------------------------------- 1 | #nullable enable 2 | using System; 3 | using System.Collections.Generic; 4 | using Mochineko.Relent.Result; 5 | using Unity.Logging; 6 | using UnityEngine; 7 | 8 | namespace Mochineko.DynamicUnityAvatarGenerator 9 | { 10 | /// 11 | /// Human bone transform map creator from . 12 | /// 13 | public static class HumanBoneTransformMapCreator 14 | { 15 | /// 16 | /// Creates human bone transform map from . 17 | /// 18 | /// Target avatar. 19 | /// Target object. 20 | /// 21 | public static IResult> 22 | MapFromAvatar(Avatar avatar, GameObject gameObject) 23 | { 24 | var map = new Dictionary(); 25 | 26 | foreach (var humanBone in avatar.humanDescription.human) 27 | { 28 | var result = FindBoneRecursively(gameObject.transform, humanBone); 29 | switch (result) 30 | { 31 | case ISuccessResult<(HumanBodyBones part, Transform transform)> success: 32 | Log.Debug("[AvatarGenerator] Found human bone transform of {0}.", humanBone.humanName); 33 | map.Add(success.Result.part, success.Result.transform); 34 | continue; 35 | 36 | case IFailureResult<(HumanBodyBones, Transform)> failure: 37 | Log.Error("[AvatarGenerator] Not found human bone of {0} because -> {1}", 38 | humanBone.humanName, failure.Message); 39 | return Results.Fail>( 40 | $"Not found human bone of {humanBone.humanName} because -> {failure.Message}."); 41 | } 42 | } 43 | 44 | Log.Info("[AvatarGenerator] Succeeded to created HumanBoneTransformMap."); 45 | return Results.Succeed>(map); 46 | } 47 | 48 | private static IResult<(HumanBodyBones, Transform)> FindBoneRecursively( 49 | Transform transform, 50 | HumanBone humanBone) 51 | { 52 | if (transform.name == humanBone.boneName) 53 | { 54 | if (Enum.TryParse(humanBone.humanName, out var part)) 55 | { 56 | return Results.Succeed((part, transform)); 57 | } 58 | else 59 | { 60 | Log.Error("[AvatarGenerator] Failed to parse HumanBodyBones from {0}.", humanBone.humanName); 61 | return Results.Fail<(HumanBodyBones, Transform)>( 62 | $"Failed to parse HumanBodyBones from {humanBone.humanName}."); 63 | } 64 | } 65 | 66 | foreach (Transform child in transform) 67 | { 68 | var result = FindBoneRecursively(child, humanBone); 69 | if (result.Success) 70 | { 71 | return result; 72 | } 73 | } 74 | 75 | return Results.Fail<(HumanBodyBones, Transform)>( 76 | $"Not found {humanBone.boneName}."); 77 | } 78 | } 79 | } 80 | -------------------------------------------------------------------------------- /Assets/Mochineko/DynamicUnityAvatarGenerator/HumanBoneTransformMapCreator.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 87f93eff1553489fbcb750068337c3dd 3 | timeCreated: 1691197240 -------------------------------------------------------------------------------- /Assets/Mochineko/DynamicUnityAvatarGenerator/HumanDescriptionParameters.cs: -------------------------------------------------------------------------------- 1 | #nullable enable 2 | namespace Mochineko.DynamicUnityAvatarGenerator 3 | { 4 | /// 5 | /// Human description parameters other than bones. 6 | /// 7 | public readonly struct HumanDescriptionParameters 8 | { 9 | public readonly float upperArmTwist; 10 | public readonly float lowerArmTwist; 11 | public readonly float upperLegTwist; 12 | public readonly float lowerLegTwist; 13 | public readonly float armStretch; 14 | public readonly float legStretch; 15 | public readonly float feetSpacing; 16 | public readonly bool hasTranslationDoF; 17 | 18 | public HumanDescriptionParameters( 19 | float upperArmTwist, 20 | float lowerArmTwist, 21 | float upperLegTwist, 22 | float lowerLegTwist, 23 | float armStretch, 24 | float legStretch, 25 | float feetSpacing, 26 | bool hasTranslationDoF) 27 | { 28 | this.upperArmTwist = upperArmTwist; 29 | this.lowerArmTwist = lowerArmTwist; 30 | this.upperLegTwist = upperLegTwist; 31 | this.lowerLegTwist = lowerLegTwist; 32 | this.armStretch = armStretch; 33 | this.legStretch = legStretch; 34 | this.feetSpacing = feetSpacing; 35 | this.hasTranslationDoF = hasTranslationDoF; 36 | } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /Assets/Mochineko/DynamicUnityAvatarGenerator/HumanDescriptionParameters.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 701179adb40f46779ee1ab2192b0aad8 3 | timeCreated: 1691032426 -------------------------------------------------------------------------------- /Assets/Mochineko/DynamicUnityAvatarGenerator/IHumanBoneRetriever.cs: -------------------------------------------------------------------------------- 1 | #nullable enable 2 | using System.Collections.Generic; 3 | using Mochineko.Relent.Result; 4 | using UnityEngine; 5 | 6 | namespace Mochineko.DynamicUnityAvatarGenerator 7 | { 8 | /// 9 | /// Retriever of human bones from skeleton bones. 10 | /// 11 | public interface IHumanBoneRetriever 12 | { 13 | /// 14 | /// Retrieves human bone from skeleton bones. 15 | /// 16 | /// 17 | /// 18 | (HumanBodyBones part, IResult<(HumanBone humanBone, Transform transform)> result) 19 | Retrieve(IEnumerable<(SkeletonBone skeletonBone, Transform transform)> skeletonBones); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Assets/Mochineko/DynamicUnityAvatarGenerator/IHumanBoneRetriever.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7b21074f3d7349dd91a40594f6bed9a8 3 | timeCreated: 1691032439 -------------------------------------------------------------------------------- /Assets/Mochineko/DynamicUnityAvatarGenerator/IRootBoneRetriever.cs: -------------------------------------------------------------------------------- 1 | #nullable enable 2 | using Mochineko.Relent.Result; 3 | using UnityEngine; 4 | 5 | namespace Mochineko.DynamicUnityAvatarGenerator 6 | { 7 | /// 8 | /// Retriever of the root bone of skeleton bones. 9 | /// 10 | public interface IRootBoneRetriever 11 | { 12 | /// 13 | /// Retrieves the root bone of skeleton bones. 14 | /// 15 | /// The root of GameObject. 16 | /// 17 | IResult Retrieve(GameObject gameObject); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /Assets/Mochineko/DynamicUnityAvatarGenerator/IRootBoneRetriever.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1343695782fb4070a5c3608c9eb3d8a5 3 | timeCreated: 1691058285 -------------------------------------------------------------------------------- /Assets/Mochineko/DynamicUnityAvatarGenerator/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2023 mochineko 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Assets/Mochineko/DynamicUnityAvatarGenerator/LICENSE.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5a42dea2844c4bcd822828d0107150c6 3 | timeCreated: 1691116602 -------------------------------------------------------------------------------- /Assets/Mochineko/DynamicUnityAvatarGenerator/Mochineko.DynamicUnityAvatarGenerator.asmdef: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Mochineko.DynamicUnityAvatarGenerator", 3 | "rootNamespace": "", 4 | "references": [ 5 | "GUID:3ed995982eec04b2e9d304b5b6242945", 6 | "GUID:fd228c28e14f1a34cbe508676c914dd7", 7 | "GUID:2665a8d13d1b3f18800f46e256720795", 8 | "GUID:e0cd26848372d4e5c891c569017e11f1", 9 | "GUID:f51ebe6a0ceec4240a699833d6309b23" 10 | ], 11 | "includePlatforms": [], 12 | "excludePlatforms": [], 13 | "allowUnsafeCode": false, 14 | "overrideReferences": true, 15 | "precompiledReferences": [], 16 | "autoReferenced": true, 17 | "defineConstraints": [], 18 | "versionDefines": [], 19 | "noEngineReferences": false 20 | } -------------------------------------------------------------------------------- /Assets/Mochineko/DynamicUnityAvatarGenerator/Mochineko.DynamicUnityAvatarGenerator.asmdef.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d067d112c52abab44a061317a9c238cf 3 | AssemblyDefinitionImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Mochineko/DynamicUnityAvatarGenerator/Presets.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3c1520aaee186494da966eaeaa3152be 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Mochineko/DynamicUnityAvatarGenerator/Presets/HumanDescriptionParametersPreset.cs: -------------------------------------------------------------------------------- 1 | #nullable enable 2 | namespace Mochineko.DynamicUnityAvatarGenerator.Presets 3 | { 4 | /// 5 | /// Preset of human description parameters. 6 | /// 7 | public static class HumanDescriptionParametersPreset 8 | { 9 | public static readonly HumanDescriptionParameters Preset = new( 10 | upperArmTwist: 0.5f, 11 | lowerArmTwist: 0.5f, 12 | upperLegTwist: 0.5f, 13 | lowerLegTwist: 0.5f, 14 | armStretch: 0.05f, 15 | legStretch: 0.05f, 16 | feetSpacing: 0, 17 | hasTranslationDoF: false 18 | ); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /Assets/Mochineko/DynamicUnityAvatarGenerator/Presets/HumanDescriptionParametersPreset.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 123cc60de4f74266a06a22a0df79dc77 3 | timeCreated: 1691113504 -------------------------------------------------------------------------------- /Assets/Mochineko/DynamicUnityAvatarGenerator/Presets/MixamoAndBipedHumanBoneRetrievers.cs: -------------------------------------------------------------------------------- 1 | #nullable enable 2 | using UnityEngine; 3 | 4 | namespace Mochineko.DynamicUnityAvatarGenerator.Presets 5 | { 6 | /// 7 | /// Preset of human bone retrievers for Mixamo and Biped. 8 | /// 9 | public static class MixamoAndBipedHumanBoneRetrievers 10 | { 11 | public static readonly IHumanBoneRetriever[] Preset = 12 | { 13 | // Spines 14 | new RegularExpressionHumanBoneRetriever( 15 | target: HumanBodyBones.Hips, 16 | limit: new HumanLimit { useDefaultValues = true }, 17 | pattern: @".*(?i)(Hips|Bip01|Pelvis)$"), 18 | 19 | new RegularExpressionHumanBoneRetriever( 20 | target: HumanBodyBones.Spine, 21 | limit: new HumanLimit { useDefaultValues = true }, 22 | pattern: @".*(?i)(Spine)$"), 23 | 24 | new RegularExpressionHumanBoneRetriever( 25 | target: HumanBodyBones.Chest, 26 | limit: new HumanLimit { useDefaultValues = true }, 27 | pattern: @".*(?i)(Spine1|Chest)$"), 28 | 29 | new RegularExpressionHumanBoneRetriever( 30 | target: HumanBodyBones.UpperChest, 31 | limit: new HumanLimit { useDefaultValues = true }, 32 | pattern: @".*(?i)(Spine2|Spine3|Spine4|UpperChest)$"), 33 | 34 | new RegularExpressionHumanBoneRetriever( 35 | target: HumanBodyBones.Neck, 36 | limit: new HumanLimit { useDefaultValues = true }, 37 | pattern: @".*(?i)(Neck|Neck1)$"), 38 | 39 | new RegularExpressionHumanBoneRetriever( 40 | target: HumanBodyBones.Head, 41 | limit: new HumanLimit { useDefaultValues = true }, 42 | pattern: @".*(?i)(Head|Head1)$"), 43 | 44 | // Left Legs 45 | new RegularExpressionHumanBoneRetriever( 46 | target: HumanBodyBones.LeftUpperLeg, 47 | limit: new HumanLimit { useDefaultValues = true }, 48 | pattern: @".*(?i)(LeftUpLeg|L\sThigh|L_Thigh|LeftUpperLeg)$"), 49 | 50 | new RegularExpressionHumanBoneRetriever( 51 | target: HumanBodyBones.LeftLowerLeg, 52 | limit: new HumanLimit { useDefaultValues = true }, 53 | pattern: @".*(?i)(LeftLeg|L\sCalf|L_Calf|LeftLowerLeg)$"), 54 | 55 | new RegularExpressionHumanBoneRetriever( 56 | target: HumanBodyBones.LeftFoot, 57 | limit: new HumanLimit { useDefaultValues = true }, 58 | pattern: @".*(?i)(LeftFoot|L\sFoot|L_Foot)$"), 59 | 60 | new RegularExpressionHumanBoneRetriever( 61 | target: HumanBodyBones.LeftToes, 62 | limit: new HumanLimit { useDefaultValues = true }, 63 | pattern: @".*(?i)(LeftToeBase|L\sToe0|L_Toe0|LeftToes)$"), 64 | 65 | // Right Legs 66 | new RegularExpressionHumanBoneRetriever( 67 | target: HumanBodyBones.RightUpperLeg, 68 | limit: new HumanLimit { useDefaultValues = true }, 69 | pattern: @".*(?i)(RightUpLeg|R\sThigh|R_Thigh|RightUpperLeg)$"), 70 | 71 | new RegularExpressionHumanBoneRetriever( 72 | target: HumanBodyBones.RightLowerLeg, 73 | limit: new HumanLimit { useDefaultValues = true }, 74 | pattern: @".*(?i)(RightLeg|R\sCalf|R_Calf|RightLowerLeg)$"), 75 | 76 | new RegularExpressionHumanBoneRetriever( 77 | target: HumanBodyBones.RightFoot, 78 | limit: new HumanLimit { useDefaultValues = true }, 79 | pattern: @".*(?i)(RightFoot|R\sFoot|R_Foot)$"), 80 | 81 | new RegularExpressionHumanBoneRetriever( 82 | target: HumanBodyBones.RightToes, 83 | limit: new HumanLimit { useDefaultValues = true }, 84 | pattern: @".*(?i)(RightToeBase|R\sToe0|R_Toe0|RightToes)$"), 85 | 86 | // Left Arms 87 | new RegularExpressionHumanBoneRetriever( 88 | target: HumanBodyBones.LeftShoulder, 89 | limit: new HumanLimit { useDefaultValues = true }, 90 | pattern: @".*(?i)(LeftShoulder|L\sClavicle|L_Clavicle)$"), 91 | 92 | new RegularExpressionHumanBoneRetriever( 93 | target: HumanBodyBones.LeftUpperArm, 94 | limit: new HumanLimit { useDefaultValues = true }, 95 | pattern: @".*(?i)(LeftArm|L\sUpperArm|L_UpperArm|LeftUpperArm)$"), 96 | 97 | new RegularExpressionHumanBoneRetriever( 98 | target: HumanBodyBones.LeftLowerArm, 99 | limit: new HumanLimit { useDefaultValues = true }, 100 | pattern: @".*(?i)(LeftForeArm|L\sForeArm|L_ForeArm|LeftLowerArm)$"), 101 | 102 | new RegularExpressionHumanBoneRetriever( 103 | target: HumanBodyBones.LeftHand, 104 | limit: new HumanLimit { useDefaultValues = true }, 105 | pattern: @".*(?i)(LeftHand|L\sHand|L_Hand|LeftWrist)$"), 106 | 107 | // Right Arms 108 | new RegularExpressionHumanBoneRetriever( 109 | target: HumanBodyBones.RightShoulder, 110 | limit: new HumanLimit { useDefaultValues = true }, 111 | pattern: @".*(?i)(RightShoulder|R\sClavicle|R_Clavicle)$"), 112 | 113 | new RegularExpressionHumanBoneRetriever( 114 | target: HumanBodyBones.RightUpperArm, 115 | limit: new HumanLimit { useDefaultValues = true }, 116 | pattern: @".*(?i)(RightArm|R\sUpperArm|R_UpperArm|RightUpperArm)$"), 117 | 118 | new RegularExpressionHumanBoneRetriever( 119 | target: HumanBodyBones.RightLowerArm, 120 | limit: new HumanLimit { useDefaultValues = true }, 121 | pattern: @".*(?i)(RightForeArm|R\sForeArm|R_ForeArm|RightLowerArm)$"), 122 | 123 | new RegularExpressionHumanBoneRetriever( 124 | target: HumanBodyBones.RightHand, 125 | limit: new HumanLimit { useDefaultValues = true }, 126 | pattern: @".*(?i)(RightHand|R\sHand|R_Hand|RightWrist)$"), 127 | 128 | // Left Fingers 129 | new RegularExpressionHumanBoneRetriever( 130 | target: HumanBodyBones.LeftThumbProximal, 131 | limit: new HumanLimit { useDefaultValues = true }, 132 | pattern: @".*(?i)(LeftHandThumb1|L\sFinger0|L_Finger0|LeftThumbProximal)$"), 133 | 134 | new RegularExpressionHumanBoneRetriever( 135 | target: HumanBodyBones.LeftThumbIntermediate, 136 | limit: new HumanLimit { useDefaultValues = true }, 137 | pattern: @".*(?i)(LeftHandThumb2|L\sFinger01|L_Finger01|LeftThumbIntermediate)$"), 138 | 139 | new RegularExpressionHumanBoneRetriever( 140 | target: HumanBodyBones.LeftThumbDistal, 141 | limit: new HumanLimit { useDefaultValues = true }, 142 | pattern: @".*(?i)(LeftHandThumb3|L\sFinger02|L_Finger02|LeftThumbDistal)$"), 143 | 144 | new RegularExpressionHumanBoneRetriever( 145 | target: HumanBodyBones.LeftIndexProximal, 146 | limit: new HumanLimit { useDefaultValues = true }, 147 | pattern: @".*(?i)(LeftHandIndex1|L\sFinger1|L_Finger1|LeftIndexProximal)$"), 148 | 149 | new RegularExpressionHumanBoneRetriever( 150 | target: HumanBodyBones.LeftIndexIntermediate, 151 | limit: new HumanLimit { useDefaultValues = true }, 152 | pattern: @".*(?i)(LeftHandIndex2|L\sFinger11|L_Finger11|LeftIndexIntermediate)$"), 153 | 154 | new RegularExpressionHumanBoneRetriever( 155 | target: HumanBodyBones.LeftIndexDistal, 156 | limit: new HumanLimit { useDefaultValues = true }, 157 | pattern: @".*(?i)(LeftHandIndex3|L\sFinger12|L_Finger12|LeftIndexDistal)$"), 158 | 159 | new RegularExpressionHumanBoneRetriever( 160 | target: HumanBodyBones.LeftMiddleProximal, 161 | limit: new HumanLimit { useDefaultValues = true }, 162 | pattern: @".*(?i)(LeftHandMiddle1|L\sFinger2|L_Finger2|LeftMiddleProximal)$"), 163 | 164 | new RegularExpressionHumanBoneRetriever( 165 | target: HumanBodyBones.LeftMiddleIntermediate, 166 | limit: new HumanLimit { useDefaultValues = true }, 167 | pattern: @".*(?i)(LeftHandMiddle2|L\sFinger21|L_Finger21|LeftMiddleIntermediate)$"), 168 | 169 | new RegularExpressionHumanBoneRetriever( 170 | target: HumanBodyBones.LeftMiddleDistal, 171 | limit: new HumanLimit { useDefaultValues = true }, 172 | pattern: @".*(?i)(LeftHandMiddle3|L\sFinger22|L_Finger22|LeftMiddleDistal)$"), 173 | 174 | new RegularExpressionHumanBoneRetriever( 175 | target: HumanBodyBones.LeftRingProximal, 176 | limit: new HumanLimit { useDefaultValues = true }, 177 | pattern: @".*(?i)(LeftHandRing1|L\sFinger3|L_Finger3|LeftRingProximal)$"), 178 | 179 | new RegularExpressionHumanBoneRetriever( 180 | target: HumanBodyBones.LeftRingIntermediate, 181 | limit: new HumanLimit { useDefaultValues = true }, 182 | pattern: @".*(?i)(LeftHandRing2|L\sFinger31|L_Finger31|LeftRingIntermediate)$"), 183 | 184 | new RegularExpressionHumanBoneRetriever( 185 | target: HumanBodyBones.LeftRingDistal, 186 | limit: new HumanLimit { useDefaultValues = true }, 187 | pattern: @".*(?i)(LeftHandRing3|L\sFinger32|L_Finger32|LeftRingDistal)$"), 188 | 189 | new RegularExpressionHumanBoneRetriever( 190 | target: HumanBodyBones.LeftLittleProximal, 191 | limit: new HumanLimit { useDefaultValues = true }, 192 | pattern: @".*(?i)(LeftHandPinky1|L\sFinger4|L_Finger4|LeftLittleProximal)$"), 193 | 194 | new RegularExpressionHumanBoneRetriever( 195 | target: HumanBodyBones.LeftLittleIntermediate, 196 | limit: new HumanLimit { useDefaultValues = true }, 197 | pattern: @".*(?i)(LeftHandPinky2|L\sFinger41|L_Finger41|LeftLittleIntermediate)$"), 198 | 199 | new RegularExpressionHumanBoneRetriever( 200 | target: HumanBodyBones.LeftLittleDistal, 201 | limit: new HumanLimit { useDefaultValues = true }, 202 | pattern: @".*(?i)(LeftHandPinky3|L\sFinger42|L_Finger42|LeftLittleDistal)$"), 203 | 204 | // Right Fingers 205 | new RegularExpressionHumanBoneRetriever( 206 | target: HumanBodyBones.RightThumbProximal, 207 | limit: new HumanLimit { useDefaultValues = true }, 208 | pattern: @".*(?i)(RightHandThumb1|R\sFinger0|R_Finger0|RightThumbProximal)$"), 209 | 210 | new RegularExpressionHumanBoneRetriever( 211 | target: HumanBodyBones.RightThumbIntermediate, 212 | limit: new HumanLimit { useDefaultValues = true }, 213 | pattern: @".*(?i)(RightHandThumb2|R\sFinger01|R_Finger01|RightThumbIntermediate)$"), 214 | 215 | new RegularExpressionHumanBoneRetriever( 216 | target: HumanBodyBones.RightThumbDistal, 217 | limit: new HumanLimit { useDefaultValues = true }, 218 | pattern: @".*(?i)(RightHandThumb3|R\sFinger02|R_Finger02|RightThumbDistal)$"), 219 | 220 | new RegularExpressionHumanBoneRetriever( 221 | target: HumanBodyBones.RightIndexProximal, 222 | limit: new HumanLimit { useDefaultValues = true }, 223 | pattern: @".*(?i)(RightHandIndex1|R\sFinger1|R_Finger1|RightIndexProximal)$"), 224 | 225 | new RegularExpressionHumanBoneRetriever( 226 | target: HumanBodyBones.RightIndexIntermediate, 227 | limit: new HumanLimit { useDefaultValues = true }, 228 | pattern: @".*(?i)(RightHandIndex2|R\sFinger11|R_Finger11|RightIndexIntermediate)$"), 229 | 230 | new RegularExpressionHumanBoneRetriever( 231 | target: HumanBodyBones.RightIndexDistal, 232 | limit: new HumanLimit { useDefaultValues = true }, 233 | pattern: @".*(?i)(RightHandIndex3|R\sFinger12|R_Finger12|RightIndexDistal)$"), 234 | 235 | new RegularExpressionHumanBoneRetriever( 236 | target: HumanBodyBones.RightMiddleProximal, 237 | limit: new HumanLimit { useDefaultValues = true }, 238 | pattern: @".*(?i)(RightHandMiddle1|R\sFinger2|R_Finger2|RightMiddleProximal)$"), 239 | 240 | new RegularExpressionHumanBoneRetriever( 241 | target: HumanBodyBones.RightMiddleIntermediate, 242 | limit: new HumanLimit { useDefaultValues = true }, 243 | pattern: @".*(?i)(RightHandMiddle2|R\sFinger21|R_Finger21|RightMiddleIntermediate)$"), 244 | 245 | new RegularExpressionHumanBoneRetriever( 246 | target: HumanBodyBones.RightMiddleDistal, 247 | limit: new HumanLimit { useDefaultValues = true }, 248 | pattern: @".*(?i)(RightHandMiddle3|R\sFinger22|R_Finger22|RightMiddleDistal)$"), 249 | 250 | new RegularExpressionHumanBoneRetriever( 251 | target: HumanBodyBones.RightRingProximal, 252 | limit: new HumanLimit { useDefaultValues = true }, 253 | pattern: @".*(?i)(RightHandRing1|R\sFinger3|R_Finger3|RightRingProximal)$"), 254 | 255 | new RegularExpressionHumanBoneRetriever( 256 | target: HumanBodyBones.RightRingIntermediate, 257 | limit: new HumanLimit { useDefaultValues = true }, 258 | pattern: @".*(?i)(RightHandRing2|R\sFinger31|R_Finger31|RightRingIntermediate)$"), 259 | 260 | new RegularExpressionHumanBoneRetriever( 261 | target: HumanBodyBones.RightRingDistal, 262 | limit: new HumanLimit { useDefaultValues = true }, 263 | pattern: @".*(?i)(RightHandRing3|R\sFinger32|R_Finger32|RightRingDistal)$"), 264 | 265 | new RegularExpressionHumanBoneRetriever( 266 | target: HumanBodyBones.RightLittleProximal, 267 | limit: new HumanLimit { useDefaultValues = true }, 268 | pattern: @".*(?i)(RightHandPinky1|R\sFinger4|R_Finger4|RightLittleProximal)$"), 269 | 270 | new RegularExpressionHumanBoneRetriever( 271 | target: HumanBodyBones.RightLittleIntermediate, 272 | limit: new HumanLimit { useDefaultValues = true }, 273 | pattern: @".*(?i)(RightHandPinky2|R\sFinger41|R_Finger41|RightLittleIntermediate)$"), 274 | 275 | new RegularExpressionHumanBoneRetriever( 276 | target: HumanBodyBones.RightLittleDistal, 277 | limit: new HumanLimit { useDefaultValues = true }, 278 | pattern: @".*(?i)(RightHandPinky3|R\sFinger42|R_Finger42|RightLittleDistal)$"), 279 | }; 280 | } 281 | } 282 | -------------------------------------------------------------------------------- /Assets/Mochineko/DynamicUnityAvatarGenerator/Presets/MixamoAndBipedHumanBoneRetrievers.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 93cd999eb0e04205b962609ad6490ee6 3 | timeCreated: 1691115533 -------------------------------------------------------------------------------- /Assets/Mochineko/DynamicUnityAvatarGenerator/Presets/MixamoAndBipedRootBoneRetriever.cs: -------------------------------------------------------------------------------- 1 | #nullable enable 2 | namespace Mochineko.DynamicUnityAvatarGenerator.Presets 3 | { 4 | /// 5 | /// Preset of root bone retriever for Mixamo and Biped. 6 | /// 7 | public static class MixamoAndBipedRootBoneRetriever 8 | { 9 | public static readonly IRootBoneRetriever Preset = new RegularExpressionRootBoneRetriever( 10 | pattern: @".*(?i)(Hips|Bip01|Pelvis)$" 11 | ); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /Assets/Mochineko/DynamicUnityAvatarGenerator/Presets/MixamoAndBipedRootBoneRetriever.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 500df22ef63540fe93d9ab277be6c190 3 | timeCreated: 1691113773 -------------------------------------------------------------------------------- /Assets/Mochineko/DynamicUnityAvatarGenerator/Presets/Mochineko.DynamicUnityAvatarGenerator.Presets.asmdef: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Mochineko.DynamicUnityAvatarGenerator.Presets", 3 | "rootNamespace": "", 4 | "references": [ 5 | "GUID:d067d112c52abab44a061317a9c238cf" 6 | ], 7 | "includePlatforms": [], 8 | "excludePlatforms": [], 9 | "allowUnsafeCode": false, 10 | "overrideReferences": true, 11 | "precompiledReferences": [], 12 | "autoReferenced": true, 13 | "defineConstraints": [], 14 | "versionDefines": [], 15 | "noEngineReferences": false 16 | } -------------------------------------------------------------------------------- /Assets/Mochineko/DynamicUnityAvatarGenerator/Presets/Mochineko.DynamicUnityAvatarGenerator.Presets.asmdef.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: dfcbe65ceb847ec43a1baf0239104373 3 | AssemblyDefinitionImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Mochineko/DynamicUnityAvatarGenerator/RegularExpressionHumanBoneRetriever.cs: -------------------------------------------------------------------------------- 1 | #nullable enable 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Text.RegularExpressions; 5 | using Mochineko.Relent.Result; 6 | using UnityEngine; 7 | 8 | namespace Mochineko.DynamicUnityAvatarGenerator 9 | { 10 | /// 11 | /// Retriever of human bones from skeleton bones by regular expression. 12 | /// 13 | public sealed class RegularExpressionHumanBoneRetriever : IHumanBoneRetriever 14 | { 15 | private readonly HumanBodyBones target; 16 | private readonly HumanLimit limit; 17 | private readonly string pattern; 18 | 19 | public RegularExpressionHumanBoneRetriever( 20 | HumanBodyBones target, 21 | HumanLimit limit, 22 | string pattern) 23 | { 24 | if (string.IsNullOrEmpty(pattern)) 25 | { 26 | throw new ArgumentException("Pattern is empty."); 27 | } 28 | 29 | this.target = target; 30 | this.limit = limit; 31 | this.pattern = pattern; 32 | } 33 | 34 | /// 35 | (HumanBodyBones part, IResult<(HumanBone humanBone, Transform transform)> result) 36 | IHumanBoneRetriever.Retrieve( 37 | IEnumerable<(SkeletonBone skeletonBone, Transform transform)> skeletonBones) 38 | { 39 | var regex = new Regex(pattern); 40 | 41 | foreach (var bone in skeletonBones) 42 | { 43 | if (regex.IsMatch(bone.skeletonBone.name)) 44 | { 45 | return ( 46 | target, 47 | Results.Succeed(( 48 | new HumanBone 49 | { 50 | boneName = bone.skeletonBone.name, 51 | humanName = target.ToString(), 52 | limit = limit 53 | }, 54 | bone.transform 55 | )) 56 | ); 57 | } 58 | } 59 | 60 | return ( 61 | target, 62 | Results.Fail<(HumanBone humanBone, Transform transform)>( 63 | $"Not found {target} human bone in skeleton bones.") 64 | ); 65 | } 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /Assets/Mochineko/DynamicUnityAvatarGenerator/RegularExpressionHumanBoneRetriever.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 74d92331135648efb16a95adb92e143e 3 | timeCreated: 1691032712 -------------------------------------------------------------------------------- /Assets/Mochineko/DynamicUnityAvatarGenerator/RegularExpressionRootBoneRetriever.cs: -------------------------------------------------------------------------------- 1 | #nullable enable 2 | using System.Text.RegularExpressions; 3 | using Mochineko.Relent.Result; 4 | using Unity.Logging; 5 | using UnityEngine; 6 | 7 | namespace Mochineko.DynamicUnityAvatarGenerator 8 | { 9 | /// 10 | /// Retriever of the root bone of skeleton bones by regular expression. 11 | /// 12 | public sealed class RegularExpressionRootBoneRetriever : IRootBoneRetriever 13 | { 14 | private readonly string pattern; 15 | 16 | public RegularExpressionRootBoneRetriever(string pattern) 17 | { 18 | this.pattern = pattern; 19 | } 20 | 21 | /// 22 | IResult IRootBoneRetriever.Retrieve(GameObject gameObject) 23 | { 24 | return FindChildRecursively(gameObject.transform, pattern); 25 | } 26 | 27 | private static IResult FindChildRecursively(Transform transform, string pattern) 28 | { 29 | if (Regex.IsMatch(transform.name, pattern)) 30 | { 31 | return Results.Succeed(transform); 32 | } 33 | 34 | foreach (Transform child in transform) 35 | { 36 | var result = FindChildRecursively(child, pattern); 37 | switch (result) 38 | { 39 | case ISuccessResult success: 40 | return success; 41 | 42 | case IFailureResult: 43 | continue; 44 | 45 | default: 46 | Log.Fatal("[AvatarGenerator] Unexpected result: {0}.", nameof(result)); 47 | throw new ResultPatternMatchException(nameof(result)); 48 | } 49 | } 50 | 51 | return Results.Fail($"Not found {pattern} pattern root bone in {transform.name}."); 52 | } 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /Assets/Mochineko/DynamicUnityAvatarGenerator/RegularExpressionRootBoneRetriever.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f173c60fc0c6408fb7f8717f401c2e61 3 | timeCreated: 1691059147 -------------------------------------------------------------------------------- /Assets/Mochineko/DynamicUnityAvatarGenerator/SpecifiedRootBoneRetriever.cs: -------------------------------------------------------------------------------- 1 | #nullable enable 2 | using Mochineko.Relent.Result; 3 | using UnityEngine; 4 | 5 | namespace Mochineko.DynamicUnityAvatarGenerator 6 | { 7 | /// 8 | /// Retriever of the root bone of skeleton bones by specified reference of the root bone. 9 | /// 10 | public sealed class SpecifiedRootBoneRetriever : IRootBoneRetriever 11 | { 12 | private readonly Transform rootBone; 13 | 14 | public SpecifiedRootBoneRetriever(Transform rootBone) 15 | { 16 | this.rootBone = rootBone; 17 | } 18 | 19 | /// 20 | IResult IRootBoneRetriever.Retrieve(GameObject gameObject) 21 | { 22 | return Results.Succeed(rootBone); 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Assets/Mochineko/DynamicUnityAvatarGenerator/SpecifiedRootBoneRetriever.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5323ceb0037640baacf476bd54a27d2b 3 | timeCreated: 1691059161 -------------------------------------------------------------------------------- /Assets/Mochineko/DynamicUnityAvatarGenerator/StringComparisionExtension.cs: -------------------------------------------------------------------------------- 1 | #nullable enable 2 | using System; 3 | 4 | namespace Mochineko.DynamicUnityAvatarGenerator 5 | { 6 | /// 7 | /// Extension methods for StringComparison. 8 | /// 9 | public static class StringComparisionExtension 10 | { 11 | /// 12 | /// Whether the name matches the rule. 13 | /// 14 | /// String comparison mode. 15 | /// Compared string. 16 | /// Keyword string. 17 | /// Case sensitive. 18 | /// 19 | /// 20 | public static bool MatchRule( 21 | this StringComparison comparison, 22 | string compared, 23 | string keyword, 24 | bool caseSensitive) 25 | { 26 | switch (comparison) 27 | { 28 | case StringComparison.Prefix: 29 | return caseSensitive 30 | ? compared.StartsWith(keyword) 31 | : compared.ToLower().StartsWith(keyword.ToLower()); 32 | 33 | case StringComparison.Suffix: 34 | return caseSensitive 35 | ? compared.EndsWith(keyword) 36 | : compared.ToLower().EndsWith(keyword.ToLower()); 37 | 38 | case StringComparison.Contains: 39 | return caseSensitive 40 | ? compared.Contains(keyword) 41 | : compared.ToLower().Contains(keyword.ToLower()); 42 | 43 | default: 44 | throw new ArgumentOutOfRangeException(nameof(comparison)); 45 | } 46 | } 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /Assets/Mochineko/DynamicUnityAvatarGenerator/StringComparisionExtension.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4a7b69bcda77457ab29dcf7e4cf5eaba 3 | timeCreated: 1691112190 -------------------------------------------------------------------------------- /Assets/Mochineko/DynamicUnityAvatarGenerator/StringComparison.cs: -------------------------------------------------------------------------------- 1 | #nullable enable 2 | namespace Mochineko.DynamicUnityAvatarGenerator 3 | { 4 | /// 5 | /// String comparison mode. 6 | /// 7 | public enum StringComparison 8 | { 9 | /// 10 | /// Matches the pattern prefix of string. 11 | /// 12 | Prefix, 13 | /// 14 | /// Matches the pattern suffix of string. 15 | /// 16 | Suffix, 17 | /// 18 | /// Contains the pattern in string. 19 | /// 20 | Contains, 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Assets/Mochineko/DynamicUnityAvatarGenerator/StringComparison.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: eb27c413f4cd493298dd99e5350d9061 3 | timeCreated: 1691111656 -------------------------------------------------------------------------------- /Assets/Mochineko/DynamicUnityAvatarGenerator/StringComparisonHumanBoneRetriever.cs: -------------------------------------------------------------------------------- 1 | #nullable enable 2 | using System; 3 | using System.Collections.Generic; 4 | using Mochineko.Relent.Result; 5 | using UnityEngine; 6 | 7 | namespace Mochineko.DynamicUnityAvatarGenerator 8 | { 9 | /// 10 | /// Retriever of human bones from skeleton bones by string comparison. 11 | /// 12 | public sealed class StringComparisonHumanBoneRetriever : IHumanBoneRetriever 13 | { 14 | private readonly HumanBodyBones target; 15 | private readonly HumanLimit limit; 16 | private readonly string keyword; 17 | private readonly StringComparison comparison; 18 | private readonly bool caseSensitive; 19 | 20 | public StringComparisonHumanBoneRetriever( 21 | HumanBodyBones target, 22 | HumanLimit limit, 23 | string keyword, 24 | StringComparison comparison, 25 | bool caseSensitive) 26 | { 27 | if (string.IsNullOrEmpty(keyword)) 28 | { 29 | throw new ArgumentException("Pattern is empty."); 30 | } 31 | 32 | this.target = target; 33 | this.limit = limit; 34 | this.keyword = keyword; 35 | this.comparison = comparison; 36 | this.caseSensitive = caseSensitive; 37 | } 38 | 39 | /// 40 | (HumanBodyBones part, IResult<(HumanBone humanBone, Transform transform)> result) 41 | IHumanBoneRetriever.Retrieve( 42 | IEnumerable<(SkeletonBone skeletonBone, Transform transform)> skeletonBones) 43 | { 44 | foreach (var bone in skeletonBones) 45 | { 46 | if (comparison.MatchRule(bone.skeletonBone.name, keyword, caseSensitive)) 47 | { 48 | return ( 49 | target, 50 | Results.Succeed(( 51 | new HumanBone 52 | { 53 | boneName = bone.skeletonBone.name, 54 | humanName = target.ToString(), 55 | limit = limit 56 | }, 57 | bone.transform)) 58 | ); 59 | } 60 | } 61 | 62 | return ( 63 | target, 64 | Results.Fail<(HumanBone, Transform)>( 65 | $"Not found {target} human bone in skeleton bones.") 66 | ); 67 | } 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /Assets/Mochineko/DynamicUnityAvatarGenerator/StringComparisonHumanBoneRetriever.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a00a7b158bef48ae97869cf1f852c40a 3 | timeCreated: 1691033929 -------------------------------------------------------------------------------- /Assets/Mochineko/DynamicUnityAvatarGenerator/StringComparisonRootBoneRetriever.cs: -------------------------------------------------------------------------------- 1 | #nullable enable 2 | using System; 3 | using Mochineko.Relent.Result; 4 | using Unity.Logging; 5 | using UnityEngine; 6 | 7 | namespace Mochineko.DynamicUnityAvatarGenerator 8 | { 9 | /// 10 | /// Retriever of the root bone of skeleton bones by string comparison. 11 | /// 12 | public sealed class StringComparisonRootBoneRetriever : IRootBoneRetriever 13 | { 14 | private readonly string keyword; 15 | private readonly StringComparison comparison; 16 | private readonly bool caseSensitive; 17 | 18 | public StringComparisonRootBoneRetriever( 19 | string keyword, 20 | StringComparison comparison, 21 | bool caseSensitive) 22 | { 23 | if (string.IsNullOrEmpty(keyword)) 24 | { 25 | throw new ArgumentException("Keyword is empty."); 26 | } 27 | 28 | this.keyword = keyword; 29 | this.comparison = comparison; 30 | this.caseSensitive = caseSensitive; 31 | } 32 | 33 | /// 34 | IResult IRootBoneRetriever.Retrieve(GameObject gameObject) 35 | { 36 | return FindChildRecursively(gameObject.transform); 37 | } 38 | 39 | private IResult FindChildRecursively(Transform transform) 40 | { 41 | if (comparison.MatchRule(transform.name, keyword, caseSensitive)) 42 | { 43 | return Results.Succeed(transform); 44 | } 45 | 46 | foreach (Transform child in transform) 47 | { 48 | var result = FindChildRecursively(child); 49 | switch (result) 50 | { 51 | case ISuccessResult success: 52 | return success; 53 | 54 | case IFailureResult: 55 | continue; 56 | 57 | default: 58 | Log.Fatal("[AvatarGenerator] Unexpected result: {0}.", nameof(result)); 59 | throw new ResultPatternMatchException(nameof(result)); 60 | } 61 | } 62 | 63 | return Results.Fail( 64 | $"Not found root bone in {transform.name} by keyword: {keyword}, comparision: {comparison}, case sensitive: {caseSensitive}."); 65 | } 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /Assets/Mochineko/DynamicUnityAvatarGenerator/StringComparisonRootBoneRetriever.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 368384b2bd6342e1a66a7179f6aef27a 3 | timeCreated: 1691111927 -------------------------------------------------------------------------------- /Assets/Mochineko/DynamicUnityAvatarGenerator/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "com.mochineko.dynamic-unity-avatar-generator", 3 | "version": "0.2.1", 4 | "displayName": "Dynamic Unity Avatar Generator", 5 | "description": "Dynamically generates `UnityEngine.Avatar` from skeleton bones at runtime.", 6 | "unity": "2022.3", 7 | "author": { 8 | "name": "Mochineko", 9 | "email": "t.o.e.4315@gmail.com" 10 | }, 11 | "repository": { 12 | "type": "git", 13 | "url": "git+ssh://git@github.com:mochi-neko/dynamic-unity-avatar-generator.git" 14 | }, 15 | "dependencies": { 16 | "com.unity.logging": "1.0.11" 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /Assets/Mochineko/DynamicUnityAvatarGenerator/package.json.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6d609abfdef04a32a7ee4633a0fdd19a 3 | timeCreated: 1691116612 -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | All notable changes to this project will be documented in this file. 4 | 5 | The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), 6 | and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). 7 | 8 | ## [Unreleased] 9 | 10 | ## [0.2.1] - 2023-08-19 11 | 12 | ### Fixed 13 | - Enforce skeleton bones on T-pose before building `UnityEngine.Avatar`. 14 | 15 | ## [0.2.0] - 2023-08-05 16 | 17 | ### Added 18 | - Add transform map of human bones to result. 19 | - Add transform map creator from existing `UnityEngine.Avatar`. 20 | 21 | ## [0.1.1] - 2023-08-04 22 | 23 | ### Fixed 24 | - Fix to add parent of root bone to human bones. 25 | 26 | ## [0.1.0] - 2023-08-04 27 | 28 | ### Added 29 | - Humanoid `UnityEngine.Avatar` generator. 30 | - A root bone retriever by regular expression matching. 31 | - A root bone retriever by specifying root bone instance. 32 | - A root bone retriever by string comparison rule. 33 | - A human bone retriever by regular expression matching. 34 | - A human bone retriever by string comparison rule. 35 | - A preset of root bone retriever for Mixamo and Biped. 36 | - A preset of human bone retrievers for Mixamo and Biped. 37 | - A preset of human description parameters. 38 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2023 mochineko 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /NOTICE.md: -------------------------------------------------------------------------------- 1 | # NOTICE 2 | 3 | This repository depends on following 3rd party libraries via Unity Package Manager. 4 | 5 | ## UniTask 6 | 7 | https://github.com/Cysharp/UniTask 8 | 9 | ``` 10 | The MIT License (MIT) 11 | 12 | Copyright (c) 2019 Yoshifumi Kawai / Cysharp, Inc. 13 | 14 | Permission is hereby granted, free of charge, to any person obtaining a copy 15 | of this software and associated documentation files (the "Software"), to deal 16 | in the Software without restriction, including without limitation the rights 17 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 18 | copies of the Software, and to permit persons to whom the Software is 19 | furnished to do so, subject to the following conditions: 20 | 21 | The above copyright notice and this permission notice shall be included in all 22 | copies or substantial portions of the Software. 23 | 24 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 25 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 26 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 27 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 28 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 29 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 30 | SOFTWARE. 31 | ``` 32 | 33 | ## Fluent Assertions for Unity 34 | 35 | https://github.com/BoundfoxStudios/fluentassertions-unity 36 | 37 | ``` 38 | Apache License 39 | Version 2.0, January 2004 40 | http://www.apache.org/licenses/ 41 | 42 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 43 | 44 | 1. Definitions. 45 | 46 | "License" shall mean the terms and conditions for use, reproduction, 47 | and distribution as defined by Sections 1 through 9 of this document. 48 | 49 | "Licensor" shall mean the copyright owner or entity authorized by 50 | the copyright owner that is granting the License. 51 | 52 | "Legal Entity" shall mean the union of the acting entity and all 53 | other entities that control, are controlled by, or are under common 54 | control with that entity. For the purposes of this definition, 55 | "control" means (i) the power, direct or indirect, to cause the 56 | direction or management of such entity, whether by contract or 57 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 58 | outstanding shares, or (iii) beneficial ownership of such entity. 59 | 60 | "You" (or "Your") shall mean an individual or Legal Entity 61 | exercising permissions granted by this License. 62 | 63 | "Source" form shall mean the preferred form for making modifications, 64 | including but not limited to software source code, documentation 65 | source, and configuration files. 66 | 67 | "Object" form shall mean any form resulting from mechanical 68 | transformation or translation of a Source form, including but 69 | not limited to compiled object code, generated documentation, 70 | and conversions to other media types. 71 | 72 | "Work" shall mean the work of authorship, whether in Source or 73 | Object form, made available under the License, as indicated by a 74 | copyright notice that is included in or attached to the work 75 | (an example is provided in the Appendix below). 76 | 77 | "Derivative Works" shall mean any work, whether in Source or Object 78 | form, that is based on (or derived from) the Work and for which the 79 | editorial revisions, annotations, elaborations, or other modifications 80 | represent, as a whole, an original work of authorship. For the purposes 81 | of this License, Derivative Works shall not include works that remain 82 | separable from, or merely link (or bind by name) to the interfaces of, 83 | the Work and Derivative Works thereof. 84 | 85 | "Contribution" shall mean any work of authorship, including 86 | the original version of the Work and any modifications or additions 87 | to that Work or Derivative Works thereof, that is intentionally 88 | submitted to Licensor for inclusion in the Work by the copyright owner 89 | or by an individual or Legal Entity authorized to submit on behalf of 90 | the copyright owner. For the purposes of this definition, "submitted" 91 | means any form of electronic, verbal, or written communication sent 92 | to the Licensor or its representatives, including but not limited to 93 | communication on electronic mailing lists, source code control systems, 94 | and issue tracking systems that are managed by, or on behalf of, the 95 | Licensor for the purpose of discussing and improving the Work, but 96 | excluding communication that is conspicuously marked or otherwise 97 | designated in writing by the copyright owner as "Not a Contribution." 98 | 99 | "Contributor" shall mean Licensor and any individual or Legal Entity 100 | on behalf of whom a Contribution has been received by Licensor and 101 | subsequently incorporated within the Work. 102 | 103 | 2. Grant of Copyright License. Subject to the terms and conditions of 104 | this License, each Contributor hereby grants to You a perpetual, 105 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 106 | copyright license to reproduce, prepare Derivative Works of, 107 | publicly display, publicly perform, sublicense, and distribute the 108 | Work and such Derivative Works in Source or Object form. 109 | 110 | 3. Grant of Patent License. Subject to the terms and conditions of 111 | this License, each Contributor hereby grants to You a perpetual, 112 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 113 | (except as stated in this section) patent license to make, have made, 114 | use, offer to sell, sell, import, and otherwise transfer the Work, 115 | where such license applies only to those patent claims licensable 116 | by such Contributor that are necessarily infringed by their 117 | Contribution(s) alone or by combination of their Contribution(s) 118 | with the Work to which such Contribution(s) was submitted. If You 119 | institute patent litigation against any entity (including a 120 | cross-claim or counterclaim in a lawsuit) alleging that the Work 121 | or a Contribution incorporated within the Work constitutes direct 122 | or contributory patent infringement, then any patent licenses 123 | granted to You under this License for that Work shall terminate 124 | as of the date such litigation is filed. 125 | 126 | 4. Redistribution. You may reproduce and distribute copies of the 127 | Work or Derivative Works thereof in any medium, with or without 128 | modifications, and in Source or Object form, provided that You 129 | meet the following conditions: 130 | 131 | (a) You must give any other recipients of the Work or 132 | Derivative Works a copy of this License; and 133 | 134 | (b) You must cause any modified files to carry prominent notices 135 | stating that You changed the files; and 136 | 137 | (c) You must retain, in the Source form of any Derivative Works 138 | that You distribute, all copyright, patent, trademark, and 139 | attribution notices from the Source form of the Work, 140 | excluding those notices that do not pertain to any part of 141 | the Derivative Works; and 142 | 143 | (d) If the Work includes a "NOTICE" text file as part of its 144 | distribution, then any Derivative Works that You distribute must 145 | include a readable copy of the attribution notices contained 146 | within such NOTICE file, excluding those notices that do not 147 | pertain to any part of the Derivative Works, in at least one 148 | of the following places: within a NOTICE text file distributed 149 | as part of the Derivative Works; within the Source form or 150 | documentation, if provided along with the Derivative Works; or, 151 | within a display generated by the Derivative Works, if and 152 | wherever such third-party notices normally appear. The contents 153 | of the NOTICE file are for informational purposes only and 154 | do not modify the License. You may add Your own attribution 155 | notices within Derivative Works that You distribute, alongside 156 | or as an addendum to the NOTICE text from the Work, provided 157 | that such additional attribution notices cannot be construed 158 | as modifying the License. 159 | 160 | You may add Your own copyright statement to Your modifications and 161 | may provide additional or different license terms and conditions 162 | for use, reproduction, or distribution of Your modifications, or 163 | for any such Derivative Works as a whole, provided Your use, 164 | reproduction, and distribution of the Work otherwise complies with 165 | the conditions stated in this License. 166 | 167 | 5. Submission of Contributions. Unless You explicitly state otherwise, 168 | any Contribution intentionally submitted for inclusion in the Work 169 | by You to the Licensor shall be under the terms and conditions of 170 | this License, without any additional terms or conditions. 171 | Notwithstanding the above, nothing herein shall supersede or modify 172 | the terms of any separate license agreement you may have executed 173 | with Licensor regarding such Contributions. 174 | 175 | 6. Trademarks. This License does not grant permission to use the trade 176 | names, trademarks, service marks, or product names of the Licensor, 177 | except as required for reasonable and customary use in describing the 178 | origin of the Work and reproducing the content of the NOTICE file. 179 | 180 | 7. Disclaimer of Warranty. Unless required by applicable law or 181 | agreed to in writing, Licensor provides the Work (and each 182 | Contributor provides its Contributions) on an "AS IS" BASIS, 183 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 184 | implied, including, without limitation, any warranties or conditions 185 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 186 | PARTICULAR PURPOSE. You are solely responsible for determining the 187 | appropriateness of using or redistributing the Work and assume any 188 | risks associated with Your exercise of permissions under this License. 189 | 190 | 8. Limitation of Liability. In no event and under no legal theory, 191 | whether in tort (including negligence), contract, or otherwise, 192 | unless required by applicable law (such as deliberate and grossly 193 | negligent acts) or agreed to in writing, shall any Contributor be 194 | liable to You for damages, including any direct, indirect, special, 195 | incidental, or consequential damages of any character arising as a 196 | result of this License or out of the use or inability to use the 197 | Work (including but not limited to damages for loss of goodwill, 198 | work stoppage, computer failure or malfunction, or any and all 199 | other commercial damages or losses), even if such Contributor 200 | has been advised of the possibility of such damages. 201 | 202 | 9. Accepting Warranty or Additional Liability. While redistributing 203 | the Work or Derivative Works thereof, You may choose to offer, 204 | and charge a fee for, acceptance of support, warranty, indemnity, 205 | or other liability obligations and/or rights consistent with this 206 | License. However, in accepting such obligations, You may act only 207 | on Your own behalf and on Your sole responsibility, not on behalf 208 | of any other Contributor, and only if You agree to indemnify, 209 | defend, and hold each Contributor harmless for any liability 210 | incurred by, or claims asserted against, such Contributor by reason 211 | of your accepting any such warranty or additional liability. 212 | 213 | END OF TERMS AND CONDITIONS 214 | 215 | APPENDIX: How to apply the Apache License to your work. 216 | 217 | To apply the Apache License to your work, attach the following 218 | boilerplate notice, with the fields enclosed by brackets "[]" 219 | replaced with your own identifying information. (Don't include 220 | the brackets!) The text should be enclosed in the appropriate 221 | comment syntax for the file format. We also recommend that a 222 | file or class name and description of purpose be included on the 223 | same "printed page" as the copyright notice for easier 224 | identification within third-party archives. 225 | 226 | Copyright [yyyy] [name of copyright owner] 227 | 228 | Licensed under the Apache License, Version 2.0 (the "License"); 229 | you may not use this file except in compliance with the License. 230 | You may obtain a copy of the License at 231 | 232 | http://www.apache.org/licenses/LICENSE-2.0 233 | 234 | Unless required by applicable law or agreed to in writing, software 235 | distributed under the License is distributed on an "AS IS" BASIS, 236 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 237 | See the License for the specific language governing permissions and 238 | limitations under the License. 239 | ``` 240 | 241 | ## UniVRM 242 | 243 | https://github.com/vrm-c/UniVRM 244 | 245 | ``` 246 | MIT License 247 | 248 | Copyright (c) 2020 VRM Consortium 249 | Copyright (c) 2018 Masataka SUMI for MToon 250 | 251 | Permission is hereby granted, free of charge, to any person obtaining a copy 252 | of this software and associated documentation files (the "Software"), to deal 253 | in the Software without restriction, including without limitation the rights 254 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 255 | copies of the Software, and to permit persons to whom the Software is 256 | furnished to do so, subject to the following conditions: 257 | 258 | The above copyright notice and this permission notice shall be included in all 259 | copies or substantial portions of the Software. 260 | 261 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 262 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 263 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 264 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 265 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 266 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 267 | SOFTWARE. 268 | ``` 269 | 270 | ## Relent 271 | 272 | https://github.com/mochi-neko/Relent 273 | 274 | ``` 275 | MIT License 276 | 277 | Copyright (c) 2023 mochineko 278 | 279 | Permission is hereby granted, free of charge, to any person obtaining a copy 280 | of this software and associated documentation files (the "Software"), to deal 281 | in the Software without restriction, including without limitation the rights 282 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 283 | copies of the Software, and to permit persons to whom the Software is 284 | furnished to do so, subject to the following conditions: 285 | 286 | The above copyright notice and this permission notice shall be included in all 287 | copies or substantial portions of the Software. 288 | 289 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 290 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 291 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 292 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 293 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 294 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 295 | SOFTWARE. 296 | ``` 297 | -------------------------------------------------------------------------------- /Packages/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "com.mochineko.relent": "https://github.com/mochi-neko/Relent.git?path=/Assets/Mochineko/Relent#0.2.0", 4 | "com.cysharp.unitask": "https://github.com/Cysharp/UniTask.git?path=src/UniTask/Assets/Plugins/UniTask", 5 | "com.boundfoxstudios.fluentassertions": "https://github.com/BoundfoxStudios/fluentassertions-unity.git#upm", 6 | "com.vrmc.gltf": "https://github.com/vrm-c/UniVRM.git?path=/Assets/UniGLTF#v0.113.0", 7 | "com.vrmc.vrm": "https://github.com/vrm-c/UniVRM.git?path=/Assets/VRM10#v0.113.0", 8 | "com.vrmc.vrmshaders": "https://github.com/vrm-c/UniVRM.git?path=/Assets/VRMShaders#v0.113.0", 9 | "com.unity.burst": "1.8.7", 10 | "com.unity.feature.development": "1.0.1", 11 | "com.unity.logging": "1.0.11", 12 | "com.unity.textmeshpro": "3.0.6", 13 | "com.unity.ugui": "1.0.0", 14 | "com.unity.test-framework": "2.0.1-pre.18", 15 | "com.unity.modules.ai": "1.0.0", 16 | "com.unity.modules.androidjni": "1.0.0", 17 | "com.unity.modules.animation": "1.0.0", 18 | "com.unity.modules.assetbundle": "1.0.0", 19 | "com.unity.modules.audio": "1.0.0", 20 | "com.unity.modules.cloth": "1.0.0", 21 | "com.unity.modules.director": "1.0.0", 22 | "com.unity.modules.imageconversion": "1.0.0", 23 | "com.unity.modules.imgui": "1.0.0", 24 | "com.unity.modules.jsonserialize": "1.0.0", 25 | "com.unity.modules.particlesystem": "1.0.0", 26 | "com.unity.modules.physics": "1.0.0", 27 | "com.unity.modules.physics2d": "1.0.0", 28 | "com.unity.modules.screencapture": "1.0.0", 29 | "com.unity.modules.terrain": "1.0.0", 30 | "com.unity.modules.terrainphysics": "1.0.0", 31 | "com.unity.modules.tilemap": "1.0.0", 32 | "com.unity.modules.ui": "1.0.0", 33 | "com.unity.modules.uielements": "1.0.0", 34 | "com.unity.modules.umbra": "1.0.0", 35 | "com.unity.modules.unityanalytics": "1.0.0", 36 | "com.unity.modules.unitywebrequest": "1.0.0", 37 | "com.unity.modules.unitywebrequestassetbundle": "1.0.0", 38 | "com.unity.modules.unitywebrequestaudio": "1.0.0", 39 | "com.unity.modules.unitywebrequesttexture": "1.0.0", 40 | "com.unity.modules.unitywebrequestwww": "1.0.0", 41 | "com.unity.modules.vehicles": "1.0.0", 42 | "com.unity.modules.video": "1.0.0", 43 | "com.unity.modules.vr": "1.0.0", 44 | "com.unity.modules.wind": "1.0.0", 45 | "com.unity.modules.xr": "1.0.0" 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /Packages/packages-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "com.boundfoxstudios.fluentassertions": { 4 | "version": "https://github.com/BoundfoxStudios/fluentassertions-unity.git#upm", 5 | "depth": 0, 6 | "source": "git", 7 | "dependencies": {}, 8 | "hash": "ac405b32a618bf9d9880e4fc1b63c5e45036c72c" 9 | }, 10 | "com.cysharp.unitask": { 11 | "version": "https://github.com/Cysharp/UniTask.git?path=src/UniTask/Assets/Plugins/UniTask", 12 | "depth": 0, 13 | "source": "git", 14 | "dependencies": {}, 15 | "hash": "d210e3d76adc0cce77f4ad2af1ade88dad6b1d5a" 16 | }, 17 | "com.mochineko.relent": { 18 | "version": "https://github.com/mochi-neko/Relent.git?path=/Assets/Mochineko/Relent#0.2.0", 19 | "depth": 0, 20 | "source": "git", 21 | "dependencies": {}, 22 | "hash": "5fd87387912763429e4c8008157ed6a654c3093c" 23 | }, 24 | "com.unity.burst": { 25 | "version": "1.8.7", 26 | "depth": 0, 27 | "source": "registry", 28 | "dependencies": { 29 | "com.unity.mathematics": "1.2.1" 30 | }, 31 | "url": "https://packages.unity.com" 32 | }, 33 | "com.unity.collections": { 34 | "version": "2.1.4", 35 | "depth": 1, 36 | "source": "registry", 37 | "dependencies": { 38 | "com.unity.burst": "1.8.4", 39 | "com.unity.modules.unityanalytics": "1.0.0", 40 | "com.unity.nuget.mono-cecil": "1.11.4" 41 | }, 42 | "url": "https://packages.unity.com" 43 | }, 44 | "com.unity.editorcoroutines": { 45 | "version": "1.0.0", 46 | "depth": 1, 47 | "source": "registry", 48 | "dependencies": {}, 49 | "url": "https://packages.unity.com" 50 | }, 51 | "com.unity.ext.nunit": { 52 | "version": "2.0.2", 53 | "depth": 1, 54 | "source": "registry", 55 | "dependencies": {}, 56 | "url": "https://packages.unity.com" 57 | }, 58 | "com.unity.feature.development": { 59 | "version": "1.0.1", 60 | "depth": 0, 61 | "source": "builtin", 62 | "dependencies": { 63 | "com.unity.ide.visualstudio": "2.0.18", 64 | "com.unity.ide.rider": "3.0.21", 65 | "com.unity.ide.vscode": "1.2.5", 66 | "com.unity.editorcoroutines": "1.0.0", 67 | "com.unity.performance.profile-analyzer": "1.2.2", 68 | "com.unity.test-framework": "1.1.33", 69 | "com.unity.testtools.codecoverage": "1.2.3" 70 | } 71 | }, 72 | "com.unity.ide.rider": { 73 | "version": "3.0.21", 74 | "depth": 1, 75 | "source": "registry", 76 | "dependencies": { 77 | "com.unity.ext.nunit": "1.0.6" 78 | }, 79 | "url": "https://packages.unity.com" 80 | }, 81 | "com.unity.ide.visualstudio": { 82 | "version": "2.0.18", 83 | "depth": 1, 84 | "source": "registry", 85 | "dependencies": { 86 | "com.unity.test-framework": "1.1.9" 87 | }, 88 | "url": "https://packages.unity.com" 89 | }, 90 | "com.unity.ide.vscode": { 91 | "version": "1.2.5", 92 | "depth": 1, 93 | "source": "registry", 94 | "dependencies": {}, 95 | "url": "https://packages.unity.com" 96 | }, 97 | "com.unity.logging": { 98 | "version": "1.0.11", 99 | "depth": 0, 100 | "source": "registry", 101 | "dependencies": { 102 | "com.unity.burst": "1.8.4", 103 | "com.unity.collections": "2.1.4" 104 | }, 105 | "url": "https://packages.unity.com" 106 | }, 107 | "com.unity.mathematics": { 108 | "version": "1.2.6", 109 | "depth": 1, 110 | "source": "registry", 111 | "dependencies": {}, 112 | "url": "https://packages.unity.com" 113 | }, 114 | "com.unity.nuget.mono-cecil": { 115 | "version": "1.11.4", 116 | "depth": 2, 117 | "source": "registry", 118 | "dependencies": {}, 119 | "url": "https://packages.unity.com" 120 | }, 121 | "com.unity.performance.profile-analyzer": { 122 | "version": "1.2.2", 123 | "depth": 1, 124 | "source": "registry", 125 | "dependencies": {}, 126 | "url": "https://packages.unity.com" 127 | }, 128 | "com.unity.settings-manager": { 129 | "version": "2.0.1", 130 | "depth": 2, 131 | "source": "registry", 132 | "dependencies": {}, 133 | "url": "https://packages.unity.com" 134 | }, 135 | "com.unity.test-framework": { 136 | "version": "2.0.1-pre.18", 137 | "depth": 0, 138 | "source": "registry", 139 | "dependencies": { 140 | "com.unity.ext.nunit": "2.0.2", 141 | "com.unity.modules.imgui": "1.0.0", 142 | "com.unity.modules.jsonserialize": "1.0.0" 143 | }, 144 | "url": "https://packages.unity.com" 145 | }, 146 | "com.unity.testtools.codecoverage": { 147 | "version": "1.2.3", 148 | "depth": 1, 149 | "source": "registry", 150 | "dependencies": { 151 | "com.unity.test-framework": "1.0.16", 152 | "com.unity.settings-manager": "1.0.1" 153 | }, 154 | "url": "https://packages.unity.com" 155 | }, 156 | "com.unity.textmeshpro": { 157 | "version": "3.0.6", 158 | "depth": 0, 159 | "source": "registry", 160 | "dependencies": { 161 | "com.unity.ugui": "1.0.0" 162 | }, 163 | "url": "https://packages.unity.com" 164 | }, 165 | "com.unity.ugui": { 166 | "version": "1.0.0", 167 | "depth": 0, 168 | "source": "builtin", 169 | "dependencies": { 170 | "com.unity.modules.ui": "1.0.0", 171 | "com.unity.modules.imgui": "1.0.0" 172 | } 173 | }, 174 | "com.vrmc.gltf": { 175 | "version": "https://github.com/vrm-c/UniVRM.git?path=/Assets/UniGLTF#v0.113.0", 176 | "depth": 0, 177 | "source": "git", 178 | "dependencies": { 179 | "com.vrmc.vrmshaders": "0.113.0", 180 | "com.unity.modules.animation": "1.0.0" 181 | }, 182 | "hash": "01659457d8f0db619c97356c684682a472bb6dd1" 183 | }, 184 | "com.vrmc.vrm": { 185 | "version": "https://github.com/vrm-c/UniVRM.git?path=/Assets/VRM10#v0.113.0", 186 | "depth": 0, 187 | "source": "git", 188 | "dependencies": { 189 | "com.vrmc.vrmshaders": "0.113.0", 190 | "com.vrmc.gltf": "0.113.0" 191 | }, 192 | "hash": "01659457d8f0db619c97356c684682a472bb6dd1" 193 | }, 194 | "com.vrmc.vrmshaders": { 195 | "version": "https://github.com/vrm-c/UniVRM.git?path=/Assets/VRMShaders#v0.113.0", 196 | "depth": 0, 197 | "source": "git", 198 | "dependencies": { 199 | "com.unity.modules.imageconversion": "1.0.0" 200 | }, 201 | "hash": "01659457d8f0db619c97356c684682a472bb6dd1" 202 | }, 203 | "com.unity.modules.ai": { 204 | "version": "1.0.0", 205 | "depth": 0, 206 | "source": "builtin", 207 | "dependencies": {} 208 | }, 209 | "com.unity.modules.androidjni": { 210 | "version": "1.0.0", 211 | "depth": 0, 212 | "source": "builtin", 213 | "dependencies": {} 214 | }, 215 | "com.unity.modules.animation": { 216 | "version": "1.0.0", 217 | "depth": 0, 218 | "source": "builtin", 219 | "dependencies": {} 220 | }, 221 | "com.unity.modules.assetbundle": { 222 | "version": "1.0.0", 223 | "depth": 0, 224 | "source": "builtin", 225 | "dependencies": {} 226 | }, 227 | "com.unity.modules.audio": { 228 | "version": "1.0.0", 229 | "depth": 0, 230 | "source": "builtin", 231 | "dependencies": {} 232 | }, 233 | "com.unity.modules.cloth": { 234 | "version": "1.0.0", 235 | "depth": 0, 236 | "source": "builtin", 237 | "dependencies": { 238 | "com.unity.modules.physics": "1.0.0" 239 | } 240 | }, 241 | "com.unity.modules.director": { 242 | "version": "1.0.0", 243 | "depth": 0, 244 | "source": "builtin", 245 | "dependencies": { 246 | "com.unity.modules.audio": "1.0.0", 247 | "com.unity.modules.animation": "1.0.0" 248 | } 249 | }, 250 | "com.unity.modules.imageconversion": { 251 | "version": "1.0.0", 252 | "depth": 0, 253 | "source": "builtin", 254 | "dependencies": {} 255 | }, 256 | "com.unity.modules.imgui": { 257 | "version": "1.0.0", 258 | "depth": 0, 259 | "source": "builtin", 260 | "dependencies": {} 261 | }, 262 | "com.unity.modules.jsonserialize": { 263 | "version": "1.0.0", 264 | "depth": 0, 265 | "source": "builtin", 266 | "dependencies": {} 267 | }, 268 | "com.unity.modules.particlesystem": { 269 | "version": "1.0.0", 270 | "depth": 0, 271 | "source": "builtin", 272 | "dependencies": {} 273 | }, 274 | "com.unity.modules.physics": { 275 | "version": "1.0.0", 276 | "depth": 0, 277 | "source": "builtin", 278 | "dependencies": {} 279 | }, 280 | "com.unity.modules.physics2d": { 281 | "version": "1.0.0", 282 | "depth": 0, 283 | "source": "builtin", 284 | "dependencies": {} 285 | }, 286 | "com.unity.modules.screencapture": { 287 | "version": "1.0.0", 288 | "depth": 0, 289 | "source": "builtin", 290 | "dependencies": { 291 | "com.unity.modules.imageconversion": "1.0.0" 292 | } 293 | }, 294 | "com.unity.modules.subsystems": { 295 | "version": "1.0.0", 296 | "depth": 1, 297 | "source": "builtin", 298 | "dependencies": { 299 | "com.unity.modules.jsonserialize": "1.0.0" 300 | } 301 | }, 302 | "com.unity.modules.terrain": { 303 | "version": "1.0.0", 304 | "depth": 0, 305 | "source": "builtin", 306 | "dependencies": {} 307 | }, 308 | "com.unity.modules.terrainphysics": { 309 | "version": "1.0.0", 310 | "depth": 0, 311 | "source": "builtin", 312 | "dependencies": { 313 | "com.unity.modules.physics": "1.0.0", 314 | "com.unity.modules.terrain": "1.0.0" 315 | } 316 | }, 317 | "com.unity.modules.tilemap": { 318 | "version": "1.0.0", 319 | "depth": 0, 320 | "source": "builtin", 321 | "dependencies": { 322 | "com.unity.modules.physics2d": "1.0.0" 323 | } 324 | }, 325 | "com.unity.modules.ui": { 326 | "version": "1.0.0", 327 | "depth": 0, 328 | "source": "builtin", 329 | "dependencies": {} 330 | }, 331 | "com.unity.modules.uielements": { 332 | "version": "1.0.0", 333 | "depth": 0, 334 | "source": "builtin", 335 | "dependencies": { 336 | "com.unity.modules.ui": "1.0.0", 337 | "com.unity.modules.imgui": "1.0.0", 338 | "com.unity.modules.jsonserialize": "1.0.0" 339 | } 340 | }, 341 | "com.unity.modules.umbra": { 342 | "version": "1.0.0", 343 | "depth": 0, 344 | "source": "builtin", 345 | "dependencies": {} 346 | }, 347 | "com.unity.modules.unityanalytics": { 348 | "version": "1.0.0", 349 | "depth": 0, 350 | "source": "builtin", 351 | "dependencies": { 352 | "com.unity.modules.unitywebrequest": "1.0.0", 353 | "com.unity.modules.jsonserialize": "1.0.0" 354 | } 355 | }, 356 | "com.unity.modules.unitywebrequest": { 357 | "version": "1.0.0", 358 | "depth": 0, 359 | "source": "builtin", 360 | "dependencies": {} 361 | }, 362 | "com.unity.modules.unitywebrequestassetbundle": { 363 | "version": "1.0.0", 364 | "depth": 0, 365 | "source": "builtin", 366 | "dependencies": { 367 | "com.unity.modules.assetbundle": "1.0.0", 368 | "com.unity.modules.unitywebrequest": "1.0.0" 369 | } 370 | }, 371 | "com.unity.modules.unitywebrequestaudio": { 372 | "version": "1.0.0", 373 | "depth": 0, 374 | "source": "builtin", 375 | "dependencies": { 376 | "com.unity.modules.unitywebrequest": "1.0.0", 377 | "com.unity.modules.audio": "1.0.0" 378 | } 379 | }, 380 | "com.unity.modules.unitywebrequesttexture": { 381 | "version": "1.0.0", 382 | "depth": 0, 383 | "source": "builtin", 384 | "dependencies": { 385 | "com.unity.modules.unitywebrequest": "1.0.0", 386 | "com.unity.modules.imageconversion": "1.0.0" 387 | } 388 | }, 389 | "com.unity.modules.unitywebrequestwww": { 390 | "version": "1.0.0", 391 | "depth": 0, 392 | "source": "builtin", 393 | "dependencies": { 394 | "com.unity.modules.unitywebrequest": "1.0.0", 395 | "com.unity.modules.unitywebrequestassetbundle": "1.0.0", 396 | "com.unity.modules.unitywebrequestaudio": "1.0.0", 397 | "com.unity.modules.audio": "1.0.0", 398 | "com.unity.modules.assetbundle": "1.0.0", 399 | "com.unity.modules.imageconversion": "1.0.0" 400 | } 401 | }, 402 | "com.unity.modules.vehicles": { 403 | "version": "1.0.0", 404 | "depth": 0, 405 | "source": "builtin", 406 | "dependencies": { 407 | "com.unity.modules.physics": "1.0.0" 408 | } 409 | }, 410 | "com.unity.modules.video": { 411 | "version": "1.0.0", 412 | "depth": 0, 413 | "source": "builtin", 414 | "dependencies": { 415 | "com.unity.modules.audio": "1.0.0", 416 | "com.unity.modules.ui": "1.0.0", 417 | "com.unity.modules.unitywebrequest": "1.0.0" 418 | } 419 | }, 420 | "com.unity.modules.vr": { 421 | "version": "1.0.0", 422 | "depth": 0, 423 | "source": "builtin", 424 | "dependencies": { 425 | "com.unity.modules.jsonserialize": "1.0.0", 426 | "com.unity.modules.physics": "1.0.0", 427 | "com.unity.modules.xr": "1.0.0" 428 | } 429 | }, 430 | "com.unity.modules.wind": { 431 | "version": "1.0.0", 432 | "depth": 0, 433 | "source": "builtin", 434 | "dependencies": {} 435 | }, 436 | "com.unity.modules.xr": { 437 | "version": "1.0.0", 438 | "depth": 0, 439 | "source": "builtin", 440 | "dependencies": { 441 | "com.unity.modules.physics": "1.0.0", 442 | "com.unity.modules.jsonserialize": "1.0.0", 443 | "com.unity.modules.subsystems": "1.0.0" 444 | } 445 | } 446 | } 447 | } 448 | -------------------------------------------------------------------------------- /ProjectSettings/AudioManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!11 &1 4 | AudioManager: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_Volume: 1 8 | Rolloff Scale: 1 9 | Doppler Factor: 1 10 | Default Speaker Mode: 2 11 | m_SampleRate: 0 12 | m_DSPBufferSize: 1024 13 | m_VirtualVoiceCount: 512 14 | m_RealVoiceCount: 32 15 | m_SpatializerPlugin: 16 | m_AmbisonicDecoderPlugin: 17 | m_DisableAudio: 0 18 | m_VirtualizeEffects: 1 19 | m_RequestedDSPBufferSize: 1024 20 | -------------------------------------------------------------------------------- /ProjectSettings/ClusterInputManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!236 &1 4 | ClusterInputManager: 5 | m_ObjectHideFlags: 0 6 | m_Inputs: [] 7 | -------------------------------------------------------------------------------- /ProjectSettings/DynamicsManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!55 &1 4 | PhysicsManager: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 11 7 | m_Gravity: {x: 0, y: -9.81, z: 0} 8 | m_DefaultMaterial: {fileID: 0} 9 | m_BounceThreshold: 2 10 | m_SleepThreshold: 0.005 11 | m_DefaultContactOffset: 0.01 12 | m_DefaultSolverIterations: 6 13 | m_DefaultSolverVelocityIterations: 1 14 | m_QueriesHitBackfaces: 0 15 | m_QueriesHitTriggers: 1 16 | m_EnableAdaptiveForce: 0 17 | m_ClothInterCollisionDistance: 0 18 | m_ClothInterCollisionStiffness: 0 19 | m_ContactsGeneration: 1 20 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 21 | m_AutoSimulation: 1 22 | m_AutoSyncTransforms: 0 23 | m_ReuseCollisionCallbacks: 1 24 | m_ClothInterCollisionSettingsToggle: 0 25 | m_ContactPairsMode: 0 26 | m_BroadphaseType: 0 27 | m_WorldBounds: 28 | m_Center: {x: 0, y: 0, z: 0} 29 | m_Extent: {x: 250, y: 250, z: 250} 30 | m_WorldSubdivisions: 8 31 | m_FrictionType: 0 32 | m_EnableEnhancedDeterminism: 0 33 | m_EnableUnifiedHeightmaps: 1 34 | m_DefaultMaxAngluarSpeed: 7 35 | -------------------------------------------------------------------------------- /ProjectSettings/EditorBuildSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1045 &1 4 | EditorBuildSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_Scenes: [] 8 | m_configObjects: {} 9 | -------------------------------------------------------------------------------- /ProjectSettings/EditorSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!159 &1 4 | EditorSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 11 7 | m_ExternalVersionControlSupport: Visible Meta Files 8 | m_SerializationMode: 2 9 | m_LineEndingsForNewScripts: 0 10 | m_DefaultBehaviorMode: 0 11 | m_PrefabRegularEnvironment: {fileID: 0} 12 | m_PrefabUIEnvironment: {fileID: 0} 13 | m_SpritePackerMode: 0 14 | m_SpritePackerPaddingPower: 1 15 | m_EtcTextureCompressorBehavior: 1 16 | m_EtcTextureFastCompressor: 1 17 | m_EtcTextureNormalCompressor: 2 18 | m_EtcTextureBestCompressor: 4 19 | m_ProjectGenerationIncludedExtensions: txt;xml;fnt;cd;asmdef;rsp;asmref 20 | m_ProjectGenerationRootNamespace: 21 | m_CollabEditorSettings: 22 | inProgressEnabled: 1 23 | m_EnableTextureStreamingInEditMode: 1 24 | m_EnableTextureStreamingInPlayMode: 1 25 | m_AsyncShaderCompilation: 1 26 | m_EnterPlayModeOptionsEnabled: 0 27 | m_EnterPlayModeOptions: 3 28 | m_ShowLightmapResolutionOverlay: 1 29 | m_UseLegacyProbeSampleCount: 0 30 | m_SerializeInlineMappingsOnOneLine: 1 31 | -------------------------------------------------------------------------------- /ProjectSettings/GraphicsSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!30 &1 4 | GraphicsSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 13 7 | m_Deferred: 8 | m_Mode: 1 9 | m_Shader: {fileID: 69, guid: 0000000000000000f000000000000000, type: 0} 10 | m_DeferredReflections: 11 | m_Mode: 1 12 | m_Shader: {fileID: 74, guid: 0000000000000000f000000000000000, type: 0} 13 | m_ScreenSpaceShadows: 14 | m_Mode: 1 15 | m_Shader: {fileID: 64, guid: 0000000000000000f000000000000000, type: 0} 16 | m_LegacyDeferred: 17 | m_Mode: 1 18 | m_Shader: {fileID: 63, guid: 0000000000000000f000000000000000, type: 0} 19 | m_DepthNormals: 20 | m_Mode: 1 21 | m_Shader: {fileID: 62, guid: 0000000000000000f000000000000000, type: 0} 22 | m_MotionVectors: 23 | m_Mode: 1 24 | m_Shader: {fileID: 75, guid: 0000000000000000f000000000000000, type: 0} 25 | m_LightHalo: 26 | m_Mode: 1 27 | m_Shader: {fileID: 105, guid: 0000000000000000f000000000000000, type: 0} 28 | m_LensFlare: 29 | m_Mode: 1 30 | m_Shader: {fileID: 102, guid: 0000000000000000f000000000000000, type: 0} 31 | m_AlwaysIncludedShaders: 32 | - {fileID: 7, guid: 0000000000000000f000000000000000, type: 0} 33 | - {fileID: 15104, guid: 0000000000000000f000000000000000, type: 0} 34 | - {fileID: 15105, guid: 0000000000000000f000000000000000, type: 0} 35 | - {fileID: 15106, guid: 0000000000000000f000000000000000, type: 0} 36 | - {fileID: 10753, guid: 0000000000000000f000000000000000, type: 0} 37 | - {fileID: 10770, guid: 0000000000000000f000000000000000, type: 0} 38 | m_PreloadedShaders: [] 39 | m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000, 40 | type: 0} 41 | m_CustomRenderPipeline: {fileID: 0} 42 | m_TransparencySortMode: 0 43 | m_TransparencySortAxis: {x: 0, y: 0, z: 1} 44 | m_DefaultRenderingPath: 1 45 | m_DefaultMobileRenderingPath: 1 46 | m_TierSettings: [] 47 | m_LightmapStripping: 0 48 | m_FogStripping: 0 49 | m_InstancingStripping: 0 50 | m_LightmapKeepPlain: 1 51 | m_LightmapKeepDirCombined: 1 52 | m_LightmapKeepDynamicPlain: 1 53 | m_LightmapKeepDynamicDirCombined: 1 54 | m_LightmapKeepShadowMask: 1 55 | m_LightmapKeepSubtractive: 1 56 | m_FogKeepLinear: 1 57 | m_FogKeepExp: 1 58 | m_FogKeepExp2: 1 59 | m_AlbedoSwatchInfos: [] 60 | m_LightsUseLinearIntensity: 0 61 | m_LightsUseColorTemperature: 0 62 | m_LogWhenShaderIsCompiled: 0 63 | m_AllowEnlightenSupportForUpgradedProject: 0 64 | -------------------------------------------------------------------------------- /ProjectSettings/InputManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!13 &1 4 | InputManager: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_Axes: 8 | - serializedVersion: 3 9 | m_Name: Horizontal 10 | descriptiveName: 11 | descriptiveNegativeName: 12 | negativeButton: left 13 | positiveButton: right 14 | altNegativeButton: a 15 | altPositiveButton: d 16 | gravity: 3 17 | dead: 0.001 18 | sensitivity: 3 19 | snap: 1 20 | invert: 0 21 | type: 0 22 | axis: 0 23 | joyNum: 0 24 | - serializedVersion: 3 25 | m_Name: Vertical 26 | descriptiveName: 27 | descriptiveNegativeName: 28 | negativeButton: down 29 | positiveButton: up 30 | altNegativeButton: s 31 | altPositiveButton: w 32 | gravity: 3 33 | dead: 0.001 34 | sensitivity: 3 35 | snap: 1 36 | invert: 0 37 | type: 0 38 | axis: 0 39 | joyNum: 0 40 | - serializedVersion: 3 41 | m_Name: Fire1 42 | descriptiveName: 43 | descriptiveNegativeName: 44 | negativeButton: 45 | positiveButton: left ctrl 46 | altNegativeButton: 47 | altPositiveButton: mouse 0 48 | gravity: 1000 49 | dead: 0.001 50 | sensitivity: 1000 51 | snap: 0 52 | invert: 0 53 | type: 0 54 | axis: 0 55 | joyNum: 0 56 | - serializedVersion: 3 57 | m_Name: Fire2 58 | descriptiveName: 59 | descriptiveNegativeName: 60 | negativeButton: 61 | positiveButton: left alt 62 | altNegativeButton: 63 | altPositiveButton: mouse 1 64 | gravity: 1000 65 | dead: 0.001 66 | sensitivity: 1000 67 | snap: 0 68 | invert: 0 69 | type: 0 70 | axis: 0 71 | joyNum: 0 72 | - serializedVersion: 3 73 | m_Name: Fire3 74 | descriptiveName: 75 | descriptiveNegativeName: 76 | negativeButton: 77 | positiveButton: left shift 78 | altNegativeButton: 79 | altPositiveButton: mouse 2 80 | gravity: 1000 81 | dead: 0.001 82 | sensitivity: 1000 83 | snap: 0 84 | invert: 0 85 | type: 0 86 | axis: 0 87 | joyNum: 0 88 | - serializedVersion: 3 89 | m_Name: Jump 90 | descriptiveName: 91 | descriptiveNegativeName: 92 | negativeButton: 93 | positiveButton: space 94 | altNegativeButton: 95 | altPositiveButton: 96 | gravity: 1000 97 | dead: 0.001 98 | sensitivity: 1000 99 | snap: 0 100 | invert: 0 101 | type: 0 102 | axis: 0 103 | joyNum: 0 104 | - serializedVersion: 3 105 | m_Name: Mouse X 106 | descriptiveName: 107 | descriptiveNegativeName: 108 | negativeButton: 109 | positiveButton: 110 | altNegativeButton: 111 | altPositiveButton: 112 | gravity: 0 113 | dead: 0 114 | sensitivity: 0.1 115 | snap: 0 116 | invert: 0 117 | type: 1 118 | axis: 0 119 | joyNum: 0 120 | - serializedVersion: 3 121 | m_Name: Mouse Y 122 | descriptiveName: 123 | descriptiveNegativeName: 124 | negativeButton: 125 | positiveButton: 126 | altNegativeButton: 127 | altPositiveButton: 128 | gravity: 0 129 | dead: 0 130 | sensitivity: 0.1 131 | snap: 0 132 | invert: 0 133 | type: 1 134 | axis: 1 135 | joyNum: 0 136 | - serializedVersion: 3 137 | m_Name: Mouse ScrollWheel 138 | descriptiveName: 139 | descriptiveNegativeName: 140 | negativeButton: 141 | positiveButton: 142 | altNegativeButton: 143 | altPositiveButton: 144 | gravity: 0 145 | dead: 0 146 | sensitivity: 0.1 147 | snap: 0 148 | invert: 0 149 | type: 1 150 | axis: 2 151 | joyNum: 0 152 | - serializedVersion: 3 153 | m_Name: Horizontal 154 | descriptiveName: 155 | descriptiveNegativeName: 156 | negativeButton: 157 | positiveButton: 158 | altNegativeButton: 159 | altPositiveButton: 160 | gravity: 0 161 | dead: 0.19 162 | sensitivity: 1 163 | snap: 0 164 | invert: 0 165 | type: 2 166 | axis: 0 167 | joyNum: 0 168 | - serializedVersion: 3 169 | m_Name: Vertical 170 | descriptiveName: 171 | descriptiveNegativeName: 172 | negativeButton: 173 | positiveButton: 174 | altNegativeButton: 175 | altPositiveButton: 176 | gravity: 0 177 | dead: 0.19 178 | sensitivity: 1 179 | snap: 0 180 | invert: 1 181 | type: 2 182 | axis: 1 183 | joyNum: 0 184 | - serializedVersion: 3 185 | m_Name: Fire1 186 | descriptiveName: 187 | descriptiveNegativeName: 188 | negativeButton: 189 | positiveButton: joystick button 0 190 | altNegativeButton: 191 | altPositiveButton: 192 | gravity: 1000 193 | dead: 0.001 194 | sensitivity: 1000 195 | snap: 0 196 | invert: 0 197 | type: 0 198 | axis: 0 199 | joyNum: 0 200 | - serializedVersion: 3 201 | m_Name: Fire2 202 | descriptiveName: 203 | descriptiveNegativeName: 204 | negativeButton: 205 | positiveButton: joystick button 1 206 | altNegativeButton: 207 | altPositiveButton: 208 | gravity: 1000 209 | dead: 0.001 210 | sensitivity: 1000 211 | snap: 0 212 | invert: 0 213 | type: 0 214 | axis: 0 215 | joyNum: 0 216 | - serializedVersion: 3 217 | m_Name: Fire3 218 | descriptiveName: 219 | descriptiveNegativeName: 220 | negativeButton: 221 | positiveButton: joystick button 2 222 | altNegativeButton: 223 | altPositiveButton: 224 | gravity: 1000 225 | dead: 0.001 226 | sensitivity: 1000 227 | snap: 0 228 | invert: 0 229 | type: 0 230 | axis: 0 231 | joyNum: 0 232 | - serializedVersion: 3 233 | m_Name: Jump 234 | descriptiveName: 235 | descriptiveNegativeName: 236 | negativeButton: 237 | positiveButton: joystick button 3 238 | altNegativeButton: 239 | altPositiveButton: 240 | gravity: 1000 241 | dead: 0.001 242 | sensitivity: 1000 243 | snap: 0 244 | invert: 0 245 | type: 0 246 | axis: 0 247 | joyNum: 0 248 | - serializedVersion: 3 249 | m_Name: Submit 250 | descriptiveName: 251 | descriptiveNegativeName: 252 | negativeButton: 253 | positiveButton: return 254 | altNegativeButton: 255 | altPositiveButton: joystick button 0 256 | gravity: 1000 257 | dead: 0.001 258 | sensitivity: 1000 259 | snap: 0 260 | invert: 0 261 | type: 0 262 | axis: 0 263 | joyNum: 0 264 | - serializedVersion: 3 265 | m_Name: Submit 266 | descriptiveName: 267 | descriptiveNegativeName: 268 | negativeButton: 269 | positiveButton: enter 270 | altNegativeButton: 271 | altPositiveButton: space 272 | gravity: 1000 273 | dead: 0.001 274 | sensitivity: 1000 275 | snap: 0 276 | invert: 0 277 | type: 0 278 | axis: 0 279 | joyNum: 0 280 | - serializedVersion: 3 281 | m_Name: Cancel 282 | descriptiveName: 283 | descriptiveNegativeName: 284 | negativeButton: 285 | positiveButton: escape 286 | altNegativeButton: 287 | altPositiveButton: joystick button 1 288 | gravity: 1000 289 | dead: 0.001 290 | sensitivity: 1000 291 | snap: 0 292 | invert: 0 293 | type: 0 294 | axis: 0 295 | joyNum: 0 296 | -------------------------------------------------------------------------------- /ProjectSettings/MemorySettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!387306366 &1 4 | MemorySettings: 5 | m_ObjectHideFlags: 0 6 | m_EditorMemorySettings: 7 | m_MainAllocatorBlockSize: -1 8 | m_ThreadAllocatorBlockSize: -1 9 | m_MainGfxBlockSize: -1 10 | m_ThreadGfxBlockSize: -1 11 | m_CacheBlockSize: -1 12 | m_TypetreeBlockSize: -1 13 | m_ProfilerBlockSize: -1 14 | m_ProfilerEditorBlockSize: -1 15 | m_BucketAllocatorGranularity: -1 16 | m_BucketAllocatorBucketsCount: -1 17 | m_BucketAllocatorBlockSize: -1 18 | m_BucketAllocatorBlockCount: -1 19 | m_ProfilerBucketAllocatorGranularity: -1 20 | m_ProfilerBucketAllocatorBucketsCount: -1 21 | m_ProfilerBucketAllocatorBlockSize: -1 22 | m_ProfilerBucketAllocatorBlockCount: -1 23 | m_TempAllocatorSizeMain: -1 24 | m_JobTempAllocatorBlockSize: -1 25 | m_BackgroundJobTempAllocatorBlockSize: -1 26 | m_JobTempAllocatorReducedBlockSize: -1 27 | m_TempAllocatorSizeGIBakingWorker: -1 28 | m_TempAllocatorSizeNavMeshWorker: -1 29 | m_TempAllocatorSizeAudioWorker: -1 30 | m_TempAllocatorSizeCloudWorker: -1 31 | m_TempAllocatorSizeGfx: -1 32 | m_TempAllocatorSizeJobWorker: -1 33 | m_TempAllocatorSizeBackgroundWorker: -1 34 | m_TempAllocatorSizePreloadManager: -1 35 | m_PlatformMemorySettings: {} 36 | -------------------------------------------------------------------------------- /ProjectSettings/NavMeshAreas.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!126 &1 4 | NavMeshProjectSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | areas: 8 | - name: Walkable 9 | cost: 1 10 | - name: Not Walkable 11 | cost: 1 12 | - name: Jump 13 | cost: 2 14 | - name: 15 | cost: 1 16 | - name: 17 | cost: 1 18 | - name: 19 | cost: 1 20 | - name: 21 | cost: 1 22 | - name: 23 | cost: 1 24 | - name: 25 | cost: 1 26 | - name: 27 | cost: 1 28 | - name: 29 | cost: 1 30 | - name: 31 | cost: 1 32 | - name: 33 | cost: 1 34 | - name: 35 | cost: 1 36 | - name: 37 | cost: 1 38 | - name: 39 | cost: 1 40 | - name: 41 | cost: 1 42 | - name: 43 | cost: 1 44 | - name: 45 | cost: 1 46 | - name: 47 | cost: 1 48 | - name: 49 | cost: 1 50 | - name: 51 | cost: 1 52 | - name: 53 | cost: 1 54 | - name: 55 | cost: 1 56 | - name: 57 | cost: 1 58 | - name: 59 | cost: 1 60 | - name: 61 | cost: 1 62 | - name: 63 | cost: 1 64 | - name: 65 | cost: 1 66 | - name: 67 | cost: 1 68 | - name: 69 | cost: 1 70 | - name: 71 | cost: 1 72 | m_LastAgentTypeID: -887442657 73 | m_Settings: 74 | - serializedVersion: 2 75 | agentTypeID: 0 76 | agentRadius: 0.5 77 | agentHeight: 2 78 | agentSlope: 45 79 | agentClimb: 0.75 80 | ledgeDropHeight: 0 81 | maxJumpAcrossDistance: 0 82 | minRegionArea: 2 83 | manualCellSize: 0 84 | cellSize: 0.16666667 85 | manualTileSize: 0 86 | tileSize: 256 87 | accuratePlacement: 0 88 | debug: 89 | m_Flags: 0 90 | m_SettingNames: 91 | - Humanoid 92 | -------------------------------------------------------------------------------- /ProjectSettings/PackageManagerSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &1 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 61 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_GameObject: {fileID: 0} 10 | m_Enabled: 1 11 | m_EditorHideFlags: 0 12 | m_Script: {fileID: 13964, guid: 0000000000000000e000000000000000, type: 0} 13 | m_Name: 14 | m_EditorClassIdentifier: 15 | m_EnablePreReleasePackages: 1 16 | m_AdvancedSettingsExpanded: 1 17 | m_ScopedRegistriesSettingsExpanded: 1 18 | m_SeeAllPackageVersions: 0 19 | m_DismissPreviewPackagesInUse: 0 20 | oneTimeWarningShown: 1 21 | m_Registries: 22 | - m_Id: main 23 | m_Name: 24 | m_Url: https://packages.unity.com 25 | m_Scopes: [] 26 | m_IsDefault: 1 27 | m_Capabilities: 7 28 | m_ConfigSource: 0 29 | m_UserSelectedRegistryName: 30 | m_UserAddingNewScopedRegistry: 0 31 | m_RegistryInfoDraft: 32 | m_Modified: 0 33 | m_ErrorMessage: 34 | m_UserModificationsInstanceId: -852 35 | m_OriginalInstanceId: -854 36 | m_LoadAssets: 0 37 | -------------------------------------------------------------------------------- /ProjectSettings/Packages/com.unity.testtools.codecoverage/Settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "m_Dictionary": { 3 | "m_DictionaryValues": [] 4 | } 5 | } -------------------------------------------------------------------------------- /ProjectSettings/Physics2DSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!19 &1 4 | Physics2DSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 4 7 | m_Gravity: {x: 0, y: -9.81} 8 | m_DefaultMaterial: {fileID: 0} 9 | m_VelocityIterations: 8 10 | m_PositionIterations: 3 11 | m_VelocityThreshold: 1 12 | m_MaxLinearCorrection: 0.2 13 | m_MaxAngularCorrection: 8 14 | m_MaxTranslationSpeed: 100 15 | m_MaxRotationSpeed: 360 16 | m_BaumgarteScale: 0.2 17 | m_BaumgarteTimeOfImpactScale: 0.75 18 | m_TimeToSleep: 0.5 19 | m_LinearSleepTolerance: 0.01 20 | m_AngularSleepTolerance: 2 21 | m_DefaultContactOffset: 0.01 22 | m_JobOptions: 23 | serializedVersion: 2 24 | useMultithreading: 0 25 | useConsistencySorting: 0 26 | m_InterpolationPosesPerJob: 100 27 | m_NewContactsPerJob: 30 28 | m_CollideContactsPerJob: 100 29 | m_ClearFlagsPerJob: 200 30 | m_ClearBodyForcesPerJob: 200 31 | m_SyncDiscreteFixturesPerJob: 50 32 | m_SyncContinuousFixturesPerJob: 50 33 | m_FindNearestContactsPerJob: 100 34 | m_UpdateTriggerContactsPerJob: 100 35 | m_IslandSolverCostThreshold: 100 36 | m_IslandSolverBodyCostScale: 1 37 | m_IslandSolverContactCostScale: 10 38 | m_IslandSolverJointCostScale: 10 39 | m_IslandSolverBodiesPerJob: 50 40 | m_IslandSolverContactsPerJob: 50 41 | m_AutoSimulation: 1 42 | m_QueriesHitTriggers: 1 43 | m_QueriesStartInColliders: 1 44 | m_CallbacksOnDisable: 1 45 | m_ReuseCollisionCallbacks: 1 46 | m_AutoSyncTransforms: 0 47 | m_AlwaysShowColliders: 0 48 | m_ShowColliderSleep: 1 49 | m_ShowColliderContacts: 0 50 | m_ShowColliderAABB: 0 51 | m_ContactArrowScale: 0.2 52 | m_ColliderAwakeColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.7529412} 53 | m_ColliderAsleepColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.36078432} 54 | m_ColliderContactColor: {r: 1, g: 0, b: 1, a: 0.6862745} 55 | m_ColliderAABBColor: {r: 1, g: 1, b: 0, a: 0.2509804} 56 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 57 | -------------------------------------------------------------------------------- /ProjectSettings/PresetManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1386491679 &1 4 | PresetManager: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_DefaultPresets: {} 8 | -------------------------------------------------------------------------------- /ProjectSettings/ProjectSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!129 &1 4 | PlayerSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 26 7 | productGUID: cbd61233056f95a40942feea1c540210 8 | AndroidProfiler: 0 9 | AndroidFilterTouchesWhenObscured: 0 10 | AndroidEnableSustainedPerformanceMode: 0 11 | defaultScreenOrientation: 4 12 | targetDevice: 2 13 | useOnDemandResources: 0 14 | accelerometerFrequency: 60 15 | companyName: Mochineko 16 | productName: dynamic-unity-avatar-generator 17 | defaultCursor: {fileID: 0} 18 | cursorHotspot: {x: 0, y: 0} 19 | m_SplashScreenBackgroundColor: {r: 0.13725491, g: 0.12156863, b: 0.1254902, a: 1} 20 | m_ShowUnitySplashScreen: 1 21 | m_ShowUnitySplashLogo: 1 22 | m_SplashScreenOverlayOpacity: 1 23 | m_SplashScreenAnimation: 1 24 | m_SplashScreenLogoStyle: 1 25 | m_SplashScreenDrawMode: 0 26 | m_SplashScreenBackgroundAnimationZoom: 1 27 | m_SplashScreenLogoAnimationZoom: 1 28 | m_SplashScreenBackgroundLandscapeAspect: 1 29 | m_SplashScreenBackgroundPortraitAspect: 1 30 | m_SplashScreenBackgroundLandscapeUvs: 31 | serializedVersion: 2 32 | x: 0 33 | y: 0 34 | width: 1 35 | height: 1 36 | m_SplashScreenBackgroundPortraitUvs: 37 | serializedVersion: 2 38 | x: 0 39 | y: 0 40 | width: 1 41 | height: 1 42 | m_SplashScreenLogos: [] 43 | m_VirtualRealitySplashScreen: {fileID: 0} 44 | m_HolographicTrackingLossScreen: {fileID: 0} 45 | defaultScreenWidth: 1920 46 | defaultScreenHeight: 1080 47 | defaultScreenWidthWeb: 960 48 | defaultScreenHeightWeb: 600 49 | m_StereoRenderingPath: 0 50 | m_ActiveColorSpace: 1 51 | m_SpriteBatchVertexThreshold: 300 52 | m_MTRendering: 1 53 | mipStripping: 0 54 | numberOfMipsStripped: 0 55 | numberOfMipsStrippedPerMipmapLimitGroup: {} 56 | m_StackTraceTypes: 010000000100000001000000010000000100000001000000 57 | iosShowActivityIndicatorOnLoading: -1 58 | androidShowActivityIndicatorOnLoading: -1 59 | iosUseCustomAppBackgroundBehavior: 0 60 | allowedAutorotateToPortrait: 1 61 | allowedAutorotateToPortraitUpsideDown: 1 62 | allowedAutorotateToLandscapeRight: 1 63 | allowedAutorotateToLandscapeLeft: 1 64 | useOSAutorotation: 1 65 | use32BitDisplayBuffer: 1 66 | preserveFramebufferAlpha: 0 67 | disableDepthAndStencilBuffers: 0 68 | androidStartInFullscreen: 1 69 | androidRenderOutsideSafeArea: 1 70 | androidUseSwappy: 1 71 | androidBlitType: 0 72 | androidResizableWindow: 0 73 | androidDefaultWindowWidth: 1920 74 | androidDefaultWindowHeight: 1080 75 | androidMinimumWindowWidth: 400 76 | androidMinimumWindowHeight: 300 77 | androidFullscreenMode: 1 78 | defaultIsNativeResolution: 1 79 | macRetinaSupport: 1 80 | runInBackground: 1 81 | captureSingleScreen: 0 82 | muteOtherAudioSources: 0 83 | Prepare IOS For Recording: 0 84 | Force IOS Speakers When Recording: 0 85 | deferSystemGesturesMode: 0 86 | hideHomeButton: 0 87 | submitAnalytics: 1 88 | usePlayerLog: 1 89 | bakeCollisionMeshes: 0 90 | forceSingleInstance: 0 91 | useFlipModelSwapchain: 1 92 | resizableWindow: 0 93 | useMacAppStoreValidation: 0 94 | macAppStoreCategory: public.app-category.games 95 | gpuSkinning: 1 96 | xboxPIXTextureCapture: 0 97 | xboxEnableAvatar: 0 98 | xboxEnableKinect: 0 99 | xboxEnableKinectAutoTracking: 0 100 | xboxEnableFitness: 0 101 | visibleInBackground: 1 102 | allowFullscreenSwitch: 1 103 | fullscreenMode: 1 104 | xboxSpeechDB: 0 105 | xboxEnableHeadOrientation: 0 106 | xboxEnableGuest: 0 107 | xboxEnablePIXSampling: 0 108 | metalFramebufferOnly: 0 109 | xboxOneResolution: 0 110 | xboxOneSResolution: 0 111 | xboxOneXResolution: 3 112 | xboxOneMonoLoggingLevel: 0 113 | xboxOneLoggingLevel: 1 114 | xboxOneDisableEsram: 0 115 | xboxOneEnableTypeOptimization: 0 116 | xboxOnePresentImmediateThreshold: 0 117 | switchQueueCommandMemory: 0 118 | switchQueueControlMemory: 16384 119 | switchQueueComputeMemory: 262144 120 | switchNVNShaderPoolsGranularity: 33554432 121 | switchNVNDefaultPoolsGranularity: 16777216 122 | switchNVNOtherPoolsGranularity: 16777216 123 | switchGpuScratchPoolGranularity: 2097152 124 | switchAllowGpuScratchShrinking: 0 125 | switchNVNMaxPublicTextureIDCount: 0 126 | switchNVNMaxPublicSamplerIDCount: 0 127 | switchNVNGraphicsFirmwareMemory: 32 128 | stadiaPresentMode: 0 129 | stadiaTargetFramerate: 0 130 | vulkanNumSwapchainBuffers: 3 131 | vulkanEnableSetSRGBWrite: 0 132 | vulkanEnablePreTransform: 1 133 | vulkanEnableLateAcquireNextImage: 0 134 | vulkanEnableCommandBufferRecycling: 1 135 | loadStoreDebugModeEnabled: 0 136 | bundleVersion: 0.1.0 137 | preloadedAssets: [] 138 | metroInputSource: 0 139 | wsaTransparentSwapchain: 0 140 | m_HolographicPauseOnTrackingLoss: 1 141 | xboxOneDisableKinectGpuReservation: 1 142 | xboxOneEnable7thCore: 1 143 | vrSettings: 144 | enable360StereoCapture: 0 145 | isWsaHolographicRemotingEnabled: 0 146 | enableFrameTimingStats: 0 147 | enableOpenGLProfilerGPURecorders: 1 148 | useHDRDisplay: 0 149 | hdrBitDepth: 0 150 | m_ColorGamuts: 00000000 151 | targetPixelDensity: 30 152 | resolutionScalingMode: 0 153 | resetResolutionOnWindowResize: 0 154 | androidSupportedAspectRatio: 1 155 | androidMaxAspectRatio: 2.1 156 | applicationIdentifier: 157 | Standalone: com.Mochineko.dynamic-unity-avatar-generator 158 | buildNumber: 159 | Standalone: 0 160 | iPhone: 0 161 | tvOS: 0 162 | overrideDefaultApplicationIdentifier: 0 163 | AndroidBundleVersionCode: 1 164 | AndroidMinSdkVersion: 22 165 | AndroidTargetSdkVersion: 0 166 | AndroidPreferredInstallLocation: 1 167 | aotOptions: 168 | stripEngineCode: 1 169 | iPhoneStrippingLevel: 0 170 | iPhoneScriptCallOptimization: 0 171 | ForceInternetPermission: 0 172 | ForceSDCardPermission: 0 173 | CreateWallpaper: 0 174 | APKExpansionFiles: 0 175 | keepLoadedShadersAlive: 0 176 | StripUnusedMeshComponents: 1 177 | strictShaderVariantMatching: 0 178 | VertexChannelCompressionMask: 4054 179 | iPhoneSdkVersion: 988 180 | iOSTargetOSVersionString: 12.0 181 | tvOSSdkVersion: 0 182 | tvOSRequireExtendedGameController: 0 183 | tvOSTargetOSVersionString: 12.0 184 | uIPrerenderedIcon: 0 185 | uIRequiresPersistentWiFi: 0 186 | uIRequiresFullScreen: 1 187 | uIStatusBarHidden: 1 188 | uIExitOnSuspend: 0 189 | uIStatusBarStyle: 0 190 | appleTVSplashScreen: {fileID: 0} 191 | appleTVSplashScreen2x: {fileID: 0} 192 | tvOSSmallIconLayers: [] 193 | tvOSSmallIconLayers2x: [] 194 | tvOSLargeIconLayers: [] 195 | tvOSLargeIconLayers2x: [] 196 | tvOSTopShelfImageLayers: [] 197 | tvOSTopShelfImageLayers2x: [] 198 | tvOSTopShelfImageWideLayers: [] 199 | tvOSTopShelfImageWideLayers2x: [] 200 | iOSLaunchScreenType: 0 201 | iOSLaunchScreenPortrait: {fileID: 0} 202 | iOSLaunchScreenLandscape: {fileID: 0} 203 | iOSLaunchScreenBackgroundColor: 204 | serializedVersion: 2 205 | rgba: 0 206 | iOSLaunchScreenFillPct: 100 207 | iOSLaunchScreenSize: 100 208 | iOSLaunchScreenCustomXibPath: 209 | iOSLaunchScreeniPadType: 0 210 | iOSLaunchScreeniPadImage: {fileID: 0} 211 | iOSLaunchScreeniPadBackgroundColor: 212 | serializedVersion: 2 213 | rgba: 0 214 | iOSLaunchScreeniPadFillPct: 100 215 | iOSLaunchScreeniPadSize: 100 216 | iOSLaunchScreeniPadCustomXibPath: 217 | iOSLaunchScreenCustomStoryboardPath: 218 | iOSLaunchScreeniPadCustomStoryboardPath: 219 | iOSDeviceRequirements: [] 220 | iOSURLSchemes: [] 221 | macOSURLSchemes: [] 222 | iOSBackgroundModes: 0 223 | iOSMetalForceHardShadows: 0 224 | metalEditorSupport: 1 225 | metalAPIValidation: 1 226 | iOSRenderExtraFrameOnPause: 0 227 | iosCopyPluginsCodeInsteadOfSymlink: 0 228 | appleDeveloperTeamID: 229 | iOSManualSigningProvisioningProfileID: 230 | tvOSManualSigningProvisioningProfileID: 231 | iOSManualSigningProvisioningProfileType: 0 232 | tvOSManualSigningProvisioningProfileType: 0 233 | appleEnableAutomaticSigning: 0 234 | iOSRequireARKit: 0 235 | iOSAutomaticallyDetectAndAddCapabilities: 1 236 | appleEnableProMotion: 0 237 | shaderPrecisionModel: 0 238 | clonedFromGUID: c0afd0d1d80e3634a9dac47e8a0426ea 239 | templatePackageId: com.unity.template.3d@8.1.1 240 | templateDefaultScene: Assets/Scenes/SampleScene.unity 241 | useCustomMainManifest: 0 242 | useCustomLauncherManifest: 0 243 | useCustomMainGradleTemplate: 0 244 | useCustomLauncherGradleManifest: 0 245 | useCustomBaseGradleTemplate: 0 246 | useCustomGradlePropertiesTemplate: 0 247 | useCustomGradleSettingsTemplate: 0 248 | useCustomProguardFile: 0 249 | AndroidTargetArchitectures: 1 250 | AndroidTargetDevices: 0 251 | AndroidSplashScreenScale: 0 252 | androidSplashScreen: {fileID: 0} 253 | AndroidKeystoreName: 254 | AndroidKeyaliasName: 255 | AndroidEnableArmv9SecurityFeatures: 0 256 | AndroidBuildApkPerCpuArchitecture: 0 257 | AndroidTVCompatibility: 0 258 | AndroidIsGame: 1 259 | AndroidEnableTango: 0 260 | androidEnableBanner: 1 261 | androidUseLowAccuracyLocation: 0 262 | androidUseCustomKeystore: 0 263 | m_AndroidBanners: 264 | - width: 320 265 | height: 180 266 | banner: {fileID: 0} 267 | androidGamepadSupportLevel: 0 268 | chromeosInputEmulation: 1 269 | AndroidMinifyRelease: 0 270 | AndroidMinifyDebug: 0 271 | AndroidValidateAppBundleSize: 1 272 | AndroidAppBundleSizeToValidate: 150 273 | m_BuildTargetIcons: [] 274 | m_BuildTargetPlatformIcons: [] 275 | m_BuildTargetBatching: 276 | - m_BuildTarget: Standalone 277 | m_StaticBatching: 1 278 | m_DynamicBatching: 0 279 | - m_BuildTarget: tvOS 280 | m_StaticBatching: 1 281 | m_DynamicBatching: 0 282 | - m_BuildTarget: Android 283 | m_StaticBatching: 1 284 | m_DynamicBatching: 0 285 | - m_BuildTarget: iPhone 286 | m_StaticBatching: 1 287 | m_DynamicBatching: 0 288 | - m_BuildTarget: WebGL 289 | m_StaticBatching: 0 290 | m_DynamicBatching: 0 291 | m_BuildTargetShaderSettings: [] 292 | m_BuildTargetGraphicsJobs: 293 | - m_BuildTarget: MacStandaloneSupport 294 | m_GraphicsJobs: 0 295 | - m_BuildTarget: Switch 296 | m_GraphicsJobs: 1 297 | - m_BuildTarget: MetroSupport 298 | m_GraphicsJobs: 1 299 | - m_BuildTarget: AppleTVSupport 300 | m_GraphicsJobs: 0 301 | - m_BuildTarget: BJMSupport 302 | m_GraphicsJobs: 1 303 | - m_BuildTarget: LinuxStandaloneSupport 304 | m_GraphicsJobs: 1 305 | - m_BuildTarget: PS4Player 306 | m_GraphicsJobs: 1 307 | - m_BuildTarget: iOSSupport 308 | m_GraphicsJobs: 0 309 | - m_BuildTarget: WindowsStandaloneSupport 310 | m_GraphicsJobs: 1 311 | - m_BuildTarget: XboxOnePlayer 312 | m_GraphicsJobs: 1 313 | - m_BuildTarget: LuminSupport 314 | m_GraphicsJobs: 0 315 | - m_BuildTarget: AndroidPlayer 316 | m_GraphicsJobs: 0 317 | - m_BuildTarget: WebGLSupport 318 | m_GraphicsJobs: 0 319 | m_BuildTargetGraphicsJobMode: 320 | - m_BuildTarget: PS4Player 321 | m_GraphicsJobMode: 0 322 | - m_BuildTarget: XboxOnePlayer 323 | m_GraphicsJobMode: 0 324 | m_BuildTargetGraphicsAPIs: 325 | - m_BuildTarget: AndroidPlayer 326 | m_APIs: 150000000b000000 327 | m_Automatic: 1 328 | - m_BuildTarget: iOSSupport 329 | m_APIs: 10000000 330 | m_Automatic: 1 331 | - m_BuildTarget: AppleTVSupport 332 | m_APIs: 10000000 333 | m_Automatic: 1 334 | - m_BuildTarget: WebGLSupport 335 | m_APIs: 0b000000 336 | m_Automatic: 1 337 | m_BuildTargetVRSettings: 338 | - m_BuildTarget: Standalone 339 | m_Enabled: 0 340 | m_Devices: 341 | - Oculus 342 | - OpenVR 343 | m_DefaultShaderChunkSizeInMB: 16 344 | m_DefaultShaderChunkCount: 0 345 | openGLRequireES31: 0 346 | openGLRequireES31AEP: 0 347 | openGLRequireES32: 0 348 | m_TemplateCustomTags: {} 349 | mobileMTRendering: 350 | Android: 1 351 | iPhone: 1 352 | tvOS: 1 353 | m_BuildTargetGroupLightmapEncodingQuality: 354 | - m_BuildTarget: Android 355 | m_EncodingQuality: 1 356 | - m_BuildTarget: iPhone 357 | m_EncodingQuality: 1 358 | - m_BuildTarget: tvOS 359 | m_EncodingQuality: 1 360 | m_BuildTargetGroupHDRCubemapEncodingQuality: 361 | - m_BuildTarget: Android 362 | m_EncodingQuality: 1 363 | - m_BuildTarget: iPhone 364 | m_EncodingQuality: 1 365 | - m_BuildTarget: tvOS 366 | m_EncodingQuality: 1 367 | m_BuildTargetGroupLightmapSettings: [] 368 | m_BuildTargetGroupLoadStoreDebugModeSettings: [] 369 | m_BuildTargetNormalMapEncoding: 370 | - m_BuildTarget: Android 371 | m_Encoding: 1 372 | - m_BuildTarget: iPhone 373 | m_Encoding: 1 374 | - m_BuildTarget: tvOS 375 | m_Encoding: 1 376 | m_BuildTargetDefaultTextureCompressionFormat: 377 | - m_BuildTarget: Android 378 | m_Format: 3 379 | playModeTestRunnerEnabled: 0 380 | runPlayModeTestAsEditModeTest: 0 381 | actionOnDotNetUnhandledException: 1 382 | enableInternalProfiler: 0 383 | logObjCUncaughtExceptions: 1 384 | enableCrashReportAPI: 0 385 | cameraUsageDescription: 386 | locationUsageDescription: 387 | microphoneUsageDescription: 388 | bluetoothUsageDescription: 389 | macOSTargetOSVersion: 10.13.0 390 | switchNMETAOverride: 391 | switchNetLibKey: 392 | switchSocketMemoryPoolSize: 6144 393 | switchSocketAllocatorPoolSize: 128 394 | switchSocketConcurrencyLimit: 14 395 | switchScreenResolutionBehavior: 2 396 | switchUseCPUProfiler: 0 397 | switchUseGOLDLinker: 0 398 | switchLTOSetting: 0 399 | switchApplicationID: 0x01004b9000490000 400 | switchNSODependencies: 401 | switchCompilerFlags: 402 | switchTitleNames_0: 403 | switchTitleNames_1: 404 | switchTitleNames_2: 405 | switchTitleNames_3: 406 | switchTitleNames_4: 407 | switchTitleNames_5: 408 | switchTitleNames_6: 409 | switchTitleNames_7: 410 | switchTitleNames_8: 411 | switchTitleNames_9: 412 | switchTitleNames_10: 413 | switchTitleNames_11: 414 | switchTitleNames_12: 415 | switchTitleNames_13: 416 | switchTitleNames_14: 417 | switchTitleNames_15: 418 | switchPublisherNames_0: 419 | switchPublisherNames_1: 420 | switchPublisherNames_2: 421 | switchPublisherNames_3: 422 | switchPublisherNames_4: 423 | switchPublisherNames_5: 424 | switchPublisherNames_6: 425 | switchPublisherNames_7: 426 | switchPublisherNames_8: 427 | switchPublisherNames_9: 428 | switchPublisherNames_10: 429 | switchPublisherNames_11: 430 | switchPublisherNames_12: 431 | switchPublisherNames_13: 432 | switchPublisherNames_14: 433 | switchPublisherNames_15: 434 | switchIcons_0: {fileID: 0} 435 | switchIcons_1: {fileID: 0} 436 | switchIcons_2: {fileID: 0} 437 | switchIcons_3: {fileID: 0} 438 | switchIcons_4: {fileID: 0} 439 | switchIcons_5: {fileID: 0} 440 | switchIcons_6: {fileID: 0} 441 | switchIcons_7: {fileID: 0} 442 | switchIcons_8: {fileID: 0} 443 | switchIcons_9: {fileID: 0} 444 | switchIcons_10: {fileID: 0} 445 | switchIcons_11: {fileID: 0} 446 | switchIcons_12: {fileID: 0} 447 | switchIcons_13: {fileID: 0} 448 | switchIcons_14: {fileID: 0} 449 | switchIcons_15: {fileID: 0} 450 | switchSmallIcons_0: {fileID: 0} 451 | switchSmallIcons_1: {fileID: 0} 452 | switchSmallIcons_2: {fileID: 0} 453 | switchSmallIcons_3: {fileID: 0} 454 | switchSmallIcons_4: {fileID: 0} 455 | switchSmallIcons_5: {fileID: 0} 456 | switchSmallIcons_6: {fileID: 0} 457 | switchSmallIcons_7: {fileID: 0} 458 | switchSmallIcons_8: {fileID: 0} 459 | switchSmallIcons_9: {fileID: 0} 460 | switchSmallIcons_10: {fileID: 0} 461 | switchSmallIcons_11: {fileID: 0} 462 | switchSmallIcons_12: {fileID: 0} 463 | switchSmallIcons_13: {fileID: 0} 464 | switchSmallIcons_14: {fileID: 0} 465 | switchSmallIcons_15: {fileID: 0} 466 | switchManualHTML: 467 | switchAccessibleURLs: 468 | switchLegalInformation: 469 | switchMainThreadStackSize: 1048576 470 | switchPresenceGroupId: 471 | switchLogoHandling: 0 472 | switchReleaseVersion: 0 473 | switchDisplayVersion: 1.0.0 474 | switchStartupUserAccount: 0 475 | switchSupportedLanguagesMask: 0 476 | switchLogoType: 0 477 | switchApplicationErrorCodeCategory: 478 | switchUserAccountSaveDataSize: 0 479 | switchUserAccountSaveDataJournalSize: 0 480 | switchApplicationAttribute: 0 481 | switchCardSpecSize: -1 482 | switchCardSpecClock: -1 483 | switchRatingsMask: 0 484 | switchRatingsInt_0: 0 485 | switchRatingsInt_1: 0 486 | switchRatingsInt_2: 0 487 | switchRatingsInt_3: 0 488 | switchRatingsInt_4: 0 489 | switchRatingsInt_5: 0 490 | switchRatingsInt_6: 0 491 | switchRatingsInt_7: 0 492 | switchRatingsInt_8: 0 493 | switchRatingsInt_9: 0 494 | switchRatingsInt_10: 0 495 | switchRatingsInt_11: 0 496 | switchRatingsInt_12: 0 497 | switchLocalCommunicationIds_0: 498 | switchLocalCommunicationIds_1: 499 | switchLocalCommunicationIds_2: 500 | switchLocalCommunicationIds_3: 501 | switchLocalCommunicationIds_4: 502 | switchLocalCommunicationIds_5: 503 | switchLocalCommunicationIds_6: 504 | switchLocalCommunicationIds_7: 505 | switchParentalControl: 0 506 | switchAllowsScreenshot: 1 507 | switchAllowsVideoCapturing: 1 508 | switchAllowsRuntimeAddOnContentInstall: 0 509 | switchDataLossConfirmation: 0 510 | switchUserAccountLockEnabled: 0 511 | switchSystemResourceMemory: 16777216 512 | switchSupportedNpadStyles: 22 513 | switchNativeFsCacheSize: 32 514 | switchIsHoldTypeHorizontal: 0 515 | switchSupportedNpadCount: 8 516 | switchEnableTouchScreen: 1 517 | switchSocketConfigEnabled: 0 518 | switchTcpInitialSendBufferSize: 32 519 | switchTcpInitialReceiveBufferSize: 64 520 | switchTcpAutoSendBufferSizeMax: 256 521 | switchTcpAutoReceiveBufferSizeMax: 256 522 | switchUdpSendBufferSize: 9 523 | switchUdpReceiveBufferSize: 42 524 | switchSocketBufferEfficiency: 4 525 | switchSocketInitializeEnabled: 1 526 | switchNetworkInterfaceManagerInitializeEnabled: 1 527 | switchPlayerConnectionEnabled: 1 528 | switchUseNewStyleFilepaths: 1 529 | switchUseLegacyFmodPriorities: 0 530 | switchUseMicroSleepForYield: 1 531 | switchEnableRamDiskSupport: 0 532 | switchMicroSleepForYieldTime: 25 533 | switchRamDiskSpaceSize: 12 534 | ps4NPAgeRating: 12 535 | ps4NPTitleSecret: 536 | ps4NPTrophyPackPath: 537 | ps4ParentalLevel: 11 538 | ps4ContentID: ED1633-NPXX51362_00-0000000000000000 539 | ps4Category: 0 540 | ps4MasterVersion: 01.00 541 | ps4AppVersion: 01.00 542 | ps4AppType: 0 543 | ps4ParamSfxPath: 544 | ps4VideoOutPixelFormat: 0 545 | ps4VideoOutInitialWidth: 1920 546 | ps4VideoOutBaseModeInitialWidth: 1920 547 | ps4VideoOutReprojectionRate: 60 548 | ps4PronunciationXMLPath: 549 | ps4PronunciationSIGPath: 550 | ps4BackgroundImagePath: 551 | ps4StartupImagePath: 552 | ps4StartupImagesFolder: 553 | ps4IconImagesFolder: 554 | ps4SaveDataImagePath: 555 | ps4SdkOverride: 556 | ps4BGMPath: 557 | ps4ShareFilePath: 558 | ps4ShareOverlayImagePath: 559 | ps4PrivacyGuardImagePath: 560 | ps4ExtraSceSysFile: 561 | ps4NPtitleDatPath: 562 | ps4RemotePlayKeyAssignment: -1 563 | ps4RemotePlayKeyMappingDir: 564 | ps4PlayTogetherPlayerCount: 0 565 | ps4EnterButtonAssignment: 1 566 | ps4ApplicationParam1: 0 567 | ps4ApplicationParam2: 0 568 | ps4ApplicationParam3: 0 569 | ps4ApplicationParam4: 0 570 | ps4DownloadDataSize: 0 571 | ps4GarlicHeapSize: 2048 572 | ps4ProGarlicHeapSize: 2560 573 | playerPrefsMaxSize: 32768 574 | ps4Passcode: frAQBc8Wsa1xVPfvJcrgRYwTiizs2trQ 575 | ps4pnSessions: 1 576 | ps4pnPresence: 1 577 | ps4pnFriends: 1 578 | ps4pnGameCustomData: 1 579 | playerPrefsSupport: 0 580 | enableApplicationExit: 0 581 | resetTempFolder: 1 582 | restrictedAudioUsageRights: 0 583 | ps4UseResolutionFallback: 0 584 | ps4ReprojectionSupport: 0 585 | ps4UseAudio3dBackend: 0 586 | ps4UseLowGarlicFragmentationMode: 1 587 | ps4SocialScreenEnabled: 0 588 | ps4ScriptOptimizationLevel: 0 589 | ps4Audio3dVirtualSpeakerCount: 14 590 | ps4attribCpuUsage: 0 591 | ps4PatchPkgPath: 592 | ps4PatchLatestPkgPath: 593 | ps4PatchChangeinfoPath: 594 | ps4PatchDayOne: 0 595 | ps4attribUserManagement: 0 596 | ps4attribMoveSupport: 0 597 | ps4attrib3DSupport: 0 598 | ps4attribShareSupport: 0 599 | ps4attribExclusiveVR: 0 600 | ps4disableAutoHideSplash: 0 601 | ps4videoRecordingFeaturesUsed: 0 602 | ps4contentSearchFeaturesUsed: 0 603 | ps4CompatibilityPS5: 0 604 | ps4AllowPS5Detection: 0 605 | ps4GPU800MHz: 1 606 | ps4attribEyeToEyeDistanceSettingVR: 0 607 | ps4IncludedModules: [] 608 | ps4attribVROutputEnabled: 0 609 | monoEnv: 610 | splashScreenBackgroundSourceLandscape: {fileID: 0} 611 | splashScreenBackgroundSourcePortrait: {fileID: 0} 612 | blurSplashScreenBackground: 1 613 | spritePackerPolicy: 614 | webGLMemorySize: 16 615 | webGLExceptionSupport: 1 616 | webGLNameFilesAsHashes: 0 617 | webGLShowDiagnostics: 0 618 | webGLDataCaching: 1 619 | webGLDebugSymbols: 0 620 | webGLEmscriptenArgs: 621 | webGLModulesDirectory: 622 | webGLTemplate: APPLICATION:Default 623 | webGLAnalyzeBuildSize: 0 624 | webGLUseEmbeddedResources: 0 625 | webGLCompressionFormat: 1 626 | webGLWasmArithmeticExceptions: 0 627 | webGLLinkerTarget: 1 628 | webGLThreadsSupport: 0 629 | webGLDecompressionFallback: 0 630 | webGLInitialMemorySize: 32 631 | webGLMaximumMemorySize: 2048 632 | webGLMemoryGrowthMode: 2 633 | webGLMemoryLinearGrowthStep: 16 634 | webGLMemoryGeometricGrowthStep: 0.2 635 | webGLMemoryGeometricGrowthCap: 96 636 | webGLPowerPreference: 2 637 | scriptingDefineSymbols: {} 638 | additionalCompilerArguments: {} 639 | platformArchitecture: {} 640 | scriptingBackend: 641 | Standalone: 1 642 | il2cppCompilerConfiguration: {} 643 | il2cppCodeGeneration: {} 644 | managedStrippingLevel: 645 | EmbeddedLinux: 1 646 | GameCoreScarlett: 1 647 | GameCoreXboxOne: 1 648 | Nintendo Switch: 1 649 | PS4: 1 650 | PS5: 1 651 | QNX: 1 652 | Stadia: 1 653 | WebGL: 1 654 | Windows Store Apps: 1 655 | XboxOne: 1 656 | iPhone: 1 657 | tvOS: 1 658 | incrementalIl2cppBuild: {} 659 | suppressCommonWarnings: 1 660 | allowUnsafeCode: 0 661 | useDeterministicCompilation: 1 662 | selectedPlatform: 0 663 | additionalIl2CppArgs: 664 | scriptingRuntimeVersion: 1 665 | gcIncremental: 1 666 | gcWBarrierValidation: 0 667 | apiCompatibilityLevelPerPlatform: {} 668 | m_RenderingPath: 1 669 | m_MobileRenderingPath: 1 670 | metroPackageName: dynamic-unity-avatar-generator 671 | metroPackageVersion: 672 | metroCertificatePath: 673 | metroCertificatePassword: 674 | metroCertificateSubject: 675 | metroCertificateIssuer: 676 | metroCertificateNotAfter: 0000000000000000 677 | metroApplicationDescription: dynamic-unity-avatar-generator 678 | wsaImages: {} 679 | metroTileShortName: 680 | metroTileShowName: 0 681 | metroMediumTileShowName: 0 682 | metroLargeTileShowName: 0 683 | metroWideTileShowName: 0 684 | metroSupportStreamingInstall: 0 685 | metroLastRequiredScene: 0 686 | metroDefaultTileSize: 1 687 | metroTileForegroundText: 2 688 | metroTileBackgroundColor: {r: 0.13333334, g: 0.17254902, b: 0.21568628, a: 0} 689 | metroSplashScreenBackgroundColor: {r: 0.12941177, g: 0.17254902, b: 0.21568628, a: 1} 690 | metroSplashScreenUseBackgroundColor: 0 691 | platformCapabilities: {} 692 | metroTargetDeviceFamilies: {} 693 | metroFTAName: 694 | metroFTAFileTypes: [] 695 | metroProtocolName: 696 | vcxProjDefaultLanguage: 697 | XboxOneProductId: 698 | XboxOneUpdateKey: 699 | XboxOneSandboxId: 700 | XboxOneContentId: 701 | XboxOneTitleId: 702 | XboxOneSCId: 703 | XboxOneGameOsOverridePath: 704 | XboxOnePackagingOverridePath: 705 | XboxOneAppManifestOverridePath: 706 | XboxOneVersion: 1.0.0.0 707 | XboxOnePackageEncryption: 0 708 | XboxOnePackageUpdateGranularity: 2 709 | XboxOneDescription: 710 | XboxOneLanguage: 711 | - enus 712 | XboxOneCapability: [] 713 | XboxOneGameRating: {} 714 | XboxOneIsContentPackage: 0 715 | XboxOneEnhancedXboxCompatibilityMode: 0 716 | XboxOneEnableGPUVariability: 1 717 | XboxOneSockets: {} 718 | XboxOneSplashScreen: {fileID: 0} 719 | XboxOneAllowedProductIds: [] 720 | XboxOnePersistentLocalStorageSize: 0 721 | XboxOneXTitleMemory: 8 722 | XboxOneOverrideIdentityName: 723 | XboxOneOverrideIdentityPublisher: 724 | vrEditorSettings: {} 725 | cloudServicesEnabled: 726 | UNet: 1 727 | luminIcon: 728 | m_Name: 729 | m_ModelFolderPath: 730 | m_PortalFolderPath: 731 | luminCert: 732 | m_CertPath: 733 | m_SignPackage: 1 734 | luminIsChannelApp: 0 735 | luminVersion: 736 | m_VersionCode: 1 737 | m_VersionName: 738 | hmiPlayerDataPath: 739 | hmiForceSRGBBlit: 1 740 | embeddedLinuxEnableGamepadInput: 1 741 | hmiLogStartupTiming: 0 742 | hmiCpuConfiguration: 743 | apiCompatibilityLevel: 6 744 | activeInputHandler: 0 745 | windowsGamepadBackendHint: 0 746 | cloudProjectId: 747 | framebufferDepthMemorylessMode: 0 748 | qualitySettingsNames: [] 749 | projectName: 750 | organizationId: 751 | cloudEnabled: 0 752 | legacyClampBlendShapeWeights: 0 753 | hmiLoadingImage: {fileID: 0} 754 | platformRequiresReadableAssets: 0 755 | virtualTexturingSupportEnabled: 0 756 | insecureHttpOption: 0 757 | -------------------------------------------------------------------------------- /ProjectSettings/ProjectVersion.txt: -------------------------------------------------------------------------------- 1 | m_EditorVersion: 2022.3.0f1 2 | m_EditorVersionWithRevision: 2022.3.0f1 (fb119bb0b476) 3 | -------------------------------------------------------------------------------- /ProjectSettings/QualitySettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!47 &1 4 | QualitySettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 5 7 | m_CurrentQuality: 5 8 | m_QualitySettings: 9 | - serializedVersion: 3 10 | name: Very Low 11 | pixelLightCount: 0 12 | shadows: 0 13 | shadowResolution: 0 14 | shadowProjection: 1 15 | shadowCascades: 1 16 | shadowDistance: 15 17 | shadowNearPlaneOffset: 3 18 | shadowCascade2Split: 0.33333334 19 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 20 | shadowmaskMode: 0 21 | skinWeights: 1 22 | globalTextureMipmapLimit: 1 23 | textureMipmapLimitSettings: [] 24 | anisotropicTextures: 0 25 | antiAliasing: 0 26 | softParticles: 0 27 | softVegetation: 0 28 | realtimeReflectionProbes: 0 29 | billboardsFaceCameraPosition: 0 30 | useLegacyDetailDistribution: 1 31 | vSyncCount: 0 32 | lodBias: 0.3 33 | maximumLODLevel: 0 34 | enableLODCrossFade: 1 35 | streamingMipmapsActive: 0 36 | streamingMipmapsAddAllCameras: 1 37 | streamingMipmapsMemoryBudget: 512 38 | streamingMipmapsRenderersPerFrame: 512 39 | streamingMipmapsMaxLevelReduction: 2 40 | streamingMipmapsMaxFileIORequests: 1024 41 | particleRaycastBudget: 4 42 | asyncUploadTimeSlice: 2 43 | asyncUploadBufferSize: 16 44 | asyncUploadPersistentBuffer: 1 45 | resolutionScalingFixedDPIFactor: 1 46 | customRenderPipeline: {fileID: 0} 47 | terrainQualityOverrides: 0 48 | terrainPixelError: 1 49 | terrainDetailDensityScale: 1 50 | terrainBasemapDistance: 1000 51 | terrainDetailDistance: 80 52 | terrainTreeDistance: 5000 53 | terrainBillboardStart: 50 54 | terrainFadeLength: 5 55 | terrainMaxTrees: 50 56 | excludedTargetPlatforms: [] 57 | - serializedVersion: 3 58 | name: Low 59 | pixelLightCount: 0 60 | shadows: 0 61 | shadowResolution: 0 62 | shadowProjection: 1 63 | shadowCascades: 1 64 | shadowDistance: 20 65 | shadowNearPlaneOffset: 3 66 | shadowCascade2Split: 0.33333334 67 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 68 | shadowmaskMode: 0 69 | skinWeights: 2 70 | globalTextureMipmapLimit: 0 71 | textureMipmapLimitSettings: [] 72 | anisotropicTextures: 0 73 | antiAliasing: 0 74 | softParticles: 0 75 | softVegetation: 0 76 | realtimeReflectionProbes: 0 77 | billboardsFaceCameraPosition: 0 78 | useLegacyDetailDistribution: 1 79 | vSyncCount: 0 80 | lodBias: 0.4 81 | maximumLODLevel: 0 82 | enableLODCrossFade: 1 83 | streamingMipmapsActive: 0 84 | streamingMipmapsAddAllCameras: 1 85 | streamingMipmapsMemoryBudget: 512 86 | streamingMipmapsRenderersPerFrame: 512 87 | streamingMipmapsMaxLevelReduction: 2 88 | streamingMipmapsMaxFileIORequests: 1024 89 | particleRaycastBudget: 16 90 | asyncUploadTimeSlice: 2 91 | asyncUploadBufferSize: 16 92 | asyncUploadPersistentBuffer: 1 93 | resolutionScalingFixedDPIFactor: 1 94 | customRenderPipeline: {fileID: 0} 95 | terrainQualityOverrides: 0 96 | terrainPixelError: 1 97 | terrainDetailDensityScale: 1 98 | terrainBasemapDistance: 1000 99 | terrainDetailDistance: 80 100 | terrainTreeDistance: 5000 101 | terrainBillboardStart: 50 102 | terrainFadeLength: 5 103 | terrainMaxTrees: 50 104 | excludedTargetPlatforms: [] 105 | - serializedVersion: 3 106 | name: Medium 107 | pixelLightCount: 1 108 | shadows: 1 109 | shadowResolution: 0 110 | shadowProjection: 1 111 | shadowCascades: 1 112 | shadowDistance: 20 113 | shadowNearPlaneOffset: 3 114 | shadowCascade2Split: 0.33333334 115 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 116 | shadowmaskMode: 0 117 | skinWeights: 2 118 | globalTextureMipmapLimit: 0 119 | textureMipmapLimitSettings: [] 120 | anisotropicTextures: 1 121 | antiAliasing: 0 122 | softParticles: 0 123 | softVegetation: 0 124 | realtimeReflectionProbes: 0 125 | billboardsFaceCameraPosition: 0 126 | useLegacyDetailDistribution: 1 127 | vSyncCount: 1 128 | lodBias: 0.7 129 | maximumLODLevel: 0 130 | enableLODCrossFade: 1 131 | streamingMipmapsActive: 0 132 | streamingMipmapsAddAllCameras: 1 133 | streamingMipmapsMemoryBudget: 512 134 | streamingMipmapsRenderersPerFrame: 512 135 | streamingMipmapsMaxLevelReduction: 2 136 | streamingMipmapsMaxFileIORequests: 1024 137 | particleRaycastBudget: 64 138 | asyncUploadTimeSlice: 2 139 | asyncUploadBufferSize: 16 140 | asyncUploadPersistentBuffer: 1 141 | resolutionScalingFixedDPIFactor: 1 142 | customRenderPipeline: {fileID: 0} 143 | terrainQualityOverrides: 0 144 | terrainPixelError: 1 145 | terrainDetailDensityScale: 1 146 | terrainBasemapDistance: 1000 147 | terrainDetailDistance: 80 148 | terrainTreeDistance: 5000 149 | terrainBillboardStart: 50 150 | terrainFadeLength: 5 151 | terrainMaxTrees: 50 152 | excludedTargetPlatforms: [] 153 | - serializedVersion: 3 154 | name: High 155 | pixelLightCount: 2 156 | shadows: 2 157 | shadowResolution: 1 158 | shadowProjection: 1 159 | shadowCascades: 2 160 | shadowDistance: 40 161 | shadowNearPlaneOffset: 3 162 | shadowCascade2Split: 0.33333334 163 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 164 | shadowmaskMode: 1 165 | skinWeights: 2 166 | globalTextureMipmapLimit: 0 167 | textureMipmapLimitSettings: [] 168 | anisotropicTextures: 1 169 | antiAliasing: 0 170 | softParticles: 0 171 | softVegetation: 1 172 | realtimeReflectionProbes: 1 173 | billboardsFaceCameraPosition: 1 174 | useLegacyDetailDistribution: 1 175 | vSyncCount: 1 176 | lodBias: 1 177 | maximumLODLevel: 0 178 | enableLODCrossFade: 1 179 | streamingMipmapsActive: 0 180 | streamingMipmapsAddAllCameras: 1 181 | streamingMipmapsMemoryBudget: 512 182 | streamingMipmapsRenderersPerFrame: 512 183 | streamingMipmapsMaxLevelReduction: 2 184 | streamingMipmapsMaxFileIORequests: 1024 185 | particleRaycastBudget: 256 186 | asyncUploadTimeSlice: 2 187 | asyncUploadBufferSize: 16 188 | asyncUploadPersistentBuffer: 1 189 | resolutionScalingFixedDPIFactor: 1 190 | customRenderPipeline: {fileID: 0} 191 | terrainQualityOverrides: 0 192 | terrainPixelError: 1 193 | terrainDetailDensityScale: 1 194 | terrainBasemapDistance: 1000 195 | terrainDetailDistance: 80 196 | terrainTreeDistance: 5000 197 | terrainBillboardStart: 50 198 | terrainFadeLength: 5 199 | terrainMaxTrees: 50 200 | excludedTargetPlatforms: [] 201 | - serializedVersion: 3 202 | name: Very High 203 | pixelLightCount: 3 204 | shadows: 2 205 | shadowResolution: 2 206 | shadowProjection: 1 207 | shadowCascades: 2 208 | shadowDistance: 70 209 | shadowNearPlaneOffset: 3 210 | shadowCascade2Split: 0.33333334 211 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 212 | shadowmaskMode: 1 213 | skinWeights: 4 214 | globalTextureMipmapLimit: 0 215 | textureMipmapLimitSettings: [] 216 | anisotropicTextures: 2 217 | antiAliasing: 2 218 | softParticles: 1 219 | softVegetation: 1 220 | realtimeReflectionProbes: 1 221 | billboardsFaceCameraPosition: 1 222 | useLegacyDetailDistribution: 1 223 | vSyncCount: 1 224 | lodBias: 1.5 225 | maximumLODLevel: 0 226 | enableLODCrossFade: 1 227 | streamingMipmapsActive: 0 228 | streamingMipmapsAddAllCameras: 1 229 | streamingMipmapsMemoryBudget: 512 230 | streamingMipmapsRenderersPerFrame: 512 231 | streamingMipmapsMaxLevelReduction: 2 232 | streamingMipmapsMaxFileIORequests: 1024 233 | particleRaycastBudget: 1024 234 | asyncUploadTimeSlice: 2 235 | asyncUploadBufferSize: 16 236 | asyncUploadPersistentBuffer: 1 237 | resolutionScalingFixedDPIFactor: 1 238 | customRenderPipeline: {fileID: 0} 239 | terrainQualityOverrides: 0 240 | terrainPixelError: 1 241 | terrainDetailDensityScale: 1 242 | terrainBasemapDistance: 1000 243 | terrainDetailDistance: 80 244 | terrainTreeDistance: 5000 245 | terrainBillboardStart: 50 246 | terrainFadeLength: 5 247 | terrainMaxTrees: 50 248 | excludedTargetPlatforms: [] 249 | - serializedVersion: 3 250 | name: Ultra 251 | pixelLightCount: 4 252 | shadows: 2 253 | shadowResolution: 2 254 | shadowProjection: 1 255 | shadowCascades: 4 256 | shadowDistance: 150 257 | shadowNearPlaneOffset: 3 258 | shadowCascade2Split: 0.33333334 259 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 260 | shadowmaskMode: 1 261 | skinWeights: 4 262 | globalTextureMipmapLimit: 0 263 | textureMipmapLimitSettings: [] 264 | anisotropicTextures: 2 265 | antiAliasing: 2 266 | softParticles: 1 267 | softVegetation: 1 268 | realtimeReflectionProbes: 1 269 | billboardsFaceCameraPosition: 1 270 | useLegacyDetailDistribution: 1 271 | vSyncCount: 1 272 | lodBias: 2 273 | maximumLODLevel: 0 274 | enableLODCrossFade: 1 275 | streamingMipmapsActive: 0 276 | streamingMipmapsAddAllCameras: 1 277 | streamingMipmapsMemoryBudget: 512 278 | streamingMipmapsRenderersPerFrame: 512 279 | streamingMipmapsMaxLevelReduction: 2 280 | streamingMipmapsMaxFileIORequests: 1024 281 | particleRaycastBudget: 4096 282 | asyncUploadTimeSlice: 2 283 | asyncUploadBufferSize: 16 284 | asyncUploadPersistentBuffer: 1 285 | resolutionScalingFixedDPIFactor: 1 286 | customRenderPipeline: {fileID: 0} 287 | terrainQualityOverrides: 0 288 | terrainPixelError: 1 289 | terrainDetailDensityScale: 1 290 | terrainBasemapDistance: 1000 291 | terrainDetailDistance: 80 292 | terrainTreeDistance: 5000 293 | terrainBillboardStart: 50 294 | terrainFadeLength: 5 295 | terrainMaxTrees: 50 296 | excludedTargetPlatforms: [] 297 | m_TextureMipmapLimitGroupNames: [] 298 | m_PerPlatformDefaultQuality: 299 | Android: 2 300 | Lumin: 5 301 | Nintendo 3DS: 5 302 | Nintendo Switch: 5 303 | PS4: 5 304 | PSP2: 2 305 | Server: 0 306 | Stadia: 5 307 | Standalone: 5 308 | WebGL: 3 309 | Windows Store Apps: 5 310 | XboxOne: 5 311 | iPhone: 2 312 | tvOS: 2 313 | -------------------------------------------------------------------------------- /ProjectSettings/SceneTemplateSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "templatePinStates": [], 3 | "dependencyTypeInfos": [ 4 | { 5 | "userAdded": false, 6 | "type": "UnityEngine.AnimationClip", 7 | "ignore": false, 8 | "defaultInstantiationMode": 0, 9 | "supportsModification": true 10 | }, 11 | { 12 | "userAdded": false, 13 | "type": "UnityEditor.Animations.AnimatorController", 14 | "ignore": false, 15 | "defaultInstantiationMode": 0, 16 | "supportsModification": true 17 | }, 18 | { 19 | "userAdded": false, 20 | "type": "UnityEngine.AnimatorOverrideController", 21 | "ignore": false, 22 | "defaultInstantiationMode": 0, 23 | "supportsModification": true 24 | }, 25 | { 26 | "userAdded": false, 27 | "type": "UnityEditor.Audio.AudioMixerController", 28 | "ignore": false, 29 | "defaultInstantiationMode": 0, 30 | "supportsModification": true 31 | }, 32 | { 33 | "userAdded": false, 34 | "type": "UnityEngine.ComputeShader", 35 | "ignore": true, 36 | "defaultInstantiationMode": 1, 37 | "supportsModification": true 38 | }, 39 | { 40 | "userAdded": false, 41 | "type": "UnityEngine.Cubemap", 42 | "ignore": false, 43 | "defaultInstantiationMode": 0, 44 | "supportsModification": true 45 | }, 46 | { 47 | "userAdded": false, 48 | "type": "UnityEngine.GameObject", 49 | "ignore": false, 50 | "defaultInstantiationMode": 0, 51 | "supportsModification": true 52 | }, 53 | { 54 | "userAdded": false, 55 | "type": "UnityEditor.LightingDataAsset", 56 | "ignore": false, 57 | "defaultInstantiationMode": 0, 58 | "supportsModification": false 59 | }, 60 | { 61 | "userAdded": false, 62 | "type": "UnityEngine.LightingSettings", 63 | "ignore": false, 64 | "defaultInstantiationMode": 0, 65 | "supportsModification": true 66 | }, 67 | { 68 | "userAdded": false, 69 | "type": "UnityEngine.Material", 70 | "ignore": false, 71 | "defaultInstantiationMode": 0, 72 | "supportsModification": true 73 | }, 74 | { 75 | "userAdded": false, 76 | "type": "UnityEditor.MonoScript", 77 | "ignore": true, 78 | "defaultInstantiationMode": 1, 79 | "supportsModification": true 80 | }, 81 | { 82 | "userAdded": false, 83 | "type": "UnityEngine.PhysicMaterial", 84 | "ignore": false, 85 | "defaultInstantiationMode": 0, 86 | "supportsModification": true 87 | }, 88 | { 89 | "userAdded": false, 90 | "type": "UnityEngine.PhysicsMaterial2D", 91 | "ignore": false, 92 | "defaultInstantiationMode": 0, 93 | "supportsModification": true 94 | }, 95 | { 96 | "userAdded": false, 97 | "type": "UnityEngine.Rendering.PostProcessing.PostProcessProfile", 98 | "ignore": false, 99 | "defaultInstantiationMode": 0, 100 | "supportsModification": true 101 | }, 102 | { 103 | "userAdded": false, 104 | "type": "UnityEngine.Rendering.PostProcessing.PostProcessResources", 105 | "ignore": false, 106 | "defaultInstantiationMode": 0, 107 | "supportsModification": true 108 | }, 109 | { 110 | "userAdded": false, 111 | "type": "UnityEngine.Rendering.VolumeProfile", 112 | "ignore": false, 113 | "defaultInstantiationMode": 0, 114 | "supportsModification": true 115 | }, 116 | { 117 | "userAdded": false, 118 | "type": "UnityEditor.SceneAsset", 119 | "ignore": false, 120 | "defaultInstantiationMode": 0, 121 | "supportsModification": false 122 | }, 123 | { 124 | "userAdded": false, 125 | "type": "UnityEngine.Shader", 126 | "ignore": true, 127 | "defaultInstantiationMode": 1, 128 | "supportsModification": true 129 | }, 130 | { 131 | "userAdded": false, 132 | "type": "UnityEngine.ShaderVariantCollection", 133 | "ignore": true, 134 | "defaultInstantiationMode": 1, 135 | "supportsModification": true 136 | }, 137 | { 138 | "userAdded": false, 139 | "type": "UnityEngine.Texture", 140 | "ignore": false, 141 | "defaultInstantiationMode": 0, 142 | "supportsModification": true 143 | }, 144 | { 145 | "userAdded": false, 146 | "type": "UnityEngine.Texture2D", 147 | "ignore": false, 148 | "defaultInstantiationMode": 0, 149 | "supportsModification": true 150 | }, 151 | { 152 | "userAdded": false, 153 | "type": "UnityEngine.Timeline.TimelineAsset", 154 | "ignore": false, 155 | "defaultInstantiationMode": 0, 156 | "supportsModification": true 157 | } 158 | ], 159 | "defaultDependencyTypeInfo": { 160 | "userAdded": false, 161 | "type": "", 162 | "ignore": false, 163 | "defaultInstantiationMode": 1, 164 | "supportsModification": true 165 | }, 166 | "newSceneOverride": 0 167 | } -------------------------------------------------------------------------------- /ProjectSettings/TagManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!78 &1 4 | TagManager: 5 | serializedVersion: 2 6 | tags: [] 7 | layers: 8 | - Default 9 | - TransparentFX 10 | - Ignore Raycast 11 | - 12 | - Water 13 | - UI 14 | - 15 | - 16 | - 17 | - 18 | - 19 | - 20 | - 21 | - 22 | - 23 | - 24 | - 25 | - 26 | - 27 | - 28 | - 29 | - 30 | - 31 | - 32 | - 33 | - 34 | - 35 | - 36 | - 37 | - 38 | - 39 | - 40 | m_SortingLayers: 41 | - name: Default 42 | uniqueID: 0 43 | locked: 0 44 | -------------------------------------------------------------------------------- /ProjectSettings/TimeManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!5 &1 4 | TimeManager: 5 | m_ObjectHideFlags: 0 6 | Fixed Timestep: 0.02 7 | Maximum Allowed Timestep: 0.33333334 8 | m_TimeScale: 1 9 | Maximum Particle Timestep: 0.03 10 | -------------------------------------------------------------------------------- /ProjectSettings/UnityConnectSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!310 &1 4 | UnityConnectSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 1 7 | m_Enabled: 0 8 | m_TestMode: 0 9 | m_EventOldUrl: https://api.uca.cloud.unity3d.com/v1/events 10 | m_EventUrl: https://cdp.cloud.unity3d.com/v1/events 11 | m_ConfigUrl: https://config.uca.cloud.unity3d.com 12 | m_DashboardUrl: https://dashboard.unity3d.com 13 | m_TestInitMode: 0 14 | CrashReportingSettings: 15 | m_EventUrl: https://perf-events.cloud.unity3d.com 16 | m_Enabled: 0 17 | m_LogBufferSize: 10 18 | m_CaptureEditorExceptions: 1 19 | UnityPurchasingSettings: 20 | m_Enabled: 0 21 | m_TestMode: 0 22 | UnityAnalyticsSettings: 23 | m_Enabled: 0 24 | m_TestMode: 0 25 | m_InitializeOnStartup: 1 26 | m_PackageRequiringCoreStatsPresent: 0 27 | UnityAdsSettings: 28 | m_Enabled: 0 29 | m_InitializeOnStartup: 1 30 | m_TestMode: 0 31 | m_IosGameId: 32 | m_AndroidGameId: 33 | m_GameIds: {} 34 | m_GameId: 35 | PerformanceReportingSettings: 36 | m_Enabled: 0 37 | -------------------------------------------------------------------------------- /ProjectSettings/VFXManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!937362698 &1 4 | VFXManager: 5 | m_ObjectHideFlags: 0 6 | m_IndirectShader: {fileID: 0} 7 | m_CopyBufferShader: {fileID: 0} 8 | m_SortShader: {fileID: 0} 9 | m_StripUpdateShader: {fileID: 0} 10 | m_RenderPipeSettingsPath: 11 | m_FixedTimeStep: 0.016666668 12 | m_MaxDeltaTime: 0.05 13 | -------------------------------------------------------------------------------- /ProjectSettings/VersionControlSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!890905787 &1 4 | VersionControlSettings: 5 | m_ObjectHideFlags: 0 6 | m_Mode: Visible Meta Files 7 | m_CollabEditorSettings: 8 | inProgressEnabled: 1 9 | -------------------------------------------------------------------------------- /ProjectSettings/XRSettings.asset: -------------------------------------------------------------------------------- 1 | { 2 | "m_SettingKeys": [ 3 | "VR Device Disabled", 4 | "VR Device User Alert" 5 | ], 6 | "m_SettingValues": [ 7 | "False", 8 | "False" 9 | ] 10 | } -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # dynamic-unity-avatar-generator 2 | Dynamically generates humanoid `UnityEngine.Avatar` from skeleton bones at runtime. 3 | 4 | ## How to import by Unity Package Manager 5 | 6 | Add following dependencies to your `/Packages/manifest.json`. 7 | 8 | ```json 9 | { 10 | "dependencies": { 11 | "com.mochineko.dynamic-unity-avatar-generator": "https://github.com/mochi-neko/dynamic-unity-avatar-generator.git?path=/Assets/Mochineko/DynamicUnityAvatarGenerator#0.2.1", 12 | "com.mochineko.relent": "https://github.com/mochi-neko/Relent.git?path=/Assets/Mochineko/Relent#0.2.0", 13 | "com.cysharp.unitask": "https://github.com/Cysharp/UniTask.git?path=src/UniTask/Assets/Plugins/UniTask", 14 | ... 15 | } 16 | } 17 | ``` 18 | 19 | ## Features 20 | 21 | Generates `UnityEngine.Avatar` from humanoid 3D model hierarchy at runtime 22 | with specifying skeleton root bone retrieval logic (`IRootBoneRetriever`), 23 | human bone retrieval logic (`IHumanBoneRetriever`) 24 | and other parameters of `HumanDescription` (`HumanDescriptionParameters`). 25 | 26 | - Humanoid `UnityEngine.Avatar` generator 27 | - Root bone retriever (`IRootBoneRetriever`) 28 | - [x] Regular expression matching 29 | - [x] String comparison rule 30 | - [x] Specifying root bone instance 31 | - [ ] Has most children bones 32 | - Human bone retriever (`IHumanBoneRetriever`) 33 | - [x] Regular expression matching 34 | - [x] String comparison rule 35 | - Human bone transform map `IReadOnlyDictionary` creator from `UnityEngine.Avatar`. 36 | 37 | ## How to use 38 | 39 | See [AvatarGeneratorTest](./Assets/Mochineko/DynamicUnityAvatarGenerator.Tests/AvatarGeneratorTest.cs). 40 | 41 | Regular expression pattern samples are in [RegularExpressionHumanBoneRetrieverTest](./Assets/Mochineko/DynamicUnityAvatarGenerator.Tests/RegularExpressionHumanBoneRetrieverTest.cs). 42 | 43 | ## Presets 44 | 45 | Provides some presets of `IRootBoneRetriever`, `IHumanBoneRetriever` and `HumanDescriptionParameters`. 46 | 47 | - Root bone retriever (`IRootBoneRetriever`) 48 | - Mixamo and Biped preset 49 | - Human bone retriever (`IHumanBoneRetriever`) 50 | - Mixamo and Biped preset 51 | - Human description parameters (`HumanDescriptionParameters`) 52 | - Sample preset 53 | 54 | See [presets](./Assets/Mochineko/DynamicUnityAvatarGenerator/Presets). 55 | 56 | ## Change log 57 | 58 | See [CHANGELOG](./CHANGELOG.md). 59 | 60 | ## 3rd party notices 61 | 62 | See [NOTICE](./NOTICE.md). 63 | 64 | ## License 65 | 66 | Licensed under the [MIT](./LICENSE) license. 67 | --------------------------------------------------------------------------------