├── .gitignore ├── ScreenShots ├── 001.png ├── 002.png ├── 003.png ├── 004.png ├── 005.png ├── 006.png ├── 001.png.meta ├── 002.png.meta ├── 003.png.meta ├── 004.png.meta ├── 005.png.meta └── 006.png.meta ├── Animations ├── HumanoidRun.fbx ├── HumanoidIdle.fbx ├── RPG Character Animation Pack FREE │ ├── Animations.meta │ └── Animations │ │ ├── Unarmed │ │ ├── RPG-Character@Unarmed-Fall.FBX │ │ ├── RPG-Character@Unarmed-Jump.FBX │ │ ├── RPG-Character@Unarmed-Attack-L1.FBX │ │ ├── RPG-Character@Unarmed-Attack-R1.FBX │ │ └── RPG-Character@Unarmed-GetHit-B1.FBX │ │ ├── 2Hand-Sword │ │ ├── RPG-Character@2Hand-Sword-Death1.FBX │ │ ├── RPG-Character@2Hand-Sword-Attack1.FBX │ │ └── RPG-Character@2Hand-Sword-Attack2.FBX │ │ ├── Unarmed.meta │ │ └── 2Hand-Sword.meta ├── RPG Character Animation Pack FREE.meta ├── CharacterAnimationController_UMA.controller.meta └── CharacterAnimationController_UMA.controller ├── SQLs ├── main.sql └── main.sql.meta ├── SQLs.meta ├── Scenes ├── 00Init_UMA.unity.meta ├── 01Home_UMA.unity.meta ├── 00Init_MMO_UMA.unity.meta └── 01Home_MMO_UMA.unity.meta ├── GameData.meta ├── Prefabs.meta ├── Resources.meta ├── Scenes.meta ├── Scripts.meta ├── Animations.meta ├── GameData ├── Item.meta ├── GameDatabase_UMA.asset.meta ├── Item │ ├── UMA_Shoes.asset.meta │ ├── UMA_BaseballBat.asset.meta │ ├── UMA_Shirt_Jeans.asset.meta │ ├── UMA_Shoes.asset │ ├── UMA_Shirt_Jeans.asset │ └── UMA_BaseballBat.asset ├── UmaAvatarDatabase.asset.meta ├── Player_UMA.asset.meta ├── UmaAvatarDatabase.asset ├── Player_UMA.asset └── GameDatabase_UMA.asset ├── ScreenShots.meta ├── Scripts ├── CharacterData │ ├── IPlayerCharacterData_UMA.cs │ ├── SerializationSurrogates.meta │ ├── PlayerCharacterData_UMA.cs │ ├── IPlayerCharacterData_UMA.cs.meta │ ├── PlayerCharacterData_UMA.cs.meta │ ├── PlayerCharacterDataExtension_UMA.cs.meta │ ├── SerializationSurrogates │ │ ├── PlayerCharacterSerializationSurrogate_UMA.cs.meta │ │ └── PlayerCharacterSerializationSurrogate_UMA.cs │ └── PlayerCharacterDataExtension_UMA.cs ├── MMO.meta ├── MMO │ ├── UI.meta │ ├── Database.meta │ ├── Networking.meta │ ├── UI │ │ ├── UIMmoCharacterListUMA.cs.meta │ │ ├── UIMmoCharacterCreateUMA.cs.meta │ │ ├── UIMmoCharacterCreateUMA.cs │ │ └── UIMmoCharacterListUMA.cs │ ├── Database │ │ ├── MySQLDatabase_UMA.cs.meta │ │ ├── SQLiteDatabase_UMA.cs.meta │ │ ├── MySQLDatabase_UMA.cs │ │ └── SQLiteDatabase_UMA.cs │ └── Networking │ │ ├── CentralNetworkManager_UMA.cs.meta │ │ └── CentralNetworkManager_UMA.cs ├── UI.meta ├── GameData.meta ├── Interfaces.meta ├── CharacterData.meta ├── GameData │ ├── IEquipmentItem_UMA.cs │ ├── Item_UMA.cs.meta │ ├── IEquipmentItem_UMA.cs.meta │ ├── UmaAvatarDatabase.cs.meta │ ├── BaseEquipmentItem_UMA.cs.meta │ ├── BaseEquipmentItem_UMA.cs │ ├── Item_UMA.cs │ └── UmaAvatarDatabase.cs ├── UmaAvatarData.cs.meta ├── GameInstance_UMA.cs.meta ├── UI │ ├── UIUmaDnaSlider.cs.meta │ ├── UICharacterCreateUMA.cs.meta │ ├── UICharacterListUMA.cs.meta │ ├── UIUmaColorDropdown.cs.meta │ ├── UIUmaCustomizeSlotDropdown.cs.meta │ ├── UICharacterListUMA.cs │ ├── UIUmaDnaSlider.cs │ ├── UIUmaColorDropdown.cs │ ├── UIUmaCustomizeSlotDropdown.cs │ └── UICharacterCreateUMA.cs ├── AnimatorCharacterModelUMA.cs.meta ├── PlayableCharacterModelUMA.cs.meta ├── BasePlayerCharacterEntity_UMA.cs.meta ├── Interfaces │ ├── ICharacterModelUma.cs.meta │ └── ICharacterModelUma.cs ├── GameInstance_UMA.cs ├── BasePlayerCharacterEntity_UMA.cs ├── UmaAvatarData.cs ├── AnimatorCharacterModelUMA.cs └── PlayableCharacterModelUMA.cs ├── Prefabs ├── WeaponModels.meta ├── UIDnaSlider.prefab.meta ├── UIColorDropdown.prefab.meta ├── WeaponModels │ ├── BaseballBat.mat.meta │ ├── BaseballBat.prefab.meta │ ├── BaseballBat.mat │ └── BaseballBat.prefab ├── UICustomizeSlotDropdown.prefab.meta ├── UMAPlayerCharacterEntity.prefab.meta ├── UMAPlayerCharacterEntity_Playable.prefab.meta └── UIDnaSlider.prefab ├── Resources ├── __EmptyAnimatorControllerForUMAIntegration.controller.meta └── __EmptyAnimatorControllerForUMAIntegration.controller ├── LICENSE └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | LICENSE.meta 2 | README.md.meta 3 | /UMA 4 | /InternalDataStore 5 | UMA.meta 6 | InternalDataStore.meta -------------------------------------------------------------------------------- /ScreenShots/001.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suriyun-mmorpg/UnityMultiplayerARPG_UMA/HEAD/ScreenShots/001.png -------------------------------------------------------------------------------- /ScreenShots/002.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suriyun-mmorpg/UnityMultiplayerARPG_UMA/HEAD/ScreenShots/002.png -------------------------------------------------------------------------------- /ScreenShots/003.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suriyun-mmorpg/UnityMultiplayerARPG_UMA/HEAD/ScreenShots/003.png -------------------------------------------------------------------------------- /ScreenShots/004.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suriyun-mmorpg/UnityMultiplayerARPG_UMA/HEAD/ScreenShots/004.png -------------------------------------------------------------------------------- /ScreenShots/005.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suriyun-mmorpg/UnityMultiplayerARPG_UMA/HEAD/ScreenShots/005.png -------------------------------------------------------------------------------- /ScreenShots/006.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suriyun-mmorpg/UnityMultiplayerARPG_UMA/HEAD/ScreenShots/006.png -------------------------------------------------------------------------------- /Animations/HumanoidRun.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suriyun-mmorpg/UnityMultiplayerARPG_UMA/HEAD/Animations/HumanoidRun.fbx -------------------------------------------------------------------------------- /Animations/HumanoidIdle.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suriyun-mmorpg/UnityMultiplayerARPG_UMA/HEAD/Animations/HumanoidIdle.fbx -------------------------------------------------------------------------------- /SQLs/main.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE `characterumasaves` ( `id` VARCHAR(50) NOT NULL , `data` TEXT NOT NULL , PRIMARY KEY (`id`)) ENGINE = InnoDB CHARSET=utf8 COLLATE utf8_unicode_ci; -------------------------------------------------------------------------------- /Animations/RPG Character Animation Pack FREE/Animations.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 333a26b651c0a304f8ec5288c2dc61b4 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | -------------------------------------------------------------------------------- /SQLs/main.sql.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b7b0dbe37016ea44c8ddb671a02c5b78 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /SQLs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fd6d40c1926f29a4db05fe4c9f6bf0bd 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Scenes/00Init_UMA.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d047340ec3c0813458b9959eda6bd645 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Scenes/01Home_UMA.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c3c5888ac576f7144a0af1cb9028533f 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /GameData.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8c67960e063360d4e9100a9af18508df 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Prefabs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c482eea0b8365554c8d28e86cf724014 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Resources.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4f6463d4fa4820444b8ebec22cdd7f7a 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Scenes.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6d3a171a3b08f0047aec3814cd802557 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Scenes/00Init_MMO_UMA.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c690c316ab02685419c8b55292f3ef24 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Scenes/01Home_MMO_UMA.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5decc8fd46f421e42b94635d28f43c39 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Scripts.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f503dc8d9691e2e44a964451ad27dff5 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Animations.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 463feb396f3fd1d489254cb14e53cf33 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /GameData/Item.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f09507271dcef7045a1cfe76122ce6bc 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /ScreenShots.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c2c9541a1f679ef419024d9e3bcf85d6 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Scripts/CharacterData/IPlayerCharacterData_UMA.cs: -------------------------------------------------------------------------------- 1 | namespace MultiplayerARPG 2 | { 3 | public partial interface IPlayerCharacterData 4 | { 5 | UmaAvatarData UmaAvatarData { get; set; } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /Scripts/MMO.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3c48640d8cdc08a41abc2d2f1d031115 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Scripts/MMO/UI.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 73b335e36b17fcc4ab7a3f95b99ea29c 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Scripts/UI.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 77b67594e0ae5e24ca412913f380d6d9 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Scripts/GameData.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ca3e81511f0741349851636a29d5344d 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Scripts/Interfaces.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d46fcb49b80874b4387a2c6588ecb1df 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Prefabs/WeaponModels.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3dfa01344e91d4d43a10a30c0f72ed50 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Scripts/CharacterData.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2235e47bbf27b3046a2a14a058f13b70 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Scripts/MMO/Database.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f1cd5213de56978459c526f04a6af677 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Scripts/MMO/Networking.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6d61640628b3aab459cf32c10e71ac15 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Animations/RPG Character Animation Pack FREE.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2ff751f9e33a56a478acfa4d7de54974 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Prefabs/UIDnaSlider.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3c7b2c8641d0b024d81e8d1f9f01afea 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 100100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /GameData/GameDatabase_UMA.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 22476b96f3649b647959b0de0502114d 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 11400000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /GameData/Item/UMA_Shoes.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 691223c0d0d1c9342aa0df9855949779 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 11400000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /GameData/UmaAvatarDatabase.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fde58e3f1ea834b48bc69830e7037912 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 11400000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Prefabs/UIColorDropdown.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 07806e09d9b657e4cbbc5d956fd490e9 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 100100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Scripts/CharacterData/SerializationSurrogates.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 39c7f26d5a65c97419a6e074fd1e5c16 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Animations/RPG Character Animation Pack FREE/Animations/Unarmed/RPG-Character@Unarmed-Fall.FBX: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suriyun-mmorpg/UnityMultiplayerARPG_UMA/HEAD/Animations/RPG Character Animation Pack FREE/Animations/Unarmed/RPG-Character@Unarmed-Fall.FBX -------------------------------------------------------------------------------- /Animations/RPG Character Animation Pack FREE/Animations/Unarmed/RPG-Character@Unarmed-Jump.FBX: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suriyun-mmorpg/UnityMultiplayerARPG_UMA/HEAD/Animations/RPG Character Animation Pack FREE/Animations/Unarmed/RPG-Character@Unarmed-Jump.FBX -------------------------------------------------------------------------------- /GameData/Item/UMA_BaseballBat.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 91eec32179dd9e84bad4b728ddde1e02 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 11400000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /GameData/Item/UMA_Shirt_Jeans.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 87b4c98d2d09c4a44a53c633310c8b96 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 11400000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Prefabs/WeaponModels/BaseballBat.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 20d0cfc9b484fee4ab89dcd7e61638ed 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Prefabs/UICustomizeSlotDropdown.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7105d170af944214dbc512e885845a58 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 100100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Prefabs/UMAPlayerCharacterEntity.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e10fc226d7c62c140ab7ed9fcdfaad34 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 100100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Prefabs/WeaponModels/BaseballBat.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7fdfc8c4006877f478ec60f4341aa7b9 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 100100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Animations/RPG Character Animation Pack FREE/Animations/Unarmed/RPG-Character@Unarmed-Attack-L1.FBX: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suriyun-mmorpg/UnityMultiplayerARPG_UMA/HEAD/Animations/RPG Character Animation Pack FREE/Animations/Unarmed/RPG-Character@Unarmed-Attack-L1.FBX -------------------------------------------------------------------------------- /Animations/RPG Character Animation Pack FREE/Animations/Unarmed/RPG-Character@Unarmed-Attack-R1.FBX: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suriyun-mmorpg/UnityMultiplayerARPG_UMA/HEAD/Animations/RPG Character Animation Pack FREE/Animations/Unarmed/RPG-Character@Unarmed-Attack-R1.FBX -------------------------------------------------------------------------------- /Animations/RPG Character Animation Pack FREE/Animations/Unarmed/RPG-Character@Unarmed-GetHit-B1.FBX: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suriyun-mmorpg/UnityMultiplayerARPG_UMA/HEAD/Animations/RPG Character Animation Pack FREE/Animations/Unarmed/RPG-Character@Unarmed-GetHit-B1.FBX -------------------------------------------------------------------------------- /Prefabs/UMAPlayerCharacterEntity_Playable.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3db54f95f11a20a4081f602d37c75782 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 100100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Animations/RPG Character Animation Pack FREE/Animations/2Hand-Sword/RPG-Character@2Hand-Sword-Death1.FBX: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suriyun-mmorpg/UnityMultiplayerARPG_UMA/HEAD/Animations/RPG Character Animation Pack FREE/Animations/2Hand-Sword/RPG-Character@2Hand-Sword-Death1.FBX -------------------------------------------------------------------------------- /Animations/RPG Character Animation Pack FREE/Animations/2Hand-Sword/RPG-Character@2Hand-Sword-Attack1.FBX: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suriyun-mmorpg/UnityMultiplayerARPG_UMA/HEAD/Animations/RPG Character Animation Pack FREE/Animations/2Hand-Sword/RPG-Character@2Hand-Sword-Attack1.FBX -------------------------------------------------------------------------------- /Animations/RPG Character Animation Pack FREE/Animations/2Hand-Sword/RPG-Character@2Hand-Sword-Attack2.FBX: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suriyun-mmorpg/UnityMultiplayerARPG_UMA/HEAD/Animations/RPG Character Animation Pack FREE/Animations/2Hand-Sword/RPG-Character@2Hand-Sword-Attack2.FBX -------------------------------------------------------------------------------- /Resources/__EmptyAnimatorControllerForUMAIntegration.controller.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 67242ecee9db4aa4caf138dfc4d9ebc3 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 9100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Scripts/GameData/IEquipmentItem_UMA.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using UMA; 3 | 4 | namespace MultiplayerARPG 5 | { 6 | public partial interface IEquipmentItem 7 | { 8 | Dictionary UmaRecipeSlot { get; } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /Animations/RPG Character Animation Pack FREE/Animations/Unarmed.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6256d76e69665db49940c6a380a2a6bf 3 | folderAsset: yes 4 | timeCreated: 1461591014 5 | licenseType: Store 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Animations/RPG Character Animation Pack FREE/Animations/2Hand-Sword.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ce1172405a7eec843a79c29478d193e2 3 | folderAsset: yes 4 | timeCreated: 1461590960 5 | licenseType: Store 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /GameData/Player_UMA.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: dc913e9cf36197c4799489ef0a2315b2 3 | timeCreated: 1516987605 4 | licenseType: Pro 5 | NativeFormatImporter: 6 | externalObjects: {} 7 | mainObjectFileID: 11400000 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Scripts/CharacterData/PlayerCharacterData_UMA.cs: -------------------------------------------------------------------------------- 1 | namespace MultiplayerARPG 2 | { 3 | public partial class PlayerCharacterData 4 | { 5 | private UmaAvatarData umaAvatarData; 6 | public UmaAvatarData UmaAvatarData { get { return umaAvatarData; } set { umaAvatarData = value; } } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /Scripts/UmaAvatarData.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f39f30a05a7ec63418565f5494519a0c 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Scripts/GameData/Item_UMA.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 15a4ab6ec27961e49ba1a79ec657416d 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Scripts/GameInstance_UMA.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c8b468fd2a172d844bdb014c0fa00caf 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Scripts/UI/UIUmaDnaSlider.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b3291e71160f9654ab983009e6b068d8 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Scripts/UI/UICharacterCreateUMA.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1af913b3e6f4f3a47b220fe84ebf776e 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Scripts/UI/UICharacterListUMA.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: bc6626e1481f7cf419c26c6d1fc179f0 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Scripts/UI/UIUmaColorDropdown.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c28726fe17374ce419bbc5cf6e0bdc7f 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Animations/CharacterAnimationController_UMA.controller.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c7a97ef1d9e6a654992209d9ceb68a4e 3 | timeCreated: 1516975195 4 | licenseType: Pro 5 | NativeFormatImporter: 6 | externalObjects: {} 7 | mainObjectFileID: 9100000 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Scripts/AnimatorCharacterModelUMA.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 27b7b077d5f92ce44b3355a3ce75e58b 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Scripts/GameData/IEquipmentItem_UMA.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 62cd4c6d4a043cd4c90d40d6521bb453 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Scripts/GameData/UmaAvatarDatabase.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 88526c47a0571d44bbe0e654a11b2528 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Scripts/MMO/UI/UIMmoCharacterListUMA.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 524a3bc9b23cafa4c884be5f3645cb3f 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Scripts/PlayableCharacterModelUMA.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 31b5fd3be6b12734bb45530a46a02543 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Scripts/BasePlayerCharacterEntity_UMA.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8cdd18d22f7c9cc4e90467c52953fa5f 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Scripts/GameData/BaseEquipmentItem_UMA.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 16ddbc70ded9fd84fbe33fbf22a88b90 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Scripts/Interfaces/ICharacterModelUma.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: de54588c8c9b65f4194ed4fe29bee368 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Scripts/MMO/Database/MySQLDatabase_UMA.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 86cc6ec90c3653f4498ed17f63b6cddd 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Scripts/MMO/Database/SQLiteDatabase_UMA.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2a5366e8c8e400d4ca8d99d10cbd4199 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Scripts/MMO/UI/UIMmoCharacterCreateUMA.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a0e5704e2dd30d747a70d2d6650ed6ce 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Scripts/UI/UIUmaCustomizeSlotDropdown.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 79bf5a26cb7311a4eb9843993bfc0dc9 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Scripts/CharacterData/IPlayerCharacterData_UMA.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 05bcfac55a6455942b4e01e41378261e 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Scripts/CharacterData/PlayerCharacterData_UMA.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1c141adcbe02d5c4d98284d993209059 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Scripts/MMO/Networking/CentralNetworkManager_UMA.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d306280814d8a9c46a2ad3f4f8986d26 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Scripts/CharacterData/PlayerCharacterDataExtension_UMA.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 90a9bc1c981375845ab6a4087c165ff0 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Scripts/CharacterData/SerializationSurrogates/PlayerCharacterSerializationSurrogate_UMA.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: cd0842eccc85ced448703f518fd8c4ba 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Scripts/Interfaces/ICharacterModelUma.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System; 3 | using UMA.CharacterSystem; 4 | 5 | namespace MultiplayerARPG 6 | { 7 | public interface ICharacterModelUma 8 | { 9 | DynamicCharacterAvatar CacheUmaAvatar { get; } 10 | Action OnUmaCharacterCreated { get; set; } 11 | bool IsUmaCharacterCreated { get; } 12 | bool IsInitializedUMA { get; } 13 | void InitializeUMA(); 14 | void ApplyUmaAvatar(UmaAvatarData avatarData); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /Scripts/GameInstance_UMA.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | namespace MultiplayerARPG 6 | { 7 | public partial class GameInstance 8 | { 9 | [Header("UMA Setting")] 10 | public UmaAvatarDatabase umaAvatarDatabase; 11 | 12 | public UmaRace[] UmaRaces 13 | { 14 | get 15 | { 16 | if (umaAvatarDatabase != null) 17 | return umaAvatarDatabase.umaRaces; 18 | return null; 19 | } 20 | } 21 | } 22 | 23 | } 24 | -------------------------------------------------------------------------------- /Scripts/MMO/Networking/CentralNetworkManager_UMA.cs: -------------------------------------------------------------------------------- 1 | using LiteNetLib.Utils; 2 | 3 | namespace MultiplayerARPG.MMO 4 | { 5 | public partial class CentralNetworkManager 6 | { 7 | [DevExtMethods("SerializeCreateCharacterExtra")] 8 | public void SerializeCreateCharacterExtra_UMA(PlayerCharacterData characterData, NetDataWriter writer) 9 | { 10 | characterData.UmaAvatarData.Serialize(writer); 11 | } 12 | 13 | [DevExtMethods("DeserializeCreateCharacterExtra")] 14 | public void DeserializeCreateCharacterExtra_UMA(PlayerCharacterData characterData, NetDataReader reader) 15 | { 16 | UmaAvatarData umaAvatarData = new UmaAvatarData(); 17 | umaAvatarData.Deserialize(reader); 18 | characterData.UmaAvatarData = umaAvatarData; 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Scripts/CharacterData/PlayerCharacterDataExtension_UMA.cs: -------------------------------------------------------------------------------- 1 | using LiteNetLib.Utils; 2 | 3 | namespace MultiplayerARPG 4 | { 5 | public partial class PlayerCharacterDataExtensions 6 | { 7 | [DevExtMethods("CloneTo")] 8 | public static void CloneTo_UMA(IPlayerCharacterData from, IPlayerCharacterData to) 9 | { 10 | to.UmaAvatarData = from.UmaAvatarData; 11 | } 12 | 13 | [DevExtMethods("SerializeCharacterData")] 14 | public static void SerializeCharacterData_UMA(IPlayerCharacterData characterData, NetDataWriter writer) 15 | { 16 | characterData.UmaAvatarData.Serialize(writer); 17 | } 18 | 19 | [DevExtMethods("DeserializeCharacterData")] 20 | public static void DeserializeCharacterData_UMA(IPlayerCharacterData characterData, NetDataReader reader) 21 | { 22 | UmaAvatarData umaAvatarData = new UmaAvatarData(); 23 | umaAvatarData.Deserialize(reader); 24 | characterData.UmaAvatarData = umaAvatarData; 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /Scripts/MMO/UI/UIMmoCharacterCreateUMA.cs: -------------------------------------------------------------------------------- 1 | using LiteNetLibManager; 2 | 3 | namespace MultiplayerARPG.MMO 4 | { 5 | public class UIMmoCharacterCreateUMA : UICharacterCreateUMA 6 | { 7 | protected override void OnClickCreate() 8 | { 9 | PlayerCharacterData characterData = new PlayerCharacterData(); 10 | characterData.Id = GenericUtils.GetUniqueId(); 11 | characterData.SetNewPlayerCharacterData(uiInputCharacterName.text.Trim(), SelectedDataId, SelectedEntityId, SelectedFactionId); 12 | characterData.UmaAvatarData = GetAvatarData(); 13 | MMOClientInstance.Singleton.RequestCreateCharacter(characterData, OnRequestedCreateCharacter); 14 | } 15 | 16 | private void OnRequestedCreateCharacter(ResponseHandlerData responseHandler, AckResponseCode responseCode, ResponseCreateCharacterMessage response) 17 | { 18 | if (responseCode.ShowUnhandledResponseMessageDialog(response.message)) return; 19 | if (eventOnCreateCharacter != null) 20 | eventOnCreateCharacter.Invoke(); 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /Scripts/CharacterData/SerializationSurrogates/PlayerCharacterSerializationSurrogate_UMA.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.Serialization; 2 | 3 | namespace MultiplayerARPG 4 | { 5 | public partial class PlayerCharacterSerializationSurrogate 6 | { 7 | [DevExtMethods("GetObjectData")] 8 | public void GetObjectData_UMA(object obj, 9 | SerializationInfo info, 10 | StreamingContext context) 11 | { 12 | PlayerCharacterData data = (PlayerCharacterData)obj; 13 | info.AddListValue("UmaAvatarData", data.UmaAvatarData.GetBytes()); 14 | } 15 | 16 | [DevExtMethods("SetObjectData")] 17 | public void SetObjectData_UMA(object obj, 18 | SerializationInfo info, 19 | StreamingContext context, 20 | ISurrogateSelector selector) 21 | { 22 | PlayerCharacterData data = (PlayerCharacterData)obj; 23 | UmaAvatarData umaAvatarData = new UmaAvatarData(); 24 | umaAvatarData.SetBytes(info.GetListValue("UmaAvatarData")); 25 | data.UmaAvatarData = umaAvatarData; 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 Ittipon Teerapruettikulchai 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 | -------------------------------------------------------------------------------- /GameData/UmaAvatarDatabase.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &11400000 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInternal: {fileID: 0} 8 | m_GameObject: {fileID: 0} 9 | m_Enabled: 1 10 | m_EditorHideFlags: 0 11 | m_Script: {fileID: 11500000, guid: 88526c47a0571d44bbe0e654a11b2528, type: 3} 12 | m_Name: UmaAvatarDatabase 13 | m_EditorClassIdentifier: 14 | umaRaces: 15 | - name: Human 16 | genders: 17 | - name: Male 18 | raceData: {fileID: 11400000, guid: 62688b7aa02fbc544916e522fcc239c7, type: 2} 19 | customizableSlots: 20 | - name: Hair 21 | title: Hair 22 | - name: Face 23 | title: Face 24 | - name: Female 25 | raceData: {fileID: 11400000, guid: f8fea6f0ee17b3f42a4ae6cfb627bab3, type: 2} 26 | customizableSlots: 27 | - name: Hair 28 | title: Hair 29 | colorTables: 30 | - {fileID: 11400000, guid: acbc1db84c5027b4bafb18d920c6b420, type: 2} 31 | - {fileID: 11400000, guid: 919f053338460244f8cad6f535b25680, type: 2} 32 | - {fileID: 11400000, guid: 352924d338ca78841832986636fbf5d4, type: 2} 33 | -------------------------------------------------------------------------------- /Scripts/GameData/BaseEquipmentItem_UMA.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UMA; 4 | using UnityEngine; 5 | using UnityEngine.Serialization; 6 | 7 | namespace MultiplayerARPG 8 | { 9 | public partial class BaseEquipmentItem 10 | { 11 | [Header("UMA Configs")] 12 | [FormerlySerializedAs("umaRaceReceipeSlots")] 13 | public UmaRaceRecipeSlots[] umaRaceRecipeSlots; 14 | 15 | private Dictionary cacheUmaRecipeSlot; 16 | public Dictionary UmaRecipeSlot 17 | { 18 | get 19 | { 20 | if (cacheUmaRecipeSlot == null) 21 | { 22 | cacheUmaRecipeSlot = new Dictionary(); 23 | foreach (UmaRaceRecipeSlots umaRaceRecipeSlot in umaRaceRecipeSlots) 24 | { 25 | if (umaRaceRecipeSlot.raceData == null || string.IsNullOrEmpty(umaRaceRecipeSlot.raceData.raceName)) 26 | continue; 27 | cacheUmaRecipeSlot[umaRaceRecipeSlot.raceData.raceName] = umaRaceRecipeSlot.recipes; 28 | } 29 | } 30 | return cacheUmaRecipeSlot; 31 | } 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /Resources/__EmptyAnimatorControllerForUMAIntegration.controller: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!91 &9100000 4 | AnimatorController: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_Name: __EmptyAnimatorControllerForUMAIntegration 10 | serializedVersion: 5 11 | m_AnimatorParameters: [] 12 | m_AnimatorLayers: 13 | - serializedVersion: 5 14 | m_Name: Base Layer 15 | m_StateMachine: {fileID: 7827732604985201549} 16 | m_Mask: {fileID: 0} 17 | m_Motions: [] 18 | m_Behaviours: [] 19 | m_BlendingMode: 0 20 | m_SyncedLayerIndex: -1 21 | m_DefaultWeight: 0 22 | m_IKPass: 0 23 | m_SyncedLayerAffectsTiming: 0 24 | m_Controller: {fileID: 9100000} 25 | --- !u!1107 &7827732604985201549 26 | AnimatorStateMachine: 27 | serializedVersion: 6 28 | m_ObjectHideFlags: 1 29 | m_CorrespondingSourceObject: {fileID: 0} 30 | m_PrefabInstance: {fileID: 0} 31 | m_PrefabAsset: {fileID: 0} 32 | m_Name: Base Layer 33 | m_ChildStates: [] 34 | m_ChildStateMachines: [] 35 | m_AnyStateTransitions: [] 36 | m_EntryTransitions: [] 37 | m_StateMachineTransitions: {} 38 | m_StateMachineBehaviours: [] 39 | m_AnyStatePosition: {x: 50, y: 20, z: 0} 40 | m_EntryPosition: {x: 50, y: 120, z: 0} 41 | m_ExitPosition: {x: 800, y: 120, z: 0} 42 | m_ParentStateMachinePosition: {x: 800, y: 20, z: 0} 43 | m_DefaultState: {fileID: 0} 44 | -------------------------------------------------------------------------------- /Scripts/GameData/Item_UMA.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | using UnityEngine.Serialization; 5 | using UMA; 6 | 7 | namespace MultiplayerARPG 8 | { 9 | public partial class Item 10 | { 11 | [Header("UMA Configs")] 12 | [FormerlySerializedAs("umaRaceReceipeSlots")] 13 | public UmaRaceRecipeSlots[] umaRaceRecipeSlots; 14 | 15 | private Dictionary cacheUmaRecipeSlot; 16 | public Dictionary UmaRecipeSlot 17 | { 18 | get 19 | { 20 | if (cacheUmaRecipeSlot == null) 21 | { 22 | cacheUmaRecipeSlot = new Dictionary(); 23 | foreach (UmaRaceRecipeSlots umaRaceRecipeSlot in umaRaceRecipeSlots) 24 | { 25 | if (umaRaceRecipeSlot.raceData == null || string.IsNullOrEmpty(umaRaceRecipeSlot.raceData.raceName)) 26 | continue; 27 | cacheUmaRecipeSlot[umaRaceRecipeSlot.raceData.raceName] = umaRaceRecipeSlot.recipes; 28 | } 29 | } 30 | return cacheUmaRecipeSlot; 31 | } 32 | } 33 | } 34 | 35 | [System.Serializable] 36 | public struct UmaRaceRecipeSlots 37 | { 38 | public RaceData raceData; 39 | public UMATextRecipe[] recipes; 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /Scripts/BasePlayerCharacterEntity_UMA.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | using LiteNetLib; 5 | using LiteNetLibManager; 6 | 7 | namespace MultiplayerARPG 8 | { 9 | public partial class BasePlayerCharacterEntity 10 | { 11 | public UmaAvatarData UmaAvatarData 12 | { 13 | get { return umaAvatarData.Value; } 14 | set { umaAvatarData.Value = value; } 15 | } 16 | 17 | [SerializeField] 18 | protected SyncFieldUmaAvatarData umaAvatarData = new SyncFieldUmaAvatarData(); 19 | 20 | [DevExtMethods("Awake")] 21 | public void Awake_UMA() 22 | { 23 | onSetupNetElements += OnSetupNetElements_UMA; 24 | } 25 | 26 | public void OnSetupNetElements_UMA() 27 | { 28 | umaAvatarData.deliveryMethod = DeliveryMethod.ReliableOrdered; 29 | umaAvatarData.syncMode = LiteNetLibSyncField.SyncMode.ServerToClients; 30 | umaAvatarData.onChange += OnUmaAvatarDataChange; 31 | } 32 | 33 | [DevExtMethods("OnDestroy")] 34 | public void OnDestroy_UMA() 35 | { 36 | umaAvatarData.onChange -= OnUmaAvatarDataChange; 37 | onSetupNetElements -= OnSetupNetElements_UMA; 38 | } 39 | 40 | protected void OnUmaAvatarDataChange(bool isInit, UmaAvatarData avatarData) 41 | { 42 | if (CharacterModel is ICharacterModelUma characterModelUma) 43 | characterModelUma.ApplyUmaAvatar(avatarData); 44 | } 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # UnityMultiplayerARPG_UMA 2 | UMA addon for MMORPG KIT 3 | 4 | ![](ScreenShots/001.png) 5 | 6 | ![](ScreenShots/002.png) 7 | 8 | ![](ScreenShots/003.png) 9 | 10 | ## Getting Started 11 | 12 | Import UMA package from https://github.com/umasteeringgroup/UMA/releases 13 | 14 | Import addon package from https://github.com/insthync/UnityMultiplayerARPG_UMA/releases 15 | 16 | Add `00Init_UMA` and `01Home_UMA` to `Scenes In Build` 17 | 18 | ![](ScreenShots/004.png) 19 | 20 | ## UMA Avatar Database 21 | 22 | This is database for Races / Genders / Customizable Wardrobe Slots / Customizable Colors, These data will be use in create character scene 23 | 24 | You can create this by create menu 25 | 26 | ![](ScreenShots/005.png) 27 | 28 | ![](ScreenShots/006.png) 29 | 30 | Each entry you can set race name, from image above there is only "Human". 31 | 32 | Then you can set `Genders` from image above there are "Male" and "Female" you have to set `Race Data`, you can learn about `Race Data` from http://umadocs.secretanorak.com/doku.php?id=knowledgebase:race, it also can set `Customizable Slots` to allow player to customize some wardrobe slots, from image above there are "Hair" and "Face", so player will able to customize character hair and face in create character scene, you can set wardrobe slots in race data 33 | 34 | You can set `Color Tables` it is list of `Shared Color Table` which used as choice of color to let player to select when create character 35 | 36 | ## Equipment Item 37 | 38 | For clothes / armor equipments you can set data at `Uma Race Receipe Slots` each entry you can set `Race Data` which will matching with character avatar to apply `Receipes` 39 | 40 | For weapon you have to set `Equipment Models` which its `Equip Socket` is avatar bone name 41 | 42 | ## MMO - MySQL Database 43 | 44 | Import `main.sql` from `SQLs` folder to your database -------------------------------------------------------------------------------- /Scripts/UI/UICharacterListUMA.cs: -------------------------------------------------------------------------------- 1 | namespace MultiplayerARPG 2 | { 3 | public class UICharacterListUMA : UICharacterList 4 | { 5 | public ICharacterModelUma UmaModel { get; protected set; } 6 | 7 | protected override void OnSelectCharacter(IPlayerCharacterData playerCharacterData) 8 | { 9 | if (buttonStart) 10 | buttonStart.gameObject.SetActive(true); 11 | if (buttonDelete) 12 | buttonDelete.gameObject.SetActive(true); 13 | characterModelContainer.SetChildrenActive(false); 14 | // Load selected character, set selected player character data and also validate its data 15 | _playerCharacterDataById.TryGetValue(playerCharacterData.Id, out _selectedPlayerCharacterData); 16 | // Validate map data 17 | if (!GameInstance.Singleton.GetGameMapIds().Contains(SelectedPlayerCharacterData.CurrentMapName)) 18 | { 19 | PlayerCharacter database = SelectedPlayerCharacterData.GetDatabase() as PlayerCharacter; 20 | SelectedPlayerCharacterData.CurrentMapName = database.StartMap.Id; 21 | SelectedPlayerCharacterData.CurrentPosition = database.StartPosition; 22 | } 23 | // Set selected character to network manager 24 | (BaseGameNetworkManager.Singleton as LanRpgNetworkManager).selectedCharacter = SelectedPlayerCharacterData; 25 | // Show selected character model 26 | _characterModelById.TryGetValue(playerCharacterData.Id, out _selectedModel); 27 | if (SelectedModel != null && SelectedModel is ICharacterModelUma) 28 | { 29 | // Setup Uma model and applies options 30 | ICharacterModelUma characterModelUMA = SelectedModel as ICharacterModelUma; 31 | UmaModel = characterModelUMA; 32 | SelectedModel.gameObject.SetActive(true); 33 | UmaModel.ApplyUmaAvatar(SelectedPlayerCharacterData.UmaAvatarData); 34 | } 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /Scripts/UI/UIUmaDnaSlider.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using UnityEngine; 5 | using UnityEngine.UI; 6 | using UMA; 7 | using UMA.CharacterSystem; 8 | 9 | namespace MultiplayerARPG 10 | { 11 | public class UIUmaDnaSlider : MonoBehaviour 12 | { 13 | public TextWrapper textTitle; 14 | public Slider slider; 15 | private UICharacterCreateUMA ui; 16 | private byte slotIndex; 17 | private string dnaName; 18 | public void Setup(UICharacterCreateUMA ui, byte slotIndex, DnaSetter dnaSetter) 19 | { 20 | this.ui = ui; 21 | this.slotIndex = slotIndex; 22 | dnaName = dnaSetter.Name; 23 | if (textTitle != null) 24 | { 25 | string displayDnaName = dnaName; 26 | StringBuilder sb = new StringBuilder(); 27 | for (int i = 0; i < displayDnaName.Length; i++) 28 | { 29 | char c = displayDnaName[i]; 30 | if (i > 0 && char.IsUpper(c)) 31 | { 32 | sb.Append(' '); 33 | } 34 | if (i == 0) 35 | c = char.ToUpper(c); 36 | sb.Append(c); 37 | } 38 | textTitle.text = sb.ToString(); 39 | } 40 | 41 | if (slider != null) 42 | { 43 | slider.onValueChanged.RemoveListener(OnSliderValueChanged); 44 | slider.minValue = 0f; 45 | slider.maxValue = 1f; 46 | slider.value = 0.5f; 47 | OnSliderValueChanged(0.5f); 48 | slider.onValueChanged.AddListener(OnSliderValueChanged); 49 | } 50 | } 51 | 52 | private void OnSliderValueChanged(float value) 53 | { 54 | ui.SetDna(slotIndex, value); 55 | Dictionary DNA = ui.UmaModel.CacheUmaAvatar.GetDNA(); 56 | if (DNA.ContainsKey(dnaName)) 57 | { 58 | DNA[dnaName].Set(value); 59 | } 60 | ui.UmaModel.CacheUmaAvatar.ForceUpdate(true, false, false); 61 | } 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /Scripts/UI/UIUmaColorDropdown.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | using UnityEngine.UI; 5 | using UMA; 6 | 7 | namespace MultiplayerARPG 8 | { 9 | public class UIUmaColorDropdown : MonoBehaviour 10 | { 11 | private ToggleGroup cacheToggleGroup; 12 | public ToggleGroup CacheToggleGroup 13 | { 14 | get 15 | { 16 | if (cacheToggleGroup == null) 17 | cacheToggleGroup = gameObject.AddComponent(); 18 | return cacheToggleGroup; 19 | } 20 | } 21 | public TextWrapper textTitle; 22 | public Sprite dropdownSprite; 23 | public DropdownWithColor dropdown; 24 | private UICharacterCreateUMA ui; 25 | private byte slotIndex; 26 | public void Setup(UICharacterCreateUMA ui, byte slotIndex) 27 | { 28 | this.ui = ui; 29 | this.slotIndex = slotIndex; 30 | 31 | SharedColorTable colorTable = GameInstance.Singleton.UmaRaces[ui.SelectedRaceIndex].colorTables[slotIndex]; 32 | 33 | if (textTitle != null) 34 | textTitle.text = colorTable.sharedColorName; 35 | 36 | if (dropdown != null) 37 | { 38 | List dropdownOptions = new List(); 39 | OverlayColorData[] colors = colorTable.colors; 40 | for (int i = 0; i < colors.Length; ++i) 41 | { 42 | dropdownOptions.Add(new DropdownWithColor.OptionData() 43 | { 44 | image = dropdownSprite, 45 | color = colors[i].color, 46 | }); 47 | } 48 | dropdown.onValueChanged.RemoveListener(OnDropdownValueChanged); 49 | dropdown.options = dropdownOptions; 50 | OnDropdownValueChanged(0); 51 | dropdown.onValueChanged.AddListener(OnDropdownValueChanged); 52 | } 53 | } 54 | 55 | private void OnDropdownValueChanged(int selectedIndex) 56 | { 57 | ui.SetColor(slotIndex, (byte)selectedIndex); 58 | } 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /ScreenShots/001.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c010db006fe5d2e40a5c18aad267c5b9 3 | TextureImporter: 4 | fileIDToRecycleName: {} 5 | externalObjects: {} 6 | serializedVersion: 7 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 1 10 | sRGBTexture: 1 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | streamingMipmaps: 0 25 | streamingMipmapsPriority: 0 26 | grayScaleToAlpha: 0 27 | generateCubemap: 6 28 | cubemapConvolution: 0 29 | seamlessCubemap: 0 30 | textureFormat: 1 31 | maxTextureSize: 2048 32 | textureSettings: 33 | serializedVersion: 2 34 | filterMode: -1 35 | aniso: -1 36 | mipBias: -100 37 | wrapU: -1 38 | wrapV: -1 39 | wrapW: -1 40 | nPOTScale: 1 41 | lightmap: 0 42 | compressionQuality: 50 43 | spriteMode: 0 44 | spriteExtrude: 1 45 | spriteMeshType: 1 46 | alignment: 0 47 | spritePivot: {x: 0.5, y: 0.5} 48 | spritePixelsToUnits: 100 49 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 50 | spriteGenerateFallbackPhysicsShape: 1 51 | alphaUsage: 1 52 | alphaIsTransparency: 0 53 | spriteTessellationDetail: -1 54 | textureType: 0 55 | textureShape: 1 56 | singleChannelComponent: 0 57 | maxTextureSizeSet: 0 58 | compressionQualitySet: 0 59 | textureFormatSet: 0 60 | platformSettings: 61 | - serializedVersion: 2 62 | buildTarget: DefaultTexturePlatform 63 | maxTextureSize: 2048 64 | resizeAlgorithm: 0 65 | textureFormat: -1 66 | textureCompression: 1 67 | compressionQuality: 50 68 | crunchedCompression: 0 69 | allowsAlphaSplitting: 0 70 | overridden: 0 71 | androidETC2FallbackOverride: 0 72 | spriteSheet: 73 | serializedVersion: 2 74 | sprites: [] 75 | outline: [] 76 | physicsShape: [] 77 | bones: [] 78 | spriteID: 79 | vertices: [] 80 | indices: 81 | edges: [] 82 | weights: [] 83 | spritePackingTag: 84 | pSDRemoveMatte: 0 85 | pSDShowRemoveMatteOption: 0 86 | userData: 87 | assetBundleName: 88 | assetBundleVariant: 89 | -------------------------------------------------------------------------------- /ScreenShots/002.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c5af5a6d3411ef4438a7409e3ad69fee 3 | TextureImporter: 4 | fileIDToRecycleName: {} 5 | externalObjects: {} 6 | serializedVersion: 7 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 1 10 | sRGBTexture: 1 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | streamingMipmaps: 0 25 | streamingMipmapsPriority: 0 26 | grayScaleToAlpha: 0 27 | generateCubemap: 6 28 | cubemapConvolution: 0 29 | seamlessCubemap: 0 30 | textureFormat: 1 31 | maxTextureSize: 2048 32 | textureSettings: 33 | serializedVersion: 2 34 | filterMode: -1 35 | aniso: -1 36 | mipBias: -100 37 | wrapU: -1 38 | wrapV: -1 39 | wrapW: -1 40 | nPOTScale: 1 41 | lightmap: 0 42 | compressionQuality: 50 43 | spriteMode: 0 44 | spriteExtrude: 1 45 | spriteMeshType: 1 46 | alignment: 0 47 | spritePivot: {x: 0.5, y: 0.5} 48 | spritePixelsToUnits: 100 49 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 50 | spriteGenerateFallbackPhysicsShape: 1 51 | alphaUsage: 1 52 | alphaIsTransparency: 0 53 | spriteTessellationDetail: -1 54 | textureType: 0 55 | textureShape: 1 56 | singleChannelComponent: 0 57 | maxTextureSizeSet: 0 58 | compressionQualitySet: 0 59 | textureFormatSet: 0 60 | platformSettings: 61 | - serializedVersion: 2 62 | buildTarget: DefaultTexturePlatform 63 | maxTextureSize: 2048 64 | resizeAlgorithm: 0 65 | textureFormat: -1 66 | textureCompression: 1 67 | compressionQuality: 50 68 | crunchedCompression: 0 69 | allowsAlphaSplitting: 0 70 | overridden: 0 71 | androidETC2FallbackOverride: 0 72 | spriteSheet: 73 | serializedVersion: 2 74 | sprites: [] 75 | outline: [] 76 | physicsShape: [] 77 | bones: [] 78 | spriteID: 79 | vertices: [] 80 | indices: 81 | edges: [] 82 | weights: [] 83 | spritePackingTag: 84 | pSDRemoveMatte: 0 85 | pSDShowRemoveMatteOption: 0 86 | userData: 87 | assetBundleName: 88 | assetBundleVariant: 89 | -------------------------------------------------------------------------------- /ScreenShots/003.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9549533d8c355cd448a8c54d329a9eeb 3 | TextureImporter: 4 | fileIDToRecycleName: {} 5 | externalObjects: {} 6 | serializedVersion: 7 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 1 10 | sRGBTexture: 1 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | streamingMipmaps: 0 25 | streamingMipmapsPriority: 0 26 | grayScaleToAlpha: 0 27 | generateCubemap: 6 28 | cubemapConvolution: 0 29 | seamlessCubemap: 0 30 | textureFormat: 1 31 | maxTextureSize: 2048 32 | textureSettings: 33 | serializedVersion: 2 34 | filterMode: -1 35 | aniso: -1 36 | mipBias: -100 37 | wrapU: -1 38 | wrapV: -1 39 | wrapW: -1 40 | nPOTScale: 1 41 | lightmap: 0 42 | compressionQuality: 50 43 | spriteMode: 0 44 | spriteExtrude: 1 45 | spriteMeshType: 1 46 | alignment: 0 47 | spritePivot: {x: 0.5, y: 0.5} 48 | spritePixelsToUnits: 100 49 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 50 | spriteGenerateFallbackPhysicsShape: 1 51 | alphaUsage: 1 52 | alphaIsTransparency: 0 53 | spriteTessellationDetail: -1 54 | textureType: 0 55 | textureShape: 1 56 | singleChannelComponent: 0 57 | maxTextureSizeSet: 0 58 | compressionQualitySet: 0 59 | textureFormatSet: 0 60 | platformSettings: 61 | - serializedVersion: 2 62 | buildTarget: DefaultTexturePlatform 63 | maxTextureSize: 2048 64 | resizeAlgorithm: 0 65 | textureFormat: -1 66 | textureCompression: 1 67 | compressionQuality: 50 68 | crunchedCompression: 0 69 | allowsAlphaSplitting: 0 70 | overridden: 0 71 | androidETC2FallbackOverride: 0 72 | spriteSheet: 73 | serializedVersion: 2 74 | sprites: [] 75 | outline: [] 76 | physicsShape: [] 77 | bones: [] 78 | spriteID: 79 | vertices: [] 80 | indices: 81 | edges: [] 82 | weights: [] 83 | spritePackingTag: 84 | pSDRemoveMatte: 0 85 | pSDShowRemoveMatteOption: 0 86 | userData: 87 | assetBundleName: 88 | assetBundleVariant: 89 | -------------------------------------------------------------------------------- /ScreenShots/004.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 29f4715a3a7296a429ff71faa8ee8c08 3 | TextureImporter: 4 | fileIDToRecycleName: {} 5 | externalObjects: {} 6 | serializedVersion: 7 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 1 10 | sRGBTexture: 1 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | streamingMipmaps: 0 25 | streamingMipmapsPriority: 0 26 | grayScaleToAlpha: 0 27 | generateCubemap: 6 28 | cubemapConvolution: 0 29 | seamlessCubemap: 0 30 | textureFormat: 1 31 | maxTextureSize: 2048 32 | textureSettings: 33 | serializedVersion: 2 34 | filterMode: -1 35 | aniso: -1 36 | mipBias: -100 37 | wrapU: -1 38 | wrapV: -1 39 | wrapW: -1 40 | nPOTScale: 1 41 | lightmap: 0 42 | compressionQuality: 50 43 | spriteMode: 0 44 | spriteExtrude: 1 45 | spriteMeshType: 1 46 | alignment: 0 47 | spritePivot: {x: 0.5, y: 0.5} 48 | spritePixelsToUnits: 100 49 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 50 | spriteGenerateFallbackPhysicsShape: 1 51 | alphaUsage: 1 52 | alphaIsTransparency: 0 53 | spriteTessellationDetail: -1 54 | textureType: 0 55 | textureShape: 1 56 | singleChannelComponent: 0 57 | maxTextureSizeSet: 0 58 | compressionQualitySet: 0 59 | textureFormatSet: 0 60 | platformSettings: 61 | - serializedVersion: 2 62 | buildTarget: DefaultTexturePlatform 63 | maxTextureSize: 2048 64 | resizeAlgorithm: 0 65 | textureFormat: -1 66 | textureCompression: 1 67 | compressionQuality: 50 68 | crunchedCompression: 0 69 | allowsAlphaSplitting: 0 70 | overridden: 0 71 | androidETC2FallbackOverride: 0 72 | spriteSheet: 73 | serializedVersion: 2 74 | sprites: [] 75 | outline: [] 76 | physicsShape: [] 77 | bones: [] 78 | spriteID: 79 | vertices: [] 80 | indices: 81 | edges: [] 82 | weights: [] 83 | spritePackingTag: 84 | pSDRemoveMatte: 0 85 | pSDShowRemoveMatteOption: 0 86 | userData: 87 | assetBundleName: 88 | assetBundleVariant: 89 | -------------------------------------------------------------------------------- /ScreenShots/005.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 847885add785f304b81c4ba53dfa117e 3 | TextureImporter: 4 | fileIDToRecycleName: {} 5 | externalObjects: {} 6 | serializedVersion: 7 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 1 10 | sRGBTexture: 1 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | streamingMipmaps: 0 25 | streamingMipmapsPriority: 0 26 | grayScaleToAlpha: 0 27 | generateCubemap: 6 28 | cubemapConvolution: 0 29 | seamlessCubemap: 0 30 | textureFormat: 1 31 | maxTextureSize: 2048 32 | textureSettings: 33 | serializedVersion: 2 34 | filterMode: -1 35 | aniso: -1 36 | mipBias: -100 37 | wrapU: -1 38 | wrapV: -1 39 | wrapW: -1 40 | nPOTScale: 1 41 | lightmap: 0 42 | compressionQuality: 50 43 | spriteMode: 0 44 | spriteExtrude: 1 45 | spriteMeshType: 1 46 | alignment: 0 47 | spritePivot: {x: 0.5, y: 0.5} 48 | spritePixelsToUnits: 100 49 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 50 | spriteGenerateFallbackPhysicsShape: 1 51 | alphaUsage: 1 52 | alphaIsTransparency: 0 53 | spriteTessellationDetail: -1 54 | textureType: 0 55 | textureShape: 1 56 | singleChannelComponent: 0 57 | maxTextureSizeSet: 0 58 | compressionQualitySet: 0 59 | textureFormatSet: 0 60 | platformSettings: 61 | - serializedVersion: 2 62 | buildTarget: DefaultTexturePlatform 63 | maxTextureSize: 2048 64 | resizeAlgorithm: 0 65 | textureFormat: -1 66 | textureCompression: 1 67 | compressionQuality: 50 68 | crunchedCompression: 0 69 | allowsAlphaSplitting: 0 70 | overridden: 0 71 | androidETC2FallbackOverride: 0 72 | spriteSheet: 73 | serializedVersion: 2 74 | sprites: [] 75 | outline: [] 76 | physicsShape: [] 77 | bones: [] 78 | spriteID: 79 | vertices: [] 80 | indices: 81 | edges: [] 82 | weights: [] 83 | spritePackingTag: 84 | pSDRemoveMatte: 0 85 | pSDShowRemoveMatteOption: 0 86 | userData: 87 | assetBundleName: 88 | assetBundleVariant: 89 | -------------------------------------------------------------------------------- /ScreenShots/006.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8b6c60aadab047a448c6095fd6a10272 3 | TextureImporter: 4 | fileIDToRecycleName: {} 5 | externalObjects: {} 6 | serializedVersion: 7 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 1 10 | sRGBTexture: 1 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | streamingMipmaps: 0 25 | streamingMipmapsPriority: 0 26 | grayScaleToAlpha: 0 27 | generateCubemap: 6 28 | cubemapConvolution: 0 29 | seamlessCubemap: 0 30 | textureFormat: 1 31 | maxTextureSize: 2048 32 | textureSettings: 33 | serializedVersion: 2 34 | filterMode: -1 35 | aniso: -1 36 | mipBias: -100 37 | wrapU: -1 38 | wrapV: -1 39 | wrapW: -1 40 | nPOTScale: 1 41 | lightmap: 0 42 | compressionQuality: 50 43 | spriteMode: 0 44 | spriteExtrude: 1 45 | spriteMeshType: 1 46 | alignment: 0 47 | spritePivot: {x: 0.5, y: 0.5} 48 | spritePixelsToUnits: 100 49 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 50 | spriteGenerateFallbackPhysicsShape: 1 51 | alphaUsage: 1 52 | alphaIsTransparency: 0 53 | spriteTessellationDetail: -1 54 | textureType: 0 55 | textureShape: 1 56 | singleChannelComponent: 0 57 | maxTextureSizeSet: 0 58 | compressionQualitySet: 0 59 | textureFormatSet: 0 60 | platformSettings: 61 | - serializedVersion: 2 62 | buildTarget: DefaultTexturePlatform 63 | maxTextureSize: 2048 64 | resizeAlgorithm: 0 65 | textureFormat: -1 66 | textureCompression: 1 67 | compressionQuality: 50 68 | crunchedCompression: 0 69 | allowsAlphaSplitting: 0 70 | overridden: 0 71 | androidETC2FallbackOverride: 0 72 | spriteSheet: 73 | serializedVersion: 2 74 | sprites: [] 75 | outline: [] 76 | physicsShape: [] 77 | bones: [] 78 | spriteID: 79 | vertices: [] 80 | indices: 81 | edges: [] 82 | weights: [] 83 | spritePackingTag: 84 | pSDRemoveMatte: 0 85 | pSDShowRemoveMatteOption: 0 86 | userData: 87 | assetBundleName: 88 | assetBundleVariant: 89 | -------------------------------------------------------------------------------- /Prefabs/WeaponModels/BaseballBat.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_CorrespondingSourceObject: {fileID: 0} 8 | m_PrefabInternal: {fileID: 0} 9 | m_Name: BaseballBat 10 | m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} 11 | m_ShaderKeywords: 12 | m_LightmapFlags: 4 13 | m_EnableInstancingVariants: 0 14 | m_DoubleSidedGI: 0 15 | m_CustomRenderQueue: -1 16 | stringTagMap: {} 17 | disabledShaderPasses: [] 18 | m_SavedProperties: 19 | serializedVersion: 3 20 | m_TexEnvs: 21 | - _BumpMap: 22 | m_Texture: {fileID: 0} 23 | m_Scale: {x: 1, y: 1} 24 | m_Offset: {x: 0, y: 0} 25 | - _DetailAlbedoMap: 26 | m_Texture: {fileID: 0} 27 | m_Scale: {x: 1, y: 1} 28 | m_Offset: {x: 0, y: 0} 29 | - _DetailMask: 30 | m_Texture: {fileID: 0} 31 | m_Scale: {x: 1, y: 1} 32 | m_Offset: {x: 0, y: 0} 33 | - _DetailNormalMap: 34 | m_Texture: {fileID: 0} 35 | m_Scale: {x: 1, y: 1} 36 | m_Offset: {x: 0, y: 0} 37 | - _EmissionMap: 38 | m_Texture: {fileID: 0} 39 | m_Scale: {x: 1, y: 1} 40 | m_Offset: {x: 0, y: 0} 41 | - _MainTex: 42 | m_Texture: {fileID: 0} 43 | m_Scale: {x: 1, y: 1} 44 | m_Offset: {x: 0, y: 0} 45 | - _MetallicGlossMap: 46 | m_Texture: {fileID: 0} 47 | m_Scale: {x: 1, y: 1} 48 | m_Offset: {x: 0, y: 0} 49 | - _OcclusionMap: 50 | m_Texture: {fileID: 0} 51 | m_Scale: {x: 1, y: 1} 52 | m_Offset: {x: 0, y: 0} 53 | - _ParallaxMap: 54 | m_Texture: {fileID: 0} 55 | m_Scale: {x: 1, y: 1} 56 | m_Offset: {x: 0, y: 0} 57 | m_Floats: 58 | - _BumpScale: 1 59 | - _Cutoff: 0.5 60 | - _DetailNormalMapScale: 1 61 | - _DstBlend: 0 62 | - _GlossMapScale: 1 63 | - _Glossiness: 0.5 64 | - _GlossyReflections: 1 65 | - _Metallic: 0 66 | - _Mode: 0 67 | - _OcclusionStrength: 1 68 | - _Parallax: 0.02 69 | - _SmoothnessTextureChannel: 0 70 | - _SpecularHighlights: 1 71 | - _SrcBlend: 1 72 | - _UVSec: 0 73 | - _ZWrite: 1 74 | m_Colors: 75 | - _Color: {r: 0.78431374, g: 0.29803923, b: 0.047058824, a: 1} 76 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 77 | -------------------------------------------------------------------------------- /GameData/Player_UMA.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &11400000 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInternal: {fileID: 0} 8 | m_GameObject: {fileID: 0} 9 | m_Enabled: 1 10 | m_EditorHideFlags: 0 11 | m_Script: {fileID: 11500000, guid: 4b67f350c4283834f81cded3a656ff5e, type: 3} 12 | m_Name: Player_UMA 13 | m_EditorClassIdentifier: 14 | title: Player 15 | description: This is demo character with UMA system 16 | icon: {fileID: 21300000, guid: 971aaff4fd1b6064ea1291822fc533dd, type: 3} 17 | stats: 18 | baseStats: 19 | hp: 0 20 | mp: 0 21 | armor: 0 22 | accuracy: 0 23 | evasion: 0 24 | criRate: 0.25 25 | criDmgRate: 1.5 26 | blockRate: 0 27 | blockDmgRate: 0 28 | moveSpeed: 5 29 | atkSpeed: 1 30 | weightLimit: 100 31 | stamina: 100 32 | food: 100 33 | water: 100 34 | testStats: 0 35 | statsIncreaseEachLevel: 36 | hp: 0 37 | mp: 0 38 | armor: 0 39 | accuracy: 0 40 | evasion: 0 41 | criRate: 0 42 | criDmgRate: 0 43 | blockRate: 0 44 | blockDmgRate: 0 45 | moveSpeed: 0 46 | atkSpeed: 0 47 | weightLimit: 0 48 | stamina: 0 49 | food: 0 50 | water: 0 51 | testStats: 0 52 | attributes: 53 | - attribute: {fileID: 11400000, guid: 0e223af20738b88419c22a1a0401a21b, type: 2} 54 | amount: 55 | baseAmount: 30 56 | amountIncreaseEachLevel: 0 57 | - attribute: {fileID: 11400000, guid: cf50e3647cfae0e44b683163d2171277, type: 2} 58 | amount: 59 | baseAmount: 25 60 | amountIncreaseEachLevel: 0 61 | - attribute: {fileID: 11400000, guid: c7e3824f99bb4bc43b9566210f8d02f5, type: 2} 62 | amount: 63 | baseAmount: 20 64 | amountIncreaseEachLevel: 0 65 | - attribute: {fileID: 11400000, guid: cd3d2fb4f3c67fd4dbba3bd0ccd0095e, type: 2} 66 | amount: 67 | baseAmount: 15 68 | amountIncreaseEachLevel: 0 69 | resistances: [] 70 | skillLevels: [] 71 | rightHandEquipItem: {fileID: 11400000, guid: 91eec32179dd9e84bad4b728ddde1e02, type: 2} 72 | leftHandEquipItem: {fileID: 0} 73 | armorItems: 74 | - {fileID: 11400000, guid: 87b4c98d2d09c4a44a53c633310c8b96, type: 2} 75 | - {fileID: 11400000, guid: 691223c0d0d1c9342aa0df9855949779, type: 2} 76 | startMap: {fileID: 0} 77 | -------------------------------------------------------------------------------- /Scripts/UI/UIUmaCustomizeSlotDropdown.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | using UMA; 5 | 6 | namespace MultiplayerARPG 7 | { 8 | public class UIUmaCustomizeSlotDropdown : MonoBehaviour 9 | { 10 | public TextWrapper textTitle; 11 | public DropdownWrapper dropdown; 12 | private UICharacterCreateUMA ui; 13 | private byte slotIndex; 14 | public virtual void Setup(UICharacterCreateUMA ui, byte slotIndex) 15 | { 16 | this.ui = ui; 17 | this.slotIndex = slotIndex; 18 | 19 | UmaCustomizableSlot slot = GameInstance.Singleton.UmaRaces[ui.SelectedRaceIndex].genders[ui.SelectedGenderIndex].customizableSlots[slotIndex]; 20 | 21 | // Set Title 22 | if (textTitle != null) 23 | textTitle.text = slot.title; 24 | 25 | // Set Dropdown options 26 | if (dropdown != null) 27 | { 28 | Dictionary> recipes = ui.UmaModel.CacheUmaAvatar.AvailableRecipes; 29 | List usingRecipes; 30 | List dropdownOptions = new List(); 31 | if (recipes.TryGetValue(slot.name, out usingRecipes)) 32 | { 33 | foreach (UMATextRecipe usingRecipe in usingRecipes) 34 | { 35 | string name; 36 | if (string.IsNullOrEmpty(usingRecipe.DisplayValue)) 37 | name = usingRecipe.name; 38 | else 39 | name = usingRecipe.DisplayValue; 40 | 41 | dropdownOptions.Add(new DropdownWrapper.OptionData() 42 | { 43 | text = name, 44 | }); 45 | } 46 | } 47 | dropdown.onValueChanged.RemoveListener(OnDropdownValueChanged); 48 | dropdown.options = dropdownOptions; 49 | OnDropdownValueChanged(0); 50 | dropdown.onValueChanged.AddListener(OnDropdownValueChanged); 51 | } 52 | } 53 | 54 | private void OnDropdownValueChanged(int selectedIndex) 55 | { 56 | ui.SetSlot(slotIndex, (byte)selectedIndex); 57 | } 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /Scripts/GameData/UmaAvatarDatabase.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | using UMA; 5 | 6 | namespace MultiplayerARPG 7 | { 8 | [CreateAssetMenu(fileName = "UmaAvatarDatabase", menuName = "Create UMA Integration/UmaAvatarDatabase", order = -4999)] 9 | public class UmaAvatarDatabase : ScriptableObject 10 | { 11 | // Race choice 12 | public UmaRace[] umaRaces = new UmaRace[] 13 | { 14 | new UmaRace() 15 | { 16 | name = "Human", 17 | // Available gender 18 | genders = new UmaRaceGender[] 19 | { 20 | new UmaRaceGender() 21 | { 22 | name = "Male", 23 | customizableSlots = new UmaCustomizableSlot[] 24 | { 25 | new UmaCustomizableSlot() { name = "Hair", title = "Hair" }, 26 | new UmaCustomizableSlot() { name = "Eyebrows", title = "Eyebrows" }, 27 | new UmaCustomizableSlot() { name = "Eyes", title = "Eyes" }, 28 | new UmaCustomizableSlot() { name = "Face", title = "Face" }, 29 | new UmaCustomizableSlot() { name = "Ears", title = "Ears" }, 30 | } 31 | }, 32 | new UmaRaceGender() 33 | { 34 | name = "Female", 35 | customizableSlots = new UmaCustomizableSlot[] 36 | { 37 | new UmaCustomizableSlot() { name = "Hair", title = "Hair" }, 38 | new UmaCustomizableSlot() { name = "Eyebrows", title = "Eyebrows" }, 39 | new UmaCustomizableSlot() { name = "Eyes", title = "Eyes" }, 40 | new UmaCustomizableSlot() { name = "Face", title = "Face" }, 41 | new UmaCustomizableSlot() { name = "Ears", title = "Ears" }, 42 | } 43 | }, 44 | }, 45 | } 46 | }; 47 | } 48 | 49 | [System.Serializable] 50 | public struct UmaRace 51 | { 52 | public string name; 53 | public UmaRaceGender[] genders; 54 | public SharedColorTable[] colorTables; 55 | } 56 | 57 | [System.Serializable] 58 | public struct UmaRaceGender 59 | { 60 | public string name; 61 | public RaceData raceData; 62 | public UmaCustomizableSlot[] customizableSlots; 63 | } 64 | 65 | [System.Serializable] 66 | public struct UmaCustomizableSlot 67 | { 68 | public string name; 69 | public string title; 70 | } 71 | } 72 | 73 | -------------------------------------------------------------------------------- /Prefabs/WeaponModels/BaseballBat.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1001 &100100000 4 | Prefab: 5 | m_ObjectHideFlags: 1 6 | serializedVersion: 2 7 | m_Modification: 8 | m_TransformParent: {fileID: 0} 9 | m_Modifications: [] 10 | m_RemovedComponents: [] 11 | m_SourcePrefab: {fileID: 0} 12 | m_RootGameObject: {fileID: 1856257694834870} 13 | m_IsPrefabAsset: 1 14 | --- !u!1 &1455852750618878 15 | GameObject: 16 | m_ObjectHideFlags: 0 17 | m_CorrespondingSourceObject: {fileID: 0} 18 | m_PrefabInternal: {fileID: 100100000} 19 | serializedVersion: 6 20 | m_Component: 21 | - component: {fileID: 4021906805179794} 22 | - component: {fileID: 33500816824685486} 23 | - component: {fileID: 23218935023447462} 24 | m_Layer: 0 25 | m_Name: BaseballBat 26 | m_TagString: Untagged 27 | m_Icon: {fileID: 0} 28 | m_NavMeshLayer: 0 29 | m_StaticEditorFlags: 0 30 | m_IsActive: 1 31 | --- !u!1 &1856257694834870 32 | GameObject: 33 | m_ObjectHideFlags: 0 34 | m_CorrespondingSourceObject: {fileID: 0} 35 | m_PrefabInternal: {fileID: 100100000} 36 | serializedVersion: 6 37 | m_Component: 38 | - component: {fileID: 4154547208603266} 39 | m_Layer: 0 40 | m_Name: BaseballBat 41 | m_TagString: Untagged 42 | m_Icon: {fileID: 0} 43 | m_NavMeshLayer: 0 44 | m_StaticEditorFlags: 0 45 | m_IsActive: 1 46 | --- !u!4 &4021906805179794 47 | Transform: 48 | m_ObjectHideFlags: 1 49 | m_CorrespondingSourceObject: {fileID: 0} 50 | m_PrefabInternal: {fileID: 100100000} 51 | m_GameObject: {fileID: 1455852750618878} 52 | m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} 53 | m_LocalPosition: {x: -0.1, y: 0.25, z: -0.03} 54 | m_LocalScale: {x: 0.02, y: 0.5, z: 0.02} 55 | m_Children: [] 56 | m_Father: {fileID: 4154547208603266} 57 | m_RootOrder: 0 58 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 59 | --- !u!4 &4154547208603266 60 | Transform: 61 | m_ObjectHideFlags: 1 62 | m_CorrespondingSourceObject: {fileID: 0} 63 | m_PrefabInternal: {fileID: 100100000} 64 | m_GameObject: {fileID: 1856257694834870} 65 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 66 | m_LocalPosition: {x: 0, y: 0, z: 0} 67 | m_LocalScale: {x: 1, y: 1, z: 1} 68 | m_Children: 69 | - {fileID: 4021906805179794} 70 | m_Father: {fileID: 0} 71 | m_RootOrder: 0 72 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 73 | --- !u!23 &23218935023447462 74 | MeshRenderer: 75 | m_ObjectHideFlags: 1 76 | m_CorrespondingSourceObject: {fileID: 0} 77 | m_PrefabInternal: {fileID: 100100000} 78 | m_GameObject: {fileID: 1455852750618878} 79 | m_Enabled: 1 80 | m_CastShadows: 1 81 | m_ReceiveShadows: 1 82 | m_DynamicOccludee: 1 83 | m_MotionVectors: 1 84 | m_LightProbeUsage: 1 85 | m_ReflectionProbeUsage: 1 86 | m_RenderingLayerMask: 4294967295 87 | m_Materials: 88 | - {fileID: 2100000, guid: 20d0cfc9b484fee4ab89dcd7e61638ed, type: 2} 89 | m_StaticBatchInfo: 90 | firstSubMesh: 0 91 | subMeshCount: 0 92 | m_StaticBatchRoot: {fileID: 0} 93 | m_ProbeAnchor: {fileID: 0} 94 | m_LightProbeVolumeOverride: {fileID: 0} 95 | m_ScaleInLightmap: 1 96 | m_PreserveUVs: 0 97 | m_IgnoreNormalsForChartDetection: 0 98 | m_ImportantGI: 0 99 | m_StitchLightmapSeams: 0 100 | m_SelectedEditorRenderState: 3 101 | m_MinimumChartSize: 4 102 | m_AutoUVMaxDistance: 0.5 103 | m_AutoUVMaxAngle: 89 104 | m_LightmapParameters: {fileID: 0} 105 | m_SortingLayerID: 0 106 | m_SortingLayer: 0 107 | m_SortingOrder: 0 108 | --- !u!33 &33500816824685486 109 | MeshFilter: 110 | m_ObjectHideFlags: 1 111 | m_CorrespondingSourceObject: {fileID: 0} 112 | m_PrefabInternal: {fileID: 100100000} 113 | m_GameObject: {fileID: 1455852750618878} 114 | m_Mesh: {fileID: 10208, guid: 0000000000000000e000000000000000, type: 0} 115 | -------------------------------------------------------------------------------- /Scripts/MMO/Database/MySQLDatabase_UMA.cs: -------------------------------------------------------------------------------- 1 | #if (UNITY_EDITOR || UNITY_SERVER) && UNITY_STANDALONE 2 | using System.Collections.Generic; 3 | using MySqlConnector; 4 | 5 | namespace MultiplayerARPG.MMO 6 | { 7 | public partial class MySQLDatabase 8 | { 9 | [DevExtMethods("CreateCharacter")] 10 | public async void CreateCharacter_UMA(MySqlConnection connection, MySqlTransaction transaction, string userId, IPlayerCharacterData characterData) 11 | { 12 | // Save uma data 13 | IList bytes = characterData.UmaAvatarData.GetBytes(); 14 | string saveData = string.Empty; 15 | for (int i = 0; i < bytes.Count; ++i) 16 | { 17 | if (i > 0) 18 | saveData += ","; 19 | saveData += bytes[i]; 20 | } 21 | await ExecuteNonQuery(connection, transaction, "INSERT INTO characterumasaves (id, data) VALUES (@id, @data)", 22 | new MySqlParameter("@id", characterData.Id), 23 | new MySqlParameter("@data", saveData)); 24 | } 25 | 26 | [DevExtMethods("ReadCharacter")] 27 | public async void ReadCharacter_UMA( 28 | PlayerCharacterData characterData, 29 | bool withEquipWeapons, 30 | bool withAttributes, 31 | bool withSkills, 32 | bool withSkillUsages, 33 | bool withBuffs, 34 | bool withEquipItems, 35 | bool withNonEquipItems, 36 | bool withSummons, 37 | bool withHotkeys, 38 | bool withQuests, 39 | bool withCurrencies, 40 | bool withServerCustomData, 41 | bool withPrivateCustomData, 42 | bool withPublicCustomData) 43 | { 44 | // Read uma data 45 | await ExecuteReader((reader) => 46 | { 47 | if (reader.Read()) 48 | { 49 | string data = reader.GetString(0); 50 | string[] splitedData = data.Split(','); 51 | List bytes = new List(); 52 | foreach (string entry in splitedData) 53 | { 54 | bytes.Add(byte.Parse(entry)); 55 | } 56 | UmaAvatarData umaAvatarData = new UmaAvatarData(); 57 | umaAvatarData.SetBytes(bytes); 58 | characterData.UmaAvatarData = umaAvatarData; 59 | } 60 | }, "SELECT data FROM characterumasaves WHERE id=@id", 61 | new MySqlParameter("@id", characterData.Id)); 62 | } 63 | 64 | [DevExtMethods("UpdateCharacter")] 65 | public async void UpdateCharacter_UMA(MySqlConnection connection, MySqlTransaction transaction, IPlayerCharacterData characterData) 66 | { 67 | // Save uma data 68 | IList bytes = characterData.UmaAvatarData.GetBytes(); 69 | string saveData = string.Empty; 70 | for (int i = 0; i < bytes.Count; ++i) 71 | { 72 | if (i > 0) 73 | saveData += ","; 74 | saveData += bytes[i]; 75 | } 76 | await ExecuteNonQuery(connection, transaction, "UPDATE characterumasaves SET data=@data WHERE id=@id", 77 | new MySqlParameter("@id", characterData.Id), 78 | new MySqlParameter("@data", saveData)); 79 | } 80 | 81 | [DevExtMethods("DeleteCharacter")] 82 | public async void DeleteCharacter_UMA(MySqlConnection connection, MySqlTransaction transaction, string userId, string id) 83 | { 84 | // Delete uma data 85 | await ExecuteNonQuery(connection, transaction, "DELETE FROM characterumasaves WHERE id=@id", 86 | new MySqlParameter("@id", id)); 87 | } 88 | } 89 | } 90 | #endif -------------------------------------------------------------------------------- /Scripts/MMO/Database/SQLiteDatabase_UMA.cs: -------------------------------------------------------------------------------- 1 | #if (UNITY_EDITOR || UNITY_SERVER) && UNITY_STANDALONE 2 | using Mono.Data.Sqlite; 3 | using System.Collections.Generic; 4 | 5 | namespace MultiplayerARPG.MMO 6 | { 7 | public partial class SQLiteDatabase 8 | { 9 | [DevExtMethods("Init")] 10 | public void Init_UMA() 11 | { 12 | // Prepare uma data 13 | ExecuteNonQuery(@"CREATE TABLE IF NOT EXISTS characterumasaves ( 14 | id TEXT NOT NULL PRIMARY KEY, 15 | data TEXT NOT NULL 16 | )"); 17 | } 18 | 19 | [DevExtMethods("CreateCharacter")] 20 | public void CreateCharacter_UMA(SqliteTransaction transaction, string userId, IPlayerCharacterData characterData) 21 | { 22 | // Save uma data 23 | IList bytes = characterData.UmaAvatarData.GetBytes(); 24 | string saveData = string.Empty; 25 | for (int i = 0; i < bytes.Count; ++i) 26 | { 27 | if (i > 0) 28 | saveData += ","; 29 | saveData += bytes[i]; 30 | } 31 | ExecuteNonQuery(transaction, "INSERT INTO characterumasaves (id, data) VALUES (@id, @data)", 32 | new SqliteParameter("@id", characterData.Id), 33 | new SqliteParameter("@data", saveData)); 34 | } 35 | 36 | [DevExtMethods("ReadCharacter")] 37 | public void ReadCharacter_UMA( 38 | PlayerCharacterData characterData, 39 | bool withEquipWeapons, 40 | bool withAttributes, 41 | bool withSkills, 42 | bool withSkillUsages, 43 | bool withBuffs, 44 | bool withEquipItems, 45 | bool withNonEquipItems, 46 | bool withSummons, 47 | bool withHotkeys, 48 | bool withQuests, 49 | bool withCurrencies, 50 | bool withServerCustomData, 51 | bool withPrivateCustomData, 52 | bool withPublicCustomData) 53 | { 54 | ExecuteReader((reader) => 55 | { 56 | if (reader.Read()) 57 | { 58 | string data = reader.GetString(0); 59 | string[] splitedData = data.Split(','); 60 | List bytes = new List(); 61 | foreach (string entry in splitedData) 62 | { 63 | bytes.Add(byte.Parse(entry)); 64 | } 65 | UmaAvatarData umaAvatarData = new UmaAvatarData(); 66 | umaAvatarData.SetBytes(bytes); 67 | characterData.UmaAvatarData = umaAvatarData; 68 | } 69 | }, "SELECT data FROM characterumasaves WHERE id=@id", 70 | new SqliteParameter("@id", characterData.Id)); 71 | } 72 | 73 | [DevExtMethods("UpdateCharacter")] 74 | public void UpdateCharacter_UMA(SqliteTransaction transaction, IPlayerCharacterData characterData) 75 | { 76 | // Save uma data 77 | IList bytes = characterData.UmaAvatarData.GetBytes(); 78 | string saveData = string.Empty; 79 | for (int i = 0; i < bytes.Count; ++i) 80 | { 81 | if (i > 0) 82 | saveData += ","; 83 | saveData += bytes[i]; 84 | } 85 | ExecuteNonQuery(transaction, "UPDATE characterumasaves SET data=@data WHERE id=@id", 86 | new SqliteParameter("@id", characterData.Id), 87 | new SqliteParameter("@data", saveData)); 88 | } 89 | 90 | [DevExtMethods("DeleteCharacter")] 91 | public void DeleteCharacter_UMA(SqliteTransaction transaction, string userId, string id) 92 | { 93 | // Delete uma data 94 | ExecuteNonQuery(transaction, "DELETE FROM characterumasaves WHERE id=@id", 95 | new SqliteParameter("@id", id)); 96 | } 97 | } 98 | } 99 | #endif -------------------------------------------------------------------------------- /GameData/Item/UMA_Shoes.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &11400000 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInternal: {fileID: 0} 8 | m_GameObject: {fileID: 0} 9 | m_Enabled: 1 10 | m_EditorHideFlags: 0 11 | m_Script: {fileID: 11500000, guid: 75d6d0cd4d7cf8c4786ee2be97f454fb, type: 3} 12 | m_Name: UMA_Shoes 13 | m_EditorClassIdentifier: 14 | title: 15 | titles: [] 16 | description: 17 | descriptions: [] 18 | icon: {fileID: 21300000, guid: 0f0bcf7c70b4ed140aef538979a7b5e7, type: 3} 19 | umaRaceReceipeSlots: 20 | - raceData: {fileID: 11400000, guid: 62688b7aa02fbc544916e522fcc239c7, type: 2} 21 | recipes: 22 | - {fileID: 11400000, guid: c6a22e687d55ee144965d37c94a9b11d, type: 2} 23 | - raceData: {fileID: 11400000, guid: f8fea6f0ee17b3f42a4ae6cfb627bab3, type: 2} 24 | recipes: 25 | - {fileID: 11400000, guid: 47ba7be232f89084485a40d74ef0d13c, type: 2} 26 | itemType: 1 27 | dropModel: {fileID: 0} 28 | sellPrice: 0 29 | weight: 0 30 | maxStack: 1 31 | itemRefineInfo: {fileID: 0} 32 | lockDuration: 0 33 | armorType: {fileID: 11400000, guid: 745bc973ccf3f5640af5285026a87d5d, type: 2} 34 | weaponType: {fileID: 0} 35 | moveSpeedRateWhileAttacking: 0 36 | damageAmount: 37 | damageElement: {fileID: 0} 38 | amount: 39 | baseAmount: 40 | min: 0 41 | max: 0 42 | amountIncreaseEachLevel: 43 | min: 0 44 | max: 0 45 | harvestDamageAmount: 46 | baseAmount: 47 | min: 0 48 | max: 0 49 | amountIncreaseEachLevel: 50 | min: 0 51 | max: 0 52 | equipmentModels: [] 53 | subEquipmentModels: [] 54 | requirement: 55 | character: {fileID: 0} 56 | level: 0 57 | attributeAmounts: [] 58 | increaseAttributes: [] 59 | increaseResistances: [] 60 | increaseDamages: [] 61 | increaseStats: 62 | baseStats: 63 | hp: 0 64 | mp: 0 65 | armor: 0 66 | accuracy: 0 67 | evasion: 0 68 | criRate: 0 69 | criDmgRate: 0 70 | blockRate: 0 71 | blockDmgRate: 0 72 | moveSpeed: 0 73 | atkSpeed: 0 74 | weightLimit: 0 75 | slotLimit: 0 76 | stamina: 0 77 | food: 0 78 | water: 0 79 | testStats: 0 80 | statsIncreaseEachLevel: 81 | hp: 0 82 | mp: 0 83 | armor: 0 84 | accuracy: 0 85 | evasion: 0 86 | criRate: 0 87 | criDmgRate: 0 88 | blockRate: 0 89 | blockDmgRate: 0 90 | moveSpeed: 0 91 | atkSpeed: 0 92 | weightLimit: 0 93 | slotLimit: 0 94 | stamina: 0 95 | food: 0 96 | water: 0 97 | testStats: 0 98 | equipmentSet: {fileID: 0} 99 | maxDurability: 0 100 | destroyIfBroken: 0 101 | buff: 102 | duration: 103 | baseAmount: 0 104 | amountIncreaseEachLevel: 0 105 | recoveryHp: 106 | baseAmount: 0 107 | amountIncreaseEachLevel: 0 108 | recoveryMp: 109 | baseAmount: 0 110 | amountIncreaseEachLevel: 0 111 | recoveryStamina: 112 | baseAmount: 0 113 | amountIncreaseEachLevel: 0 114 | recoveryFood: 115 | baseAmount: 0 116 | amountIncreaseEachLevel: 0 117 | recoveryWater: 118 | baseAmount: 0 119 | amountIncreaseEachLevel: 0 120 | increaseStats: 121 | baseStats: 122 | hp: 0 123 | mp: 0 124 | armor: 0 125 | accuracy: 0 126 | evasion: 0 127 | criRate: 0 128 | criDmgRate: 0 129 | blockRate: 0 130 | blockDmgRate: 0 131 | moveSpeed: 0 132 | atkSpeed: 0 133 | weightLimit: 0 134 | slotLimit: 0 135 | stamina: 0 136 | food: 0 137 | water: 0 138 | testStats: 0 139 | statsIncreaseEachLevel: 140 | hp: 0 141 | mp: 0 142 | armor: 0 143 | accuracy: 0 144 | evasion: 0 145 | criRate: 0 146 | criDmgRate: 0 147 | blockRate: 0 148 | blockDmgRate: 0 149 | moveSpeed: 0 150 | atkSpeed: 0 151 | weightLimit: 0 152 | slotLimit: 0 153 | stamina: 0 154 | food: 0 155 | water: 0 156 | testStats: 0 157 | increaseAttributes: [] 158 | increaseResistances: [] 159 | increaseDamages: [] 160 | damageOverTimes: [] 161 | disallowMove: 0 162 | disallowAttack: 0 163 | disallowUseSkill: 0 164 | disallowUseItem: 0 165 | effects: [] 166 | ammoType: {fileID: 0} 167 | buildingEntity: {fileID: 0} 168 | petEntity: {fileID: 0} 169 | -------------------------------------------------------------------------------- /Scripts/UmaAvatarData.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | using LiteNetLib.Utils; 5 | using LiteNetLibManager; 6 | 7 | namespace MultiplayerARPG 8 | { 9 | [System.Serializable] 10 | public struct UmaAvatarData : INetSerializable 11 | { 12 | public byte raceIndex; 13 | public byte genderIndex; 14 | public byte[] colors; 15 | public byte[] slots; 16 | public byte[] dnas; 17 | 18 | public void Deserialize(NetDataReader reader) 19 | { 20 | raceIndex = reader.GetByte(); 21 | genderIndex = reader.GetByte(); 22 | byte i; 23 | colors = new byte[reader.GetByte()]; 24 | for (i = 0; i < colors.Length; ++i) 25 | { 26 | colors[i] = reader.GetByte(); 27 | } 28 | slots = new byte[reader.GetByte()]; 29 | for (i = 0; i < slots.Length; ++i) 30 | { 31 | slots[i] = reader.GetByte(); 32 | } 33 | dnas = new byte[reader.GetByte()]; 34 | for (i = 0; i < dnas.Length; ++i) 35 | { 36 | dnas[i] = reader.GetByte(); 37 | } 38 | } 39 | 40 | public void Serialize(NetDataWriter writer) 41 | { 42 | writer.Put(raceIndex); 43 | writer.Put(genderIndex); 44 | byte i; 45 | writer.Put((byte)(colors == null ? 0 : colors.Length)); 46 | if (colors != null) 47 | { 48 | for (i = 0; i < colors.Length; ++i) 49 | { 50 | writer.Put(colors[i]); 51 | } 52 | } 53 | writer.Put((byte)(slots == null ? 0 : slots.Length)); 54 | if (slots != null) 55 | { 56 | for (i = 0; i < slots.Length; ++i) 57 | { 58 | writer.Put(slots[i]); 59 | } 60 | } 61 | writer.Put((byte)(dnas == null ? 0 : dnas.Length)); 62 | if (dnas != null) 63 | { 64 | for (i = 0; i < dnas.Length; ++i) 65 | { 66 | writer.Put(dnas[i]); 67 | } 68 | } 69 | } 70 | 71 | public void SetBytes(IList bytes) 72 | { 73 | int index = 0; 74 | if (bytes == null || bytes.Count == 0) 75 | return; 76 | raceIndex = bytes[index++]; 77 | genderIndex = bytes[index++]; 78 | byte i; 79 | colors = new byte[bytes[index++]]; 80 | for (i = 0; i < colors.Length; ++i) 81 | { 82 | colors[i] = bytes[index++]; 83 | } 84 | slots = new byte[bytes[index++]]; 85 | for (i = 0; i < slots.Length; ++i) 86 | { 87 | slots[i] = bytes[index++]; 88 | } 89 | dnas = new byte[bytes[index++]]; 90 | for (i = 0; i < dnas.Length; ++i) 91 | { 92 | dnas[i] = bytes[index++]; 93 | } 94 | } 95 | 96 | public IList GetBytes() 97 | { 98 | List result = new List(); 99 | result.Add(raceIndex); 100 | result.Add(genderIndex); 101 | byte i; 102 | result.Add((byte)(colors == null ? 0 : colors.Length)); 103 | if (colors != null) 104 | { 105 | for (i = 0; i < colors.Length; ++i) 106 | { 107 | result.Add(colors[i]); 108 | } 109 | } 110 | result.Add((byte)(slots == null ? 0 : slots.Length)); 111 | if (slots != null) 112 | { 113 | for (i = 0; i < slots.Length; ++i) 114 | { 115 | result.Add(slots[i]); 116 | } 117 | } 118 | result.Add((byte)(dnas == null ? 0 : dnas.Length)); 119 | if (dnas != null) 120 | { 121 | for (i = 0; i < dnas.Length; ++i) 122 | { 123 | result.Add(dnas[i]); 124 | } 125 | } 126 | return result.ToArray(); 127 | } 128 | } 129 | 130 | [System.Serializable] 131 | public class SyncFieldUmaAvatarData : LiteNetLibSyncField 132 | { 133 | protected override bool IsValueChanged(UmaAvatarData newValue) 134 | { 135 | return true; 136 | } 137 | } 138 | } 139 | -------------------------------------------------------------------------------- /GameData/Item/UMA_Shirt_Jeans.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &11400000 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInternal: {fileID: 0} 8 | m_GameObject: {fileID: 0} 9 | m_Enabled: 1 10 | m_EditorHideFlags: 0 11 | m_Script: {fileID: 11500000, guid: 75d6d0cd4d7cf8c4786ee2be97f454fb, type: 3} 12 | m_Name: UMA_Shirt_Jeans 13 | m_EditorClassIdentifier: 14 | title: Shirt Jeans 15 | titles: [] 16 | description: 17 | descriptions: [] 18 | icon: {fileID: 21300000, guid: fa88bd6a9e09afa44964a6da1e616aed, type: 3} 19 | umaRaceReceipeSlots: 20 | - raceData: {fileID: 11400000, guid: 62688b7aa02fbc544916e522fcc239c7, type: 2} 21 | recipes: 22 | - {fileID: 11400000, guid: 08ee8add251c0604787435e6e676f3db, type: 2} 23 | - {fileID: 11400000, guid: ed308ddf64a50d74aae73e4097381fc1, type: 2} 24 | - raceData: {fileID: 11400000, guid: f8fea6f0ee17b3f42a4ae6cfb627bab3, type: 2} 25 | recipes: 26 | - {fileID: 11400000, guid: 2f138c428389dac489ae6bd6303bf89f, type: 2} 27 | - {fileID: 11400000, guid: 20c9259364a58404eb9049b15587fbcd, type: 2} 28 | itemType: 1 29 | dropModel: {fileID: 1788792654363946, guid: 8da4f5a11c78d934382a50e10216b394, type: 2} 30 | sellPrice: 0 31 | weight: 0 32 | maxStack: 1 33 | itemRefineInfo: {fileID: 0} 34 | lockDuration: 0 35 | armorType: {fileID: 11400000, guid: 0253737f3a4bc994cb0be8d992b59240, type: 2} 36 | weaponType: {fileID: 0} 37 | moveSpeedRateWhileAttacking: 0 38 | damageAmount: 39 | damageElement: {fileID: 0} 40 | amount: 41 | baseAmount: 42 | min: 0 43 | max: 0 44 | amountIncreaseEachLevel: 45 | min: 0 46 | max: 0 47 | harvestDamageAmount: 48 | baseAmount: 49 | min: 0 50 | max: 0 51 | amountIncreaseEachLevel: 52 | min: 0 53 | max: 0 54 | equipmentModels: [] 55 | subEquipmentModels: [] 56 | requirement: 57 | character: {fileID: 0} 58 | level: 0 59 | attributeAmounts: [] 60 | increaseAttributes: [] 61 | increaseResistances: [] 62 | increaseDamages: [] 63 | increaseStats: 64 | baseStats: 65 | hp: 0 66 | mp: 0 67 | armor: 0 68 | accuracy: 0 69 | evasion: 0 70 | criRate: 0 71 | criDmgRate: 0 72 | blockRate: 0 73 | blockDmgRate: 0 74 | moveSpeed: 0 75 | atkSpeed: 0 76 | weightLimit: 0 77 | slotLimit: 0 78 | stamina: 0 79 | food: 0 80 | water: 0 81 | testStats: 0 82 | statsIncreaseEachLevel: 83 | hp: 0 84 | mp: 0 85 | armor: 0 86 | accuracy: 0 87 | evasion: 0 88 | criRate: 0 89 | criDmgRate: 0 90 | blockRate: 0 91 | blockDmgRate: 0 92 | moveSpeed: 0 93 | atkSpeed: 0 94 | weightLimit: 0 95 | slotLimit: 0 96 | stamina: 0 97 | food: 0 98 | water: 0 99 | testStats: 0 100 | equipmentSet: {fileID: 0} 101 | maxDurability: 0 102 | destroyIfBroken: 0 103 | buff: 104 | duration: 105 | baseAmount: 0 106 | amountIncreaseEachLevel: 0 107 | recoveryHp: 108 | baseAmount: 0 109 | amountIncreaseEachLevel: 0 110 | recoveryMp: 111 | baseAmount: 0 112 | amountIncreaseEachLevel: 0 113 | recoveryStamina: 114 | baseAmount: 0 115 | amountIncreaseEachLevel: 0 116 | recoveryFood: 117 | baseAmount: 0 118 | amountIncreaseEachLevel: 0 119 | recoveryWater: 120 | baseAmount: 0 121 | amountIncreaseEachLevel: 0 122 | increaseStats: 123 | baseStats: 124 | hp: 0 125 | mp: 0 126 | armor: 0 127 | accuracy: 0 128 | evasion: 0 129 | criRate: 0 130 | criDmgRate: 0 131 | blockRate: 0 132 | blockDmgRate: 0 133 | moveSpeed: 0 134 | atkSpeed: 0 135 | weightLimit: 0 136 | slotLimit: 0 137 | stamina: 0 138 | food: 0 139 | water: 0 140 | testStats: 0 141 | statsIncreaseEachLevel: 142 | hp: 0 143 | mp: 0 144 | armor: 0 145 | accuracy: 0 146 | evasion: 0 147 | criRate: 0 148 | criDmgRate: 0 149 | blockRate: 0 150 | blockDmgRate: 0 151 | moveSpeed: 0 152 | atkSpeed: 0 153 | weightLimit: 0 154 | slotLimit: 0 155 | stamina: 0 156 | food: 0 157 | water: 0 158 | testStats: 0 159 | increaseAttributes: [] 160 | increaseResistances: [] 161 | increaseDamages: [] 162 | damageOverTimes: [] 163 | disallowMove: 0 164 | disallowAttack: 0 165 | disallowUseSkill: 0 166 | disallowUseItem: 0 167 | effects: [] 168 | ammoType: {fileID: 0} 169 | buildingEntity: {fileID: 0} 170 | petEntity: {fileID: 0} 171 | -------------------------------------------------------------------------------- /GameData/GameDatabase_UMA.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &11400000 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 0 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: 11500000, guid: 446bd54be72e9c14a9d92aae35e50af7, type: 3} 13 | m_Name: GameDatabase_UMA 14 | m_EditorClassIdentifier: 15 | playerCharacterEntities: 16 | - {fileID: 114217790240189764, guid: 3db54f95f11a20a4081f602d37c75782, type: 3} 17 | - {fileID: 114217790240189764, guid: e10fc226d7c62c140ab7ed9fcdfaad34, type: 3} 18 | monsterCharacterEntities: 19 | - {fileID: 114107677553822186, guid: 2124e2e5e8dd2794ea8c8aff808d0096, type: 3} 20 | - {fileID: 114313543944479198, guid: c26675f5ea04ade429c509dd5998a3a3, type: 3} 21 | vehicleEntities: [] 22 | otherNetworkObjects: [] 23 | attributes: 24 | - {fileID: 11400000, guid: 0e223af20738b88419c22a1a0401a21b, type: 2} 25 | - {fileID: 11400000, guid: cf50e3647cfae0e44b683163d2171277, type: 2} 26 | - {fileID: 11400000, guid: c7e3824f99bb4bc43b9566210f8d02f5, type: 2} 27 | - {fileID: 11400000, guid: cd3d2fb4f3c67fd4dbba3bd0ccd0095e, type: 2} 28 | currencies: [] 29 | damageElements: 30 | - {fileID: 11400000, guid: 3afa55aee773f47438e6f7f3a03cd0b9, type: 2} 31 | - {fileID: 11400000, guid: 02b1c5248ea9f3242aa338970d626d27, type: 2} 32 | - {fileID: 11400000, guid: 84a7ad1ad281a3a47918fcb1f180d365, type: 2} 33 | - {fileID: 11400000, guid: 722cfdf3e0a6c8f47bd849a2d998e915, type: 2} 34 | items: 35 | - {fileID: 11400000, guid: 0df782e70d43dc54d8a6bc2d6a212f89, type: 2} 36 | - {fileID: 11400000, guid: 64774d4b5cf3f9846a2d2088fb52e44a, type: 2} 37 | - {fileID: 11400000, guid: e43af8a3a8f9a7a478dc243c7b15ff5f, type: 2} 38 | - {fileID: 11400000, guid: 66401780aa1f1a24782d11c6980883b2, type: 2} 39 | - {fileID: 11400000, guid: f913fbdc47f19a4408bc793331f9583a, type: 2} 40 | - {fileID: 11400000, guid: 8ead9c05113e5a5429ec0871d4079f29, type: 2} 41 | - {fileID: 11400000, guid: ff345f6fce46c844582749ebc64fd586, type: 2} 42 | - {fileID: 11400000, guid: 4ec23479e56964a4fb4f2cbd63adf628, type: 2} 43 | - {fileID: 11400000, guid: 99ce6353c3a0b344bb452d0b2035feed, type: 2} 44 | - {fileID: 11400000, guid: 4519d6286cf69b142ac9894ff8e06a31, type: 2} 45 | - {fileID: 11400000, guid: 93c389fe9d40638469bffd9de26d31ba, type: 2} 46 | - {fileID: 11400000, guid: b64f816f68b7d6a42b7d3857a4b5d931, type: 2} 47 | - {fileID: 11400000, guid: 2d57e318a4843d64d8d3924124b94368, type: 2} 48 | - {fileID: 11400000, guid: e4e881cff53fe054f830d67ad95dd3d0, type: 2} 49 | - {fileID: 11400000, guid: 05fd047386612f342aa61c5ddcf274d1, type: 2} 50 | - {fileID: 11400000, guid: f0ba2e9ab5115a74184f1805934e122d, type: 2} 51 | - {fileID: 11400000, guid: 0a439d3c316c36f4cae03a253c8839d4, type: 2} 52 | - {fileID: 11400000, guid: 5842068f5743c524c967a28b483477ed, type: 2} 53 | - {fileID: 11400000, guid: 34342a09346349345a4313fd6e7657e1, type: 2} 54 | - {fileID: 11400000, guid: 4896d19f8423d0a4d9d8a4c055531694, type: 2} 55 | - {fileID: 11400000, guid: fac1760f3f3d22a47a8e14e34a1d7440, type: 2} 56 | - {fileID: 11400000, guid: af55b8cdf6e01a14094ff9841ff8238b, type: 2} 57 | - {fileID: 11400000, guid: 63ab6ffb9b0b1eb40958204ac1767f1b, type: 2} 58 | - {fileID: 11400000, guid: 87b4c98d2d09c4a44a53c633310c8b96, type: 2} 59 | - {fileID: 11400000, guid: 691223c0d0d1c9342aa0df9855949779, type: 2} 60 | - {fileID: 11400000, guid: 91eec32179dd9e84bad4b728ddde1e02, type: 2} 61 | itemCraftFormulas: [] 62 | armorTypes: [] 63 | weaponTypes: [] 64 | ammoTypes: [] 65 | skills: 66 | - {fileID: 11400000, guid: e51e32bb6c31b564a9e211e7b65c82ec, type: 2} 67 | - {fileID: 11400000, guid: 2da121bb20bbc844bafd830dcb439578, type: 2} 68 | - {fileID: 11400000, guid: 62050ee15b839a04080e8d1764fc4737, type: 2} 69 | - {fileID: 11400000, guid: b9f63b3b2f7be634e9493c7acfb8ef54, type: 2} 70 | - {fileID: 11400000, guid: 417c6b4c5515bd84a9bee4c80ea404fa, type: 2} 71 | - {fileID: 11400000, guid: 342c2acc88ca3f34ab00cf7f43775edf, type: 2} 72 | - {fileID: 11400000, guid: aa4fffff388c1634397b4bdcdb18a4fa, type: 2} 73 | - {fileID: 11400000, guid: d55d8bfb45f9c574d9120b6ffcd66e3c, type: 2} 74 | - {fileID: 11400000, guid: c0bba1d7b0967e3428404a9fc3211a7b, type: 2} 75 | - {fileID: 11400000, guid: 25f18d3131d816146b890611d9123df4, type: 2} 76 | - {fileID: 11400000, guid: c036ac5144bfb36428bd9b2fa2a5ce2c, type: 2} 77 | - {fileID: 11400000, guid: 00144a2dd7250bb4ab60d49c66cc48f0, type: 2} 78 | - {fileID: 11400000, guid: 558b16358ddfa6346b5e5e6211155da6, type: 2} 79 | - {fileID: 11400000, guid: ab5e0f2076634794394a8a28275204c2, type: 2} 80 | - {fileID: 11400000, guid: aa319f1dfe3afb449b69aa255c39a69b, type: 2} 81 | - {fileID: 11400000, guid: 401cce43094968c4bbca0024b52a4644, type: 2} 82 | - {fileID: 11400000, guid: 494792636296b624fbf4ff17294217c5, type: 2} 83 | guildSkills: 84 | - {fileID: 11400000, guid: d3875bef37ed4aa4dba86b08069b5a8f, type: 2} 85 | - {fileID: 11400000, guid: 56999d63a8734bd4f8b19e254ecfbeae, type: 2} 86 | - {fileID: 11400000, guid: d4a2fc417a247c74f9db5f31ab7d2b75, type: 2} 87 | - {fileID: 11400000, guid: fe3307ecb7dbe3142a73616746b84e59, type: 2} 88 | guildIcons: [] 89 | statusEffects: [] 90 | playerCharacters: 91 | - {fileID: 11400000, guid: dc913e9cf36197c4799489ef0a2315b2, type: 2} 92 | monsterCharacters: 93 | - {fileID: 11400000, guid: 23e69da72a14d644eb8c0128af2ee872, type: 2} 94 | - {fileID: 11400000, guid: 04cf3a67b05487e4a84f0da538307cb3, type: 2} 95 | harvestables: [] 96 | mapInfos: 97 | - {fileID: 11400000, guid: de8b0e4099f8d444692e88f92309e90d, type: 2} 98 | - {fileID: 11400000, guid: fbe2a93dfafee544cbeaf175d3491e33, type: 2} 99 | quests: 100 | - {fileID: 11400000, guid: 35af53733329bea43ba4a13eab140778, type: 2} 101 | - {fileID: 11400000, guid: b07c2f59514e7aa45a8005d227e79954, type: 2} 102 | - {fileID: 11400000, guid: 4000f50ad41cb17419c5de53509949d8, type: 2} 103 | factions: [] 104 | gachas: [] 105 | attributeBundleName: attribute 106 | currencyBundleName: currency 107 | damageElementBundleName: damageElement 108 | characterBundleName: character 109 | itemBundleName: item 110 | mapInfoBundleName: map 111 | sceneBundleName: scene 112 | skillBundleName: skill 113 | guildSkillBundleName: guildSkill 114 | guildIconBundleName: guildIcon 115 | questBundleName: quest 116 | factionBundleName: faction 117 | gachaBundleName: gacha 118 | setNameForUnnamedAssetsOnly: 1 119 | -------------------------------------------------------------------------------- /Scripts/MMO/UI/UIMmoCharacterListUMA.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using UnityEngine; 3 | using LiteNetLibManager; 4 | using MultiplayerARPG.GameData.Model.Playables; 5 | 6 | namespace MultiplayerARPG.MMO 7 | { 8 | public class UIMmoCharacterListUMA : UICharacterListUMA 9 | { 10 | protected override void LoadCharacters() 11 | { 12 | eventOnNotAbleToCreateCharacter.Invoke(); 13 | MMOClientInstance.Singleton.RequestCharacters(OnRequestedCharacters); 14 | } 15 | 16 | private void OnRequestedCharacters(ResponseHandlerData responseHandler, AckResponseCode responseCode, ResponseCharactersMessage response) 17 | { 18 | // Clear character list 19 | CharacterSelectionManager.Clear(); 20 | CharacterList.HideAll(); 21 | // Unable buttons 22 | buttonStart.gameObject.SetActive(false); 23 | buttonDelete.gameObject.SetActive(false); 24 | // Remove all models 25 | characterModelContainer.RemoveChildren(); 26 | _characterModelById.Clear(); 27 | // Remove all cached data 28 | _playerCharacterDataById.Clear(); 29 | // Proceed response 30 | List selectableCharacters = new List(); 31 | if (!responseCode.ShowUnhandledResponseMessageDialog(response.message)) 32 | { 33 | // Success, so set selectable characters by response's data 34 | selectableCharacters = response.characters; 35 | } 36 | // Show list of created characters 37 | for (int i = selectableCharacters.Count - 1; i >= 0; --i) 38 | { 39 | PlayerCharacterData selectableCharacter = selectableCharacters[i]; 40 | if (selectableCharacter == null || 41 | !GameInstance.PlayerCharacterEntities.ContainsKey(selectableCharacter.EntityId) || 42 | !GameInstance.PlayerCharacters.ContainsKey(selectableCharacter.DataId)) 43 | { 44 | // If invalid entity id or data id, remove from selectable character list 45 | selectableCharacters.RemoveAt(i); 46 | } 47 | } 48 | 49 | if (GameInstance.Singleton.maxCharacterSaves > 0 && 50 | selectableCharacters.Count >= GameInstance.Singleton.maxCharacterSaves) 51 | eventOnNotAbleToCreateCharacter.Invoke(); 52 | else 53 | eventOnAbleToCreateCharacter.Invoke(); 54 | 55 | // Clear selected character data, will select first in list if available 56 | _selectedPlayerCharacterData = null; 57 | 58 | // Generate list entry by saved characters 59 | if (selectableCharacters.Count > 0) 60 | { 61 | selectableCharacters.Sort(new PlayerCharacterDataLastUpdateComparer().Desc()); 62 | CharacterList.Generate(selectableCharacters, (index, characterData, ui) => 63 | { 64 | // Cache player character to dictionary, we will use it later 65 | _playerCharacterDataById[characterData.Id] = characterData; 66 | // Setup UIs 67 | UICharacter uiCharacter = ui.GetComponent(); 68 | uiCharacter.Data = characterData; 69 | // Select trigger when add first entry so deactivate all models is okay because first model will active 70 | PlayableCharacterModelUMA characterModel = (PlayableCharacterModelUMA)characterData.InstantiateModel(characterModelContainer); 71 | if (characterModel != null) 72 | { 73 | _characterModelById[characterData.Id] = characterModel; 74 | characterModel.SetEquipItems(characterData.EquipItems,characterModel.SelectableWeaponSets, characterData.EquipWeaponSet, characterModel.IsWeaponsSheathed); 75 | characterModel.gameObject.SetActive(false); 76 | CharacterSelectionManager.Add(uiCharacter); 77 | } 78 | }); 79 | } 80 | else 81 | { 82 | eventOnNoCharacter.Invoke(); 83 | } 84 | } 85 | 86 | protected override void OnSelectCharacter(IPlayerCharacterData playerCharacterData) 87 | { 88 | if (buttonStart) 89 | buttonStart.gameObject.SetActive(true); 90 | if (buttonDelete) 91 | buttonDelete.gameObject.SetActive(true); 92 | characterModelContainer.SetChildrenActive(false); 93 | // Load selected character and also set selected player character data 94 | _playerCharacterDataById.TryGetValue(playerCharacterData.Id, out _selectedPlayerCharacterData); 95 | // Show selected character model 96 | _characterModelById.TryGetValue(playerCharacterData.Id, out _selectedModel); 97 | if (SelectedModel != null && SelectedModel is ICharacterModelUma) 98 | { 99 | // Setup Uma model and applies options 100 | ICharacterModelUma characterModelUMA = SelectedModel as ICharacterModelUma; 101 | UmaModel = characterModelUMA; 102 | SelectedModel.gameObject.SetActive(true); 103 | UmaModel.ApplyUmaAvatar(SelectedPlayerCharacterData.UmaAvatarData); 104 | } 105 | } 106 | 107 | public override void OnClickStart() 108 | { 109 | UICharacter selectedUI = CharacterSelectionManager.SelectedUI; 110 | if (selectedUI == null) 111 | { 112 | UISceneGlobal.Singleton.ShowMessageDialog(LanguageManager.GetText(UITextKeys.UI_LABEL_ERROR.ToString()), LanguageManager.GetText(UITextKeys.UI_ERROR_NO_CHOSEN_CHARACTER_TO_START.ToString())); 113 | Debug.LogWarning("Cannot start game, No chosen character"); 114 | return; 115 | } 116 | // Load gameplay scene, we're going to manage maps in gameplay scene later 117 | // So we can add gameplay UI just once in gameplay scene 118 | IPlayerCharacterData playerCharacter = selectedUI.Data as IPlayerCharacterData; 119 | MMOClientInstance.Singleton.RequestSelectCharacter(playerCharacter.Id, OnRequestedSelectCharacter); 120 | } 121 | 122 | private void OnRequestedSelectCharacter(ResponseHandlerData responseHandler, AckResponseCode responseCode, ResponseSelectCharacterMessage response) 123 | { 124 | if (responseCode.ShowUnhandledResponseMessageDialog(response.message)) return; 125 | if (!GameInstance.MapInfos.TryGetValue(response.mapName, out BaseMapInfo mapInfo)) 126 | { 127 | responseCode.ShowUnhandledResponseMessageDialog(UITextKeys.UI_ERROR_INVALID_DATA); 128 | return; 129 | } 130 | MMOClientInstance.Singleton.StartMapClient(mapInfo, response.networkAddress, response.networkPort); 131 | } 132 | 133 | public override void OnClickDelete() 134 | { 135 | UICharacter selectedUI = CharacterSelectionManager.SelectedUI; 136 | if (selectedUI == null) 137 | { 138 | UISceneGlobal.Singleton.ShowMessageDialog(LanguageManager.GetText(UITextKeys.UI_LABEL_ERROR.ToString()), LanguageManager.GetText(UITextKeys.UI_ERROR_NO_CHOSEN_CHARACTER_TO_DELETE.ToString())); 139 | Debug.LogWarning("Cannot delete character, No chosen character"); 140 | return; 141 | } 142 | 143 | IPlayerCharacterData playerCharacter = selectedUI.Data as IPlayerCharacterData; 144 | MMOClientInstance.Singleton.RequestDeleteCharacter(playerCharacter.Id, OnRequestedDeleteCharacter); 145 | } 146 | 147 | private void OnRequestedDeleteCharacter(ResponseHandlerData responseHandler, AckResponseCode responseCode, ResponseDeleteCharacterMessage response) 148 | { 149 | if (responseCode.ShowUnhandledResponseMessageDialog(response.message)) return; 150 | // Reload characters 151 | LoadCharacters(); 152 | } 153 | } 154 | } 155 | -------------------------------------------------------------------------------- /Scripts/UI/UICharacterCreateUMA.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | using UMA; 5 | using UMA.CharacterSystem; 6 | 7 | namespace MultiplayerARPG 8 | { 9 | public class UICharacterCreateUMA : UICharacterCreate 10 | { 11 | public GameObject umaPanelRoot; 12 | public DropdownWrapper raceDropdown; 13 | public DropdownWrapper genderDropdown; 14 | public UIUmaCustomizeSlotDropdown prefabCustomizeSlotDropdown; 15 | public Transform customizeSlotContainer; 16 | public UIUmaDnaSlider prefabDnaSlider; 17 | public Transform dnaSliderContainer; 18 | public UIUmaColorDropdown prefabColorDropdown; 19 | public Transform colorOptionContainer; 20 | 21 | public ICharacterModelUma UmaModel { get; private set; } 22 | public byte SelectedRaceIndex { get; private set; } 23 | public byte SelectedGenderIndex { get; private set; } 24 | public byte[] SelectedSlots { get; private set; } 25 | public byte[] SelectedColors { get; private set; } 26 | public byte[] SelectedDnas { get; private set; } 27 | private bool dontApplyAvatar; 28 | 29 | protected override void OnSelectCharacter(IPlayerCharacterData playerCharacterData) 30 | { 31 | base.OnSelectCharacter(playerCharacterData); 32 | 33 | 34 | 35 | _characterModelByEntityId.TryGetValue(playerCharacterData.EntityId, out _selectedModel); 36 | SelectedDataId = playerCharacterData.DataId; 37 | SelectedEntityId = playerCharacterData.EntityId; 38 | 39 | ICharacterModelUma characterModelUMA = SelectedModel as ICharacterModelUma; 40 | 41 | // ICharacterModelUma characterModelUMA = playerCharacterData.InstantiateModel(characterModelContainer) as ICharacterModelUma; 42 | //_characterModelByEntityId[playerCharacterData.EntityId] = characterModelUMA as BaseCharacterModel; 43 | 44 | if (umaPanelRoot != null) 45 | umaPanelRoot.SetActive(characterModelUMA != null); 46 | UmaModel = characterModelUMA; 47 | 48 | 49 | 50 | if(SelectedModel != null) 51 | { 52 | SelectedModel.gameObject.SetActive(true); 53 | 54 | } 55 | ShowUmaCharacter(); 56 | } 57 | 58 | private void ShowUmaCharacter() 59 | { 60 | if (UmaModel != null) 61 | { 62 | UmaModel.InitializeUMA(); 63 | if (!UmaModel.IsUmaCharacterCreated) 64 | { 65 | UmaModel.OnUmaCharacterCreated -= OnUmaCharacterCreated; 66 | UmaModel.OnUmaCharacterCreated += OnUmaCharacterCreated; 67 | return; 68 | } 69 | 70 | dontApplyAvatar = true; 71 | if (raceDropdown != null) 72 | { 73 | raceDropdown.onValueChanged.RemoveListener(OnRaceDropdownValueChanged); 74 | raceDropdown.options = new List(); 75 | List dropdownOptions = new List(); 76 | UmaRace[] races = GameInstance.Singleton.UmaRaces; 77 | foreach (UmaRace race in races) 78 | { 79 | dropdownOptions.Add(new DropdownWrapper.OptionData() 80 | { 81 | text = race.name, 82 | }); 83 | } 84 | raceDropdown.options = dropdownOptions; 85 | OnRaceDropdownValueChanged(0); 86 | raceDropdown.onValueChanged.AddListener(OnRaceDropdownValueChanged); 87 | } 88 | dontApplyAvatar = false; 89 | ApplyAvatar(); 90 | } 91 | } 92 | 93 | private void OnUmaCharacterCreated() 94 | { 95 | StartCoroutine(OnCharacterCreatedRoutine()); 96 | } 97 | 98 | private IEnumerator OnCharacterCreatedRoutine() 99 | { 100 | yield return null; 101 | ShowUmaCharacter(); 102 | } 103 | 104 | private void OnRaceDropdownValueChanged(int selectedIndex) 105 | { 106 | SelectedRaceIndex = (byte)selectedIndex; 107 | if (genderDropdown != null) 108 | { 109 | genderDropdown.onValueChanged.RemoveListener(OnGenderDropdownValueChanged); 110 | genderDropdown.options = new List(); 111 | List dropdownOptions = new List(); 112 | UmaRace race = GameInstance.Singleton.UmaRaces[selectedIndex]; 113 | UmaRaceGender[] genders = race.genders; 114 | foreach (UmaRaceGender gender in genders) 115 | { 116 | dropdownOptions.Add(new DropdownWrapper.OptionData() 117 | { 118 | text = gender.name, 119 | }); 120 | } 121 | // Switch dropdown 122 | genderDropdown.options = dropdownOptions; 123 | OnGenderDropdownValueChanged(0); 124 | genderDropdown.onValueChanged.AddListener(OnGenderDropdownValueChanged); 125 | } 126 | } 127 | 128 | private void OnGenderDropdownValueChanged(int selectedIndex) 129 | { 130 | SelectedGenderIndex = (byte)selectedIndex; 131 | UmaRace race = GameInstance.Singleton.UmaRaces[SelectedRaceIndex]; 132 | UmaRaceGender gender = race.genders[SelectedGenderIndex]; 133 | UmaModel.CacheUmaAvatar.ChangeRace(gender.raceData.raceName); 134 | UmaModel.CacheUmaAvatar.BuildCharacter(true); 135 | // Setup customizable slots 136 | GenericUtils.RemoveChildren(customizeSlotContainer); 137 | UmaCustomizableSlot[] slots = gender.customizableSlots; 138 | SelectedSlots = new byte[slots.Length]; 139 | for (byte i = 0; i < slots.Length; ++i) 140 | { 141 | UIUmaCustomizeSlotDropdown uiSlot = Instantiate(prefabCustomizeSlotDropdown); 142 | uiSlot.Setup(this, i); 143 | uiSlot.transform.SetParent(customizeSlotContainer); 144 | uiSlot.transform.localScale = Vector3.one; 145 | } 146 | // Setup color options 147 | GenericUtils.RemoveChildren(colorOptionContainer); 148 | SelectedColors = new byte[race.colorTables.Length]; 149 | for (byte i = 0; i < race.colorTables.Length; ++i) 150 | { 151 | UIUmaColorDropdown uiColor = Instantiate(prefabColorDropdown); 152 | uiColor.Setup(this, i); 153 | uiColor.transform.SetParent(colorOptionContainer); 154 | uiColor.transform.localScale = Vector3.one; 155 | } 156 | ApplyAvatar(); 157 | StartCoroutine(SetupDnas()); 158 | } 159 | 160 | IEnumerator SetupDnas() 161 | { 162 | yield return null; 163 | // Setup customizable dnas 164 | GenericUtils.RemoveChildren(dnaSliderContainer); 165 | Dictionary dnas = null; 166 | while (dnas == null || dnas.Count == 0) 167 | { 168 | dnas = UmaModel.CacheUmaAvatar.GetDNA(); 169 | yield return null; 170 | } 171 | List dnaNames = new List(dnas.Keys); 172 | dnaNames.Sort(); 173 | SelectedDnas = new byte[dnaNames.Count]; 174 | for (byte i = 0; i < dnaNames.Count; ++i) 175 | { 176 | UIUmaDnaSlider uiDnaSlider = Instantiate(prefabDnaSlider); 177 | uiDnaSlider.Setup(this, i, dnas[dnaNames[i]]); 178 | uiDnaSlider.transform.SetParent(dnaSliderContainer); 179 | uiDnaSlider.transform.localScale = Vector3.one; 180 | } 181 | ApplyAvatar(); 182 | } 183 | 184 | public void SetSlot(byte index, byte value) 185 | { 186 | SelectedSlots[index] = value; 187 | ApplyAvatar(); 188 | } 189 | 190 | public void SetColor(byte index, byte value) 191 | { 192 | SelectedColors[index] = value; 193 | ApplyAvatar(); 194 | } 195 | 196 | public void SetDna(byte index, float value) 197 | { 198 | SelectedDnas[index] = (byte)(value * 100); 199 | ApplyAvatar(); 200 | } 201 | 202 | public void ApplyAvatar() 203 | { 204 | if (dontApplyAvatar) 205 | return; 206 | UmaModel.ApplyUmaAvatar(GetAvatarData()); 207 | } 208 | 209 | public UmaAvatarData GetAvatarData() 210 | { 211 | UmaAvatarData result = new UmaAvatarData(); 212 | result.raceIndex = SelectedRaceIndex; 213 | result.genderIndex = SelectedGenderIndex; 214 | result.slots = SelectedSlots; 215 | result.colors = SelectedColors; 216 | result.dnas = SelectedDnas; 217 | return result; 218 | } 219 | 220 | protected override void SaveCreatingPlayerCharacter(string characterName) 221 | { 222 | PlayerCharacterData characterData = new PlayerCharacterData(); 223 | characterData.Id = GenericUtils.GetUniqueId(); 224 | characterData.SetNewPlayerCharacterData(characterName, SelectedDataId, SelectedEntityId, SelectedFactionId); 225 | characterData.UmaAvatarData = GetAvatarData(); 226 | GameInstance.Singleton.SaveSystem.SaveCharacter(characterData); 227 | } 228 | } 229 | } 230 | -------------------------------------------------------------------------------- /GameData/Item/UMA_BaseballBat.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &11400000 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 0 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: 11500000, guid: 75d6d0cd4d7cf8c4786ee2be97f454fb, type: 3} 13 | m_Name: UMA_BaseballBat 14 | m_EditorClassIdentifier: 15 | id: 16 | defaultTitle: Baseball Bat 17 | languageSpecificTitles: [] 18 | defaultDescription: 19 | languageSpecificDescriptions: [] 20 | category: 21 | icon: {fileID: 21300000, guid: af318240f56c60143a8b3dda92a5c3b2, type: 3} 22 | sellPrice: 0 23 | weight: 0 24 | maxStack: 1 25 | itemRefine: {fileID: 0} 26 | lockDuration: 0 27 | dropModel: {fileID: 1091261546918072, guid: daf96be2163233f498fe1d7d8095124a, type: 3} 28 | dismantleReturnGold: 0 29 | dismantleReturnItems: [] 30 | dismantleReturnCurrencies: [] 31 | cashShopItemGeneratingList: [] 32 | umaRaceRecipeSlots: [] 33 | itemType: 2 34 | useItemCooldown: 0 35 | autoUseKey: 36 | equipmentModels: 37 | - equipSocket: RightHand 38 | useInstantiatedObject: 0 39 | model: {fileID: 1856257694834870, guid: 7fdfc8c4006877f478ec60f4341aa7b9, type: 3} 40 | instantiatedObjectIndex: 0 41 | localPosition: {x: 0, y: 0, z: 0} 42 | localEulerAngles: {x: 0, y: 0, z: 0} 43 | localScale: {x: 1, y: 1, z: 1} 44 | priority: 0 45 | itemDataId: 0 46 | itemLevel: 0 47 | equipPosition: 48 | subEquipmentModels: [] 49 | requirement: 50 | availableClass: {fileID: 0} 51 | availableClasses: [] 52 | level: 0 53 | attributeAmounts: [] 54 | equipmentSet: {fileID: 0} 55 | maxDurability: 0 56 | destroyIfBroken: 0 57 | maxSocket: 0 58 | armorType: {fileID: 0} 59 | armorAmount: 60 | damageElement: {fileID: 0} 61 | amount: 62 | baseAmount: 0 63 | amountIncreaseEachLevel: 0 64 | amountIncreaseEachLevelByLevels: [] 65 | weaponType: {fileID: 11400000, guid: a33855f9c9112894fbf4fb803ab001da, type: 2} 66 | damageAmount: 67 | damageElement: {fileID: 0} 68 | amount: 69 | baseAmount: 70 | min: 5 71 | max: 10 72 | amountIncreaseEachLevel: 73 | min: 0.5 74 | max: 0.5 75 | amountIncreaseEachLevelByLevels: [] 76 | harvestDamageAmount: 77 | baseAmount: 78 | min: 0 79 | max: 0 80 | amountIncreaseEachLevel: 81 | min: 0 82 | max: 0 83 | amountIncreaseEachLevelByLevels: [] 84 | moveSpeedRateWhileReloading: 1 85 | moveSpeedRateWhileCharging: 1 86 | moveSpeedRateWhileAttacking: 0 87 | movementRestrictionWhileReloading: 88 | jumpRestricted: 0 89 | turnRestricted: 0 90 | movementRestrictionWhileCharging: 91 | jumpRestricted: 0 92 | turnRestricted: 0 93 | movementRestrictionWhileAttacking: 94 | jumpRestricted: 0 95 | turnRestricted: 0 96 | attackRestriction: 97 | restrictedWhileAirborne: 0 98 | restrictedWhileCrouching: 0 99 | restrictedWhileCrawling: 0 100 | reloadRestriction: 101 | restrictedWhileAirborne: 0 102 | restrictedWhileCrouching: 0 103 | restrictedWhileCrawling: 0 104 | ammoCapacity: 0 105 | weaponAbility: {fileID: 0} 106 | crosshairSetting: 107 | hidden: 0 108 | expandPerFrameWhileMoving: 3 109 | expandPerFrameWhileAttacking: 5 110 | shrinkPerFrame: 8 111 | shrinkPerFrameWhenAttacked: 0 112 | minSpread: 10 113 | maxSpread: 50 114 | recoilX: 0 115 | recoilY: 0 116 | launchClip: {fileID: 0} 117 | launchClipSettings: [] 118 | reloadClip: {fileID: 0} 119 | reloadClipSettings: [] 120 | reloadedClip: {fileID: 0} 121 | reloadedClipSettings: [] 122 | emptyClip: {fileID: 0} 123 | emptyClipSettings: [] 124 | fireType: 0 125 | fireStagger: {x: 0, y: 0} 126 | fireSpread: 0 127 | chargeDuration: 0 128 | destroyImmediatelyAfterFired: 0 129 | buff: 130 | tag: 131 | restrictTags: [] 132 | increaseStats: 133 | baseStats: 134 | hp: 0 135 | hpRecovery: 0 136 | hpLeechRate: 0 137 | mp: 0 138 | mpRecovery: 0 139 | mpLeechRate: 0 140 | stamina: 0 141 | staminaRecovery: 0 142 | staminaLeechRate: 0 143 | food: 0 144 | water: 0 145 | accuracy: 0 146 | evasion: 0 147 | criRate: 0 148 | criDmgRate: 0 149 | blockRate: 0 150 | blockDmgRate: 0 151 | moveSpeed: 0 152 | atkSpeed: 0 153 | weightLimit: 0 154 | slotLimit: 0 155 | goldRate: 0 156 | expRate: 0 157 | statsIncreaseEachLevel: 158 | hp: 0 159 | hpRecovery: 0 160 | hpLeechRate: 0 161 | mp: 0 162 | mpRecovery: 0 163 | mpLeechRate: 0 164 | stamina: 0 165 | staminaRecovery: 0 166 | staminaLeechRate: 0 167 | food: 0 168 | water: 0 169 | accuracy: 0 170 | evasion: 0 171 | criRate: 0 172 | criDmgRate: 0 173 | blockRate: 0 174 | blockDmgRate: 0 175 | moveSpeed: 0 176 | atkSpeed: 0 177 | weightLimit: 0 178 | slotLimit: 0 179 | goldRate: 0 180 | expRate: 0 181 | statsIncreaseEachLevelByLevels: [] 182 | increaseStatsRate: 183 | baseStats: 184 | hp: 0 185 | hpRecovery: 0 186 | hpLeechRate: 0 187 | mp: 0 188 | mpRecovery: 0 189 | mpLeechRate: 0 190 | stamina: 0 191 | staminaRecovery: 0 192 | staminaLeechRate: 0 193 | food: 0 194 | water: 0 195 | accuracy: 0 196 | evasion: 0 197 | criRate: 0 198 | criDmgRate: 0 199 | blockRate: 0 200 | blockDmgRate: 0 201 | moveSpeed: 0 202 | atkSpeed: 0 203 | weightLimit: 0 204 | slotLimit: 0 205 | goldRate: 0 206 | expRate: 0 207 | statsIncreaseEachLevel: 208 | hp: 0 209 | hpRecovery: 0 210 | hpLeechRate: 0 211 | mp: 0 212 | mpRecovery: 0 213 | mpLeechRate: 0 214 | stamina: 0 215 | staminaRecovery: 0 216 | staminaLeechRate: 0 217 | food: 0 218 | water: 0 219 | accuracy: 0 220 | evasion: 0 221 | criRate: 0 222 | criDmgRate: 0 223 | blockRate: 0 224 | blockDmgRate: 0 225 | moveSpeed: 0 226 | atkSpeed: 0 227 | weightLimit: 0 228 | slotLimit: 0 229 | goldRate: 0 230 | expRate: 0 231 | statsIncreaseEachLevelByLevels: [] 232 | increaseAttributes: [] 233 | increaseAttributesRate: [] 234 | increaseResistances: [] 235 | increaseArmors: [] 236 | increaseDamages: [] 237 | duration: 238 | baseAmount: 0 239 | amountIncreaseEachLevel: 0 240 | amountIncreaseEachLevelByLevels: [] 241 | recoveryHp: 242 | baseAmount: 0 243 | amountIncreaseEachLevel: 0 244 | amountIncreaseEachLevelByLevels: [] 245 | recoveryMp: 246 | baseAmount: 0 247 | amountIncreaseEachLevel: 0 248 | amountIncreaseEachLevelByLevels: [] 249 | recoveryStamina: 250 | baseAmount: 0 251 | amountIncreaseEachLevel: 0 252 | amountIncreaseEachLevelByLevels: [] 253 | recoveryFood: 254 | baseAmount: 0 255 | amountIncreaseEachLevel: 0 256 | amountIncreaseEachLevelByLevels: [] 257 | recoveryWater: 258 | baseAmount: 0 259 | amountIncreaseEachLevel: 0 260 | amountIncreaseEachLevelByLevels: [] 261 | damageOverTimes: [] 262 | ailment: 0 263 | disallowMove: 0 264 | disallowAttack: 0 265 | disallowUseSkill: 0 266 | disallowUseItem: 0 267 | freezeAnimation: 0 268 | isHide: 0 269 | muteFootstepSound: 0 270 | selfStatusEffectsWhenAttacking: [] 271 | enemyStatusEffectsWhenAttacking: [] 272 | selfStatusEffectsWhenAttacked: [] 273 | enemyStatusEffectsWhenAttacked: [] 274 | doNotRemoveOnDead: 0 275 | isExtendDuration: 0 276 | maxStack: 277 | baseAmount: 0 278 | amountIncreaseEachLevel: 0 279 | amountIncreaseEachLevelByLevels: [] 280 | effects: [] 281 | increaseStats: 282 | baseStats: 283 | hp: 0 284 | hpRecovery: 0 285 | hpLeechRate: 0 286 | mp: 0 287 | mpRecovery: 0 288 | mpLeechRate: 0 289 | stamina: 0 290 | staminaRecovery: 0 291 | staminaLeechRate: 0 292 | food: 0 293 | water: 0 294 | accuracy: 0 295 | evasion: 0 296 | criRate: 0 297 | criDmgRate: 0 298 | blockRate: 0 299 | blockDmgRate: 0 300 | moveSpeed: 0 301 | atkSpeed: 0 302 | weightLimit: 0 303 | slotLimit: 0 304 | goldRate: 0 305 | expRate: 0 306 | statsIncreaseEachLevel: 307 | hp: 0 308 | hpRecovery: 0 309 | hpLeechRate: 0 310 | mp: 0 311 | mpRecovery: 0 312 | mpLeechRate: 0 313 | stamina: 0 314 | staminaRecovery: 0 315 | staminaLeechRate: 0 316 | food: 0 317 | water: 0 318 | accuracy: 0 319 | evasion: 0 320 | criRate: 0 321 | criDmgRate: 0 322 | blockRate: 0 323 | blockDmgRate: 0 324 | moveSpeed: 0 325 | atkSpeed: 0 326 | weightLimit: 0 327 | slotLimit: 0 328 | goldRate: 0 329 | expRate: 0 330 | statsIncreaseEachLevelByLevels: [] 331 | increaseStatsRate: 332 | baseStats: 333 | hp: 0 334 | hpRecovery: 0 335 | hpLeechRate: 0 336 | mp: 0 337 | mpRecovery: 0 338 | mpLeechRate: 0 339 | stamina: 0 340 | staminaRecovery: 0 341 | staminaLeechRate: 0 342 | food: 0 343 | water: 0 344 | accuracy: 0 345 | evasion: 0 346 | criRate: 0 347 | criDmgRate: 0 348 | blockRate: 0 349 | blockDmgRate: 0 350 | moveSpeed: 0 351 | atkSpeed: 0 352 | weightLimit: 0 353 | slotLimit: 0 354 | goldRate: 0 355 | expRate: 0 356 | statsIncreaseEachLevel: 357 | hp: 0 358 | hpRecovery: 0 359 | hpLeechRate: 0 360 | mp: 0 361 | mpRecovery: 0 362 | mpLeechRate: 0 363 | stamina: 0 364 | staminaRecovery: 0 365 | staminaLeechRate: 0 366 | food: 0 367 | water: 0 368 | accuracy: 0 369 | evasion: 0 370 | criRate: 0 371 | criDmgRate: 0 372 | blockRate: 0 373 | blockDmgRate: 0 374 | moveSpeed: 0 375 | atkSpeed: 0 376 | weightLimit: 0 377 | slotLimit: 0 378 | goldRate: 0 379 | expRate: 0 380 | statsIncreaseEachLevelByLevels: [] 381 | increaseAttributes: [] 382 | increaseAttributesRate: [] 383 | increaseResistances: [] 384 | increaseArmors: [] 385 | increaseDamages: [] 386 | increaseSkillLevels: [] 387 | ammoType: {fileID: 0} 388 | buildingEntity: {fileID: 0} 389 | petEntity: {fileID: 0} 390 | mountEntity: {fileID: 0} 391 | socketEnhanceEffect: 392 | stats: 393 | hp: 0 394 | hpRecovery: 0 395 | hpLeechRate: 0 396 | mp: 0 397 | mpRecovery: 0 398 | mpLeechRate: 0 399 | stamina: 0 400 | staminaRecovery: 0 401 | staminaLeechRate: 0 402 | food: 0 403 | water: 0 404 | accuracy: 0 405 | evasion: 0 406 | criRate: 0 407 | criDmgRate: 0 408 | blockRate: 0 409 | blockDmgRate: 0 410 | moveSpeed: 0 411 | atkSpeed: 0 412 | weightLimit: 0 413 | slotLimit: 0 414 | goldRate: 0 415 | expRate: 0 416 | statsRate: 417 | hp: 0 418 | hpRecovery: 0 419 | hpLeechRate: 0 420 | mp: 0 421 | mpRecovery: 0 422 | mpLeechRate: 0 423 | stamina: 0 424 | staminaRecovery: 0 425 | staminaLeechRate: 0 426 | food: 0 427 | water: 0 428 | accuracy: 0 429 | evasion: 0 430 | criRate: 0 431 | criDmgRate: 0 432 | blockRate: 0 433 | blockDmgRate: 0 434 | moveSpeed: 0 435 | atkSpeed: 0 436 | weightLimit: 0 437 | slotLimit: 0 438 | goldRate: 0 439 | expRate: 0 440 | attributes: [] 441 | attributesRate: [] 442 | resistances: [] 443 | armors: [] 444 | damages: [] 445 | skills: [] 446 | attributeAmount: 447 | attribute: {fileID: 0} 448 | amount: 0 449 | skillLevel: 450 | skill: {fileID: 0} 451 | level: 0 452 | selfStatusEffectsWhenAttacking: [] 453 | enemyStatusEffectsWhenAttacking: [] 454 | selfStatusEffectsWhenAttacked: [] 455 | enemyStatusEffectsWhenAttacked: [] 456 | randomBonus: 457 | maxRandomStatsAmount: 0 458 | randomCharacterStats: 459 | minHp: 0 460 | maxHp: 0 461 | hpApplyRate: 0 462 | minHpRecovery: 0 463 | maxHpRecovery: 0 464 | hpRecoveryApplyRate: 0 465 | minHpLeechRate: 0 466 | maxHpLeechRate: 0 467 | hpLeechRateApplyRate: 0 468 | minMp: 0 469 | maxMp: 0 470 | mpApplyRate: 0 471 | minMpRecovery: 0 472 | maxMpRecovery: 0 473 | mpRecoveryApplyRate: 0 474 | minMpLeechRate: 0 475 | maxMpLeechRate: 0 476 | mpLeechRateApplyRate: 0 477 | minStamina: 0 478 | maxStamina: 0 479 | staminaApplyRate: 0 480 | minStaminaRecovery: 0 481 | maxStaminaRecovery: 0 482 | staminaRecoveryApplyRate: 0 483 | minStaminaLeechRate: 0 484 | maxStaminaLeechRate: 0 485 | staminaLeechRateApplyRate: 0 486 | minFood: 0 487 | maxFood: 0 488 | foodApplyRate: 0 489 | minWater: 0 490 | maxWater: 0 491 | waterApplyRate: 0 492 | minAccuracy: 0 493 | maxAccuracy: 0 494 | accuracyApplyRate: 0 495 | minEvasion: 0 496 | maxEvasion: 0 497 | evasionApplyRate: 0 498 | minCriRate: 0 499 | maxCriRate: 0 500 | criRateApplyRate: 0 501 | minCriDmgRate: 0 502 | maxCriDmgRate: 0 503 | criDmgRateApplyRate: 0 504 | minBlockRate: 0 505 | maxBlockRate: 0 506 | blockRateApplyRate: 0 507 | minBlockDmgRate: 0 508 | maxBlockDmgRate: 0 509 | blockDmgRateApplyRate: 0 510 | minMoveSpeed: 0 511 | maxMoveSpeed: 0 512 | moveSpeedApplyRate: 0 513 | minAtkSpeed: 0 514 | maxAtkSpeed: 0 515 | atkSpeedApplyRate: 0 516 | minWeightLimit: 0 517 | maxWeightLimit: 0 518 | weightLimitApplyRate: 0 519 | minSlotLimit: 0 520 | maxSlotLimit: 0 521 | slotLimitApplyRate: 0 522 | minGoldRate: 0 523 | maxGoldRate: 0 524 | goldRateApplyRate: 0 525 | minExpRate: 0 526 | maxExpRate: 0 527 | expRateApplyRate: 0 528 | randomCharacterStatsRate: 529 | minHp: 0 530 | maxHp: 0 531 | hpApplyRate: 0 532 | minHpRecovery: 0 533 | maxHpRecovery: 0 534 | hpRecoveryApplyRate: 0 535 | minHpLeechRate: 0 536 | maxHpLeechRate: 0 537 | hpLeechRateApplyRate: 0 538 | minMp: 0 539 | maxMp: 0 540 | mpApplyRate: 0 541 | minMpRecovery: 0 542 | maxMpRecovery: 0 543 | mpRecoveryApplyRate: 0 544 | minMpLeechRate: 0 545 | maxMpLeechRate: 0 546 | mpLeechRateApplyRate: 0 547 | minStamina: 0 548 | maxStamina: 0 549 | staminaApplyRate: 0 550 | minStaminaRecovery: 0 551 | maxStaminaRecovery: 0 552 | staminaRecoveryApplyRate: 0 553 | minStaminaLeechRate: 0 554 | maxStaminaLeechRate: 0 555 | staminaLeechRateApplyRate: 0 556 | minFood: 0 557 | maxFood: 0 558 | foodApplyRate: 0 559 | minWater: 0 560 | maxWater: 0 561 | waterApplyRate: 0 562 | minAccuracy: 0 563 | maxAccuracy: 0 564 | accuracyApplyRate: 0 565 | minEvasion: 0 566 | maxEvasion: 0 567 | evasionApplyRate: 0 568 | minCriRate: 0 569 | maxCriRate: 0 570 | criRateApplyRate: 0 571 | minCriDmgRate: 0 572 | maxCriDmgRate: 0 573 | criDmgRateApplyRate: 0 574 | minBlockRate: 0 575 | maxBlockRate: 0 576 | blockRateApplyRate: 0 577 | minBlockDmgRate: 0 578 | maxBlockDmgRate: 0 579 | blockDmgRateApplyRate: 0 580 | minMoveSpeed: 0 581 | maxMoveSpeed: 0 582 | moveSpeedApplyRate: 0 583 | minAtkSpeed: 0 584 | maxAtkSpeed: 0 585 | atkSpeedApplyRate: 0 586 | minWeightLimit: 0 587 | maxWeightLimit: 0 588 | weightLimitApplyRate: 0 589 | minSlotLimit: 0 590 | maxSlotLimit: 0 591 | slotLimitApplyRate: 0 592 | minGoldRate: 0 593 | maxGoldRate: 0 594 | goldRateApplyRate: 0 595 | minExpRate: 0 596 | maxExpRate: 0 597 | expRateApplyRate: 0 598 | randomAttributeAmounts: [] 599 | randomAttributeAmountRates: [] 600 | randomResistanceAmounts: [] 601 | randomArmorAmounts: [] 602 | randomDamageAmounts: [] 603 | randomSkillLevels: [] 604 | -------------------------------------------------------------------------------- /Scripts/AnimatorCharacterModelUMA.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | using Playables = MultiplayerARPG.GameData.Model.Playables; 5 | using UMA; 6 | using UMA.CharacterSystem; 7 | using Cysharp.Threading.Tasks; 8 | 9 | namespace MultiplayerARPG 10 | { 11 | [RequireComponent(typeof(DynamicCharacterAvatar))] 12 | public class AnimatorCharacterModelUMA : AnimatorCharacterModel, ICharacterModelUma 13 | { 14 | private DynamicCharacterAvatar _cacheUmaAvatar; 15 | public DynamicCharacterAvatar CacheUmaAvatar 16 | { 17 | get 18 | { 19 | if (_cacheUmaAvatar == null) 20 | _cacheUmaAvatar = GetComponent(); 21 | return _cacheUmaAvatar; 22 | } 23 | } 24 | 25 | private UMAData _cacheUmaData; 26 | public UMAData CacheUmaData 27 | { 28 | get 29 | { 30 | if (_cacheUmaData == null) 31 | _cacheUmaData = GetComponent(); 32 | return _cacheUmaData; 33 | } 34 | } 35 | 36 | public bool IsUmaCharacterCreated { get; private set; } 37 | public bool IsInitializedUMA { get; private set; } 38 | public System.Action OnUmaCharacterCreated { get; set; } 39 | 40 | private UmaAvatarData? _applyingAvatarData; 41 | private Coroutine _applyCoroutine; 42 | 43 | private readonly HashSet _equipWeaponUsedSlots = new HashSet(); 44 | private readonly HashSet _equipItemUsedSlots = new HashSet(); 45 | private readonly List _equipRightWeaponObjects = new List(); 46 | private readonly List _equipLeftWeaponObjects = new List(); 47 | private readonly List _equipItemObjects = new List(); 48 | private EquipWeapons _prevEquipWeapons; 49 | 50 | private void Start() 51 | { 52 | InitializeUMA(); 53 | } 54 | 55 | public override async void SetEquipItems(IList equipItems, IList selectableWeaponSets, byte equipWeaponSet, bool isWeaponsSheathed) 56 | { 57 | if (!IsUmaCharacterCreated) 58 | { 59 | // Store data to re-setup later 60 | EquipItems = equipItems; 61 | SelectableWeaponSets = selectableWeaponSets; 62 | EquipWeaponSet = equipWeaponSet; 63 | IsWeaponsSheathed = isWeaponsSheathed; 64 | return; 65 | } 66 | 67 | ClearObjectsAndSlots(_equipItemUsedSlots, _equipItemObjects); 68 | 69 | if (CacheUmaAvatar.activeRace == null || 70 | CacheUmaAvatar.activeRace.racedata == null) 71 | { 72 | // Store data to re-setup later 73 | EquipItems = equipItems; 74 | SelectableWeaponSets = selectableWeaponSets; 75 | EquipWeaponSet = equipWeaponSet; 76 | IsWeaponsSheathed = isWeaponsSheathed; 77 | return; 78 | } 79 | 80 | string raceName = CacheUmaAvatar.activeRace.racedata.raceName; 81 | IEquipmentItem tempEquipmentItem; 82 | UMATextRecipe[] receipes; 83 | BaseEquipmentEntity tempEquipmentEntity; 84 | foreach (CharacterItem equipItem in equipItems) 85 | { 86 | tempEquipmentItem = equipItem.GetEquipmentItem(); 87 | if (tempEquipmentItem == null) 88 | continue; 89 | 90 | tempEquipmentEntity = await SetEquipmentObject(_equipItemObjects, tempEquipmentItem.EquipmentModels, equipItem.level); 91 | 92 | if (!tempEquipmentItem.UmaRecipeSlot.TryGetValue(raceName, out receipes)) 93 | continue; 94 | 95 | SetSlot(_equipItemUsedSlots, receipes); 96 | } 97 | 98 | // Prepare equip weapons 99 | EquipWeapons newEquipWeapons; 100 | if (isWeaponsSheathed || selectableWeaponSets == null || selectableWeaponSets.Count == 0) 101 | { 102 | newEquipWeapons = new EquipWeapons(); 103 | } 104 | else 105 | { 106 | if (equipWeaponSet >= selectableWeaponSets.Count) 107 | { 108 | // Issues occuring, so try to simulate data 109 | // Create a new list to make sure that changes won't be applied to the source list (the source list must be readonly) 110 | selectableWeaponSets = new List(selectableWeaponSets); 111 | while (equipWeaponSet >= selectableWeaponSets.Count) 112 | { 113 | selectableWeaponSets.Add(new EquipWeapons()); 114 | } 115 | } 116 | newEquipWeapons = selectableWeaponSets[equipWeaponSet].Clone(); 117 | } 118 | 119 | bool rightIsDiffer; 120 | bool leftIsDiffer; 121 | _prevEquipWeapons.IsDiffer(newEquipWeapons, out rightIsDiffer, out leftIsDiffer); 122 | _prevEquipWeapons = newEquipWeapons; 123 | 124 | // Update weapon 125 | BaseEquipmentEntity baseEquipmentEntity; 126 | // Setup right hand weapon 127 | if (rightIsDiffer) 128 | { 129 | for (int i = 0; i < _equipRightWeaponObjects.Count; ++i) 130 | { 131 | if (_equipRightWeaponObjects[i] == null) continue; 132 | Destroy(_equipRightWeaponObjects[i].gameObject); 133 | } 134 | _equipRightWeaponObjects.Clear(); 135 | tempEquipmentItem = newEquipWeapons.rightHand.GetWeaponItem(); 136 | if (tempEquipmentItem != null) 137 | { 138 | baseEquipmentEntity = await SetEquipmentObject(_equipRightWeaponObjects, tempEquipmentItem.EquipmentModels, newEquipWeapons.rightHand.level); 139 | CacheRightHandEquipmentEntity = baseEquipmentEntity; 140 | if (tempEquipmentItem.UmaRecipeSlot.TryGetValue(raceName, out receipes)) 141 | SetSlot(_equipWeaponUsedSlots, receipes); 142 | } 143 | } 144 | 145 | // Setup left hand weapon 146 | if (leftIsDiffer) 147 | { 148 | for (int i = 0; i < _equipLeftWeaponObjects.Count; ++i) 149 | { 150 | if (_equipLeftWeaponObjects[i] == null) continue; 151 | Destroy(_equipLeftWeaponObjects[i].gameObject); 152 | } 153 | _equipLeftWeaponObjects.Clear(); 154 | // Weapon 155 | tempEquipmentItem = newEquipWeapons.leftHand.GetWeaponItem(); 156 | if (tempEquipmentItem != null) 157 | { 158 | baseEquipmentEntity = await SetEquipmentObject(_equipLeftWeaponObjects, (tempEquipmentItem as IWeaponItem).OffHandEquipmentModels, newEquipWeapons.leftHand.level); 159 | CacheLeftHandEquipmentEntity = baseEquipmentEntity; 160 | if (tempEquipmentItem.UmaRecipeSlot.TryGetValue(raceName, out receipes)) 161 | SetSlot(_equipWeaponUsedSlots, receipes); 162 | } 163 | // Shield 164 | tempEquipmentItem = newEquipWeapons.leftHand.GetShieldItem(); 165 | if (tempEquipmentItem != null) 166 | { 167 | baseEquipmentEntity = await SetEquipmentObject(_equipLeftWeaponObjects, tempEquipmentItem.EquipmentModels, newEquipWeapons.leftHand.level); 168 | CacheLeftHandEquipmentEntity = baseEquipmentEntity; 169 | if (tempEquipmentItem.UmaRecipeSlot.TryGetValue(raceName, out receipes)) 170 | SetSlot(_equipWeaponUsedSlots, receipes); 171 | } 172 | } 173 | 174 | SetClipBasedOnWeapon(newEquipWeapons); 175 | 176 | // Update avatar 177 | CacheUmaAvatar.BuildCharacter(true); 178 | CacheUmaAvatar.ForceUpdate(true, true, true); 179 | 180 | EquipItems = equipItems; 181 | SelectableWeaponSets = selectableWeaponSets; 182 | EquipWeaponSet = equipWeaponSet; 183 | IsWeaponsSheathed = isWeaponsSheathed; 184 | } 185 | 186 | private void ClearObjectsAndSlots(HashSet usedSlotsSet, List objectsList) 187 | { 188 | foreach (string usedSlotSet in usedSlotsSet) 189 | { 190 | CacheUmaAvatar.ClearSlot(usedSlotSet); 191 | } 192 | usedSlotsSet.Clear(); 193 | 194 | foreach (GameObject objectList in objectsList) 195 | { 196 | Destroy(objectList); 197 | } 198 | objectsList.Clear(); 199 | } 200 | 201 | private async UniTask SetEquipmentObject(List objectsList, EquipmentModel[] equipmentModels, int level) 202 | { 203 | BaseEquipmentEntity equipmentEntity = null; 204 | if (objectsList == null || equipmentModels == null || equipmentModels.Length == 0) 205 | return equipmentEntity; 206 | 207 | GameObject boneObj; 208 | GameObject tempEquipmentObject; 209 | BaseEquipmentEntity tempEquipmentEntity; 210 | foreach (EquipmentModel equipmentModel in equipmentModels) 211 | { 212 | GameObject meshPrefab = await equipmentModel.GetMeshPrefab(); 213 | if (string.IsNullOrEmpty(equipmentModel.equipSocket) || 214 | meshPrefab == null) 215 | { 216 | // If data is empty, skip it 217 | continue; 218 | } 219 | 220 | boneObj = CacheUmaData.GetBoneGameObject(equipmentModel.equipSocket); 221 | if (boneObj == null) 222 | continue; 223 | 224 | tempEquipmentObject = Instantiate(meshPrefab); 225 | tempEquipmentObject.transform.SetParent(boneObj.transform, false); 226 | tempEquipmentObject.transform.localPosition = equipmentModel.localPosition; 227 | tempEquipmentObject.transform.localEulerAngles = equipmentModel.localEulerAngles; 228 | tempEquipmentObject.transform.localScale = equipmentModel.localScale; 229 | tempEquipmentObject.gameObject.SetActive(true); 230 | tempEquipmentObject.gameObject.SetLayerRecursively(EquipmentLayer, true); 231 | tempEquipmentObject.RemoveComponentsInChildren(false); 232 | tempEquipmentEntity = tempEquipmentObject.GetComponent(); 233 | if (tempEquipmentEntity != null) 234 | { 235 | tempEquipmentEntity.Setup(this, equipmentModel.equipPosition, equipmentModel.item); 236 | if (equipmentEntity == null) 237 | equipmentEntity = tempEquipmentEntity; 238 | } 239 | 240 | objectsList.Add(tempEquipmentObject); 241 | } 242 | 243 | return equipmentEntity; 244 | } 245 | 246 | private void SetSlot(HashSet usedSlotsSet, UMATextRecipe[] receipes) 247 | { 248 | if (usedSlotsSet == null || receipes == null || receipes.Length == 0) 249 | return; 250 | 251 | foreach (UMATextRecipe receipeSlot in receipes) 252 | { 253 | if (receipeSlot == null || 254 | string.IsNullOrEmpty(receipeSlot.wardrobeSlot) || 255 | usedSlotsSet.Contains(receipeSlot.wardrobeSlot)) 256 | { 257 | // If data is empty or slot already used, skip it 258 | continue; 259 | } 260 | usedSlotsSet.Add(receipeSlot.wardrobeSlot); 261 | CacheUmaAvatar.SetSlot(receipeSlot); 262 | } 263 | } 264 | 265 | public void InitializeUMA() 266 | { 267 | if (IsInitializedUMA) 268 | return; 269 | IsInitializedUMA = true; 270 | CacheUmaAvatar.CharacterCreated.RemoveListener(OnUmaCharacterCreatedCallback); 271 | CacheUmaAvatar.CharacterCreated.AddListener(OnUmaCharacterCreatedCallback); 272 | } 273 | 274 | private void OnUmaCharacterCreatedCallback(UMAData data) 275 | { 276 | IsUmaCharacterCreated = true; 277 | ApplyPendingAvatarData(); 278 | if (OnUmaCharacterCreated != null) 279 | OnUmaCharacterCreated.Invoke(); 280 | } 281 | 282 | public void ApplyUmaAvatar(UmaAvatarData avatarData) 283 | { 284 | if (CacheUmaAvatar == null) 285 | { 286 | Debug.LogWarning("[CharacterModelUMA] Uma avatar or applier is empty, cannot change avatar appearances"); 287 | return; 288 | } 289 | InitializeUMA(); 290 | if (!IsUmaCharacterCreated) 291 | { 292 | _applyingAvatarData = avatarData; 293 | return; 294 | } 295 | if (_applyCoroutine != null) 296 | StopCoroutine(_applyCoroutine); 297 | _applyCoroutine = StartCoroutine(ApplyUmaAvatarRoutine(avatarData)); 298 | } 299 | 300 | IEnumerator ApplyUmaAvatarRoutine(UmaAvatarData avatarData) 301 | { 302 | int i; 303 | UmaRace race = CurrentGameInstance.UmaRaces[avatarData.raceIndex]; 304 | UmaRaceGender gender = race.genders[avatarData.genderIndex]; 305 | CacheUmaAvatar.ChangeRace(gender.raceData.raceName); 306 | yield return null; 307 | // Set character hair, beard, eyebrows (or other things up to your settings) 308 | if (avatarData.slots != null) 309 | { 310 | Dictionary> recipes = CacheUmaAvatar.AvailableRecipes; 311 | string slotName; 312 | for (i = 0; i < gender.customizableSlots.Length; ++i) 313 | { 314 | if (i >= avatarData.slots.Length) 315 | break; 316 | slotName = gender.customizableSlots[i].name; 317 | CacheUmaAvatar.SetSlot(recipes[slotName][avatarData.slots[i]]); 318 | } 319 | } 320 | // Set skin color, eyes color, hair color (or other things up to your settings) 321 | if (avatarData.colors != null) 322 | { 323 | SharedColorTable colorTable; 324 | for (i = 0; i < race.colorTables.Length; ++i) 325 | { 326 | if (i >= avatarData.colors.Length) 327 | break; 328 | colorTable = race.colorTables[i]; 329 | CacheUmaAvatar.SetColor(colorTable.sharedColorName, colorTable.colors[avatarData.colors[i]]); 330 | } 331 | } 332 | // Set equip items if it is already set 333 | SetEquipItems(EquipItems, SelectableWeaponSets, EquipWeaponSet, IsWeaponsSheathed); 334 | 335 | // Update avatar 336 | CacheUmaAvatar.BuildCharacter(true); 337 | CacheUmaAvatar.ForceUpdate(true, true, true); 338 | yield return null; 339 | // Set character dna 340 | if (avatarData.dnas != null) 341 | { 342 | Dictionary dnas = null; 343 | while (dnas == null || dnas.Count == 0) 344 | { 345 | dnas = CacheUmaAvatar.GetDNA(); 346 | yield return null; 347 | } 348 | List dnaNames = new List(dnas.Keys); 349 | dnaNames.Sort(); 350 | string dnaName; 351 | for (i = 0; i < dnaNames.Count; ++i) 352 | { 353 | if (i >= avatarData.dnas.Length) 354 | break; 355 | dnaName = dnaNames[i]; 356 | dnas[dnaName].Set(avatarData.dnas[i] * 0.01f); 357 | } 358 | } 359 | // Update avatar after set dna 360 | CacheUmaAvatar.ForceUpdate(true, false, false); 361 | } 362 | 363 | public void ApplyPendingAvatarData() 364 | { 365 | if (_applyingAvatarData.HasValue) 366 | { 367 | ApplyUmaAvatar(_applyingAvatarData.Value); 368 | _applyingAvatarData = null; 369 | } 370 | } 371 | 372 | #if UNITY_EDITOR 373 | public override void ConvertToPlayableCharacterModelImplement() 374 | { 375 | ConvertToPlayableCharacterModelGeneric(); 376 | } 377 | #endif 378 | } 379 | } -------------------------------------------------------------------------------- /Scripts/PlayableCharacterModelUMA.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | using UMA; 5 | using UMA.CharacterSystem; 6 | using Cysharp.Threading.Tasks; 7 | 8 | namespace MultiplayerARPG.GameData.Model.Playables 9 | { 10 | [RequireComponent(typeof(DynamicCharacterAvatar))] 11 | public class PlayableCharacterModelUMA : PlayableCharacterModel, ICharacterModelUma 12 | { 13 | private DynamicCharacterAvatar _cacheUmaAvatar; 14 | public DynamicCharacterAvatar CacheUmaAvatar 15 | { 16 | get 17 | { 18 | if (_cacheUmaAvatar == null) 19 | _cacheUmaAvatar = GetComponent(); 20 | return _cacheUmaAvatar; 21 | } 22 | } 23 | 24 | private UMAData _cacheUmaData; 25 | public UMAData CacheUmaData 26 | { 27 | get 28 | { 29 | if (_cacheUmaData == null) 30 | _cacheUmaData = GetComponent(); 31 | return _cacheUmaData; 32 | } 33 | } 34 | 35 | public bool IsUmaCharacterCreated { get; private set; } 36 | public bool IsInitializedUMA { get; private set; } 37 | public System.Action OnUmaCharacterCreated { get; set; } 38 | 39 | private UmaAvatarData? _applyingAvatarData; 40 | private Coroutine _applyCoroutine; 41 | 42 | private readonly HashSet _equipWeaponUsedSlots = new HashSet(); 43 | private readonly HashSet _equipItemUsedSlots = new HashSet(); 44 | private readonly List _equipRightWeaponObjects = new List(); 45 | private readonly List _equipLeftWeaponObjects = new List(); 46 | private readonly List _equipItemObjects = new List(); 47 | private EquipWeapons _prevEquipWeapons; 48 | 49 | protected override void Awake() 50 | { 51 | base.Awake(); 52 | if (animator != null && animator.runtimeAnimatorController == null) 53 | animator.runtimeAnimatorController = Resources.Load("__EmptyAnimatorControllerForUMAIntegration"); 54 | } 55 | 56 | protected override void Start() 57 | { 58 | base.Start(); 59 | InitializeUMA(); 60 | } 61 | 62 | public override async void SetEquipItems(IList equipItems, IList selectableWeaponSets, byte equipWeaponSet, bool isWeaponsSheathed) 63 | { 64 | if (!IsUmaCharacterCreated) 65 | { 66 | // Store data to re-setup later 67 | EquipItems = equipItems; 68 | SelectableWeaponSets = selectableWeaponSets; 69 | EquipWeaponSet = equipWeaponSet; 70 | IsWeaponsSheathed = isWeaponsSheathed; 71 | return; 72 | } 73 | 74 | ClearObjectsAndSlots(_equipItemUsedSlots, _equipItemObjects); 75 | 76 | if (CacheUmaAvatar.activeRace == null || 77 | CacheUmaAvatar.activeRace.racedata == null) 78 | { 79 | // Store data to re-setup later 80 | EquipItems = equipItems; 81 | SelectableWeaponSets = selectableWeaponSets; 82 | EquipWeaponSet = equipWeaponSet; 83 | IsWeaponsSheathed = isWeaponsSheathed; 84 | return; 85 | } 86 | 87 | string raceName = CacheUmaAvatar.activeRace.racedata.raceName; 88 | IEquipmentItem tempEquipmentItem; 89 | UMATextRecipe[] receipes; 90 | BaseEquipmentEntity tempEquipmentEntity; 91 | foreach (CharacterItem equipItem in equipItems) 92 | { 93 | tempEquipmentItem = equipItem.GetEquipmentItem(); 94 | if (tempEquipmentItem == null) 95 | continue; 96 | 97 | tempEquipmentEntity = await SetEquipmentObject(_equipItemObjects, tempEquipmentItem.EquipmentModels, equipItem.level); 98 | 99 | if (!tempEquipmentItem.UmaRecipeSlot.TryGetValue(raceName, out receipes)) 100 | continue; 101 | 102 | SetSlot(_equipItemUsedSlots, receipes); 103 | } 104 | 105 | // Prepare equip weapons 106 | EquipWeapons newEquipWeapons; 107 | if (isWeaponsSheathed || selectableWeaponSets == null || selectableWeaponSets.Count == 0) 108 | { 109 | newEquipWeapons = new EquipWeapons(); 110 | } 111 | else 112 | { 113 | if (equipWeaponSet >= selectableWeaponSets.Count) 114 | { 115 | // Issues occuring, so try to simulate data 116 | // Create a new list to make sure that changes won't be applied to the source list (the source list must be readonly) 117 | selectableWeaponSets = new List(selectableWeaponSets); 118 | while (equipWeaponSet >= selectableWeaponSets.Count) 119 | { 120 | selectableWeaponSets.Add(new EquipWeapons()); 121 | } 122 | } 123 | newEquipWeapons = selectableWeaponSets[equipWeaponSet].Clone(); 124 | } 125 | 126 | bool rightIsDiffer; 127 | bool leftIsDiffer; 128 | _prevEquipWeapons.IsDiffer(newEquipWeapons, out rightIsDiffer, out leftIsDiffer); 129 | _prevEquipWeapons = newEquipWeapons; 130 | 131 | // Update weapon 132 | BaseEquipmentEntity baseEquipmentEntity; 133 | // Setup right hand weapon 134 | if (rightIsDiffer) 135 | { 136 | for (int i = 0; i < _equipRightWeaponObjects.Count; ++i) 137 | { 138 | if (_equipRightWeaponObjects[i] == null) continue; 139 | Destroy(_equipRightWeaponObjects[i].gameObject); 140 | } 141 | _equipRightWeaponObjects.Clear(); 142 | tempEquipmentItem = newEquipWeapons.rightHand.GetWeaponItem(); 143 | if (tempEquipmentItem != null) 144 | { 145 | baseEquipmentEntity = await SetEquipmentObject(_equipRightWeaponObjects, tempEquipmentItem.EquipmentModels, newEquipWeapons.rightHand.level); 146 | CacheRightHandEquipmentEntity = baseEquipmentEntity; 147 | if (tempEquipmentItem.UmaRecipeSlot.TryGetValue(raceName, out receipes)) 148 | SetSlot(_equipWeaponUsedSlots, receipes); 149 | } 150 | } 151 | 152 | // Setup left hand weapon 153 | if (leftIsDiffer) 154 | { 155 | for (int i = 0; i < _equipLeftWeaponObjects.Count; ++i) 156 | { 157 | if (_equipLeftWeaponObjects[i] == null) continue; 158 | Destroy(_equipLeftWeaponObjects[i].gameObject); 159 | } 160 | _equipLeftWeaponObjects.Clear(); 161 | // Weapon 162 | tempEquipmentItem = newEquipWeapons.leftHand.GetWeaponItem(); 163 | if (tempEquipmentItem != null) 164 | { 165 | baseEquipmentEntity = await SetEquipmentObject(_equipLeftWeaponObjects, (tempEquipmentItem as IWeaponItem).OffHandEquipmentModels, newEquipWeapons.leftHand.level); 166 | CacheLeftHandEquipmentEntity = baseEquipmentEntity; 167 | if (tempEquipmentItem.UmaRecipeSlot.TryGetValue(raceName, out receipes)) 168 | SetSlot(_equipWeaponUsedSlots, receipes); 169 | } 170 | // Shield 171 | tempEquipmentItem = newEquipWeapons.leftHand.GetShieldItem(); 172 | if (tempEquipmentItem != null) 173 | { 174 | baseEquipmentEntity = await SetEquipmentObject(_equipLeftWeaponObjects, tempEquipmentItem.EquipmentModels, newEquipWeapons.leftHand.level); 175 | CacheLeftHandEquipmentEntity = baseEquipmentEntity; 176 | if (tempEquipmentItem.UmaRecipeSlot.TryGetValue(raceName, out receipes)) 177 | SetSlot(_equipWeaponUsedSlots, receipes); 178 | } 179 | } 180 | 181 | // Get one equipped weapon from right-hand or left-hand 182 | IWeaponItem rightWeaponItem = newEquipWeapons.GetRightHandWeaponItem(); 183 | IWeaponItem leftWeaponItem = newEquipWeapons.GetLeftHandWeaponItem(); 184 | if (rightWeaponItem == null) 185 | rightWeaponItem = leftWeaponItem; 186 | // Set equipped weapon type, it will be used to get animations by id 187 | _equippedWeaponType = null; 188 | if (rightWeaponItem != null) 189 | _equippedWeaponType = rightWeaponItem.WeaponType; 190 | if (Behaviour != null) 191 | Behaviour.SetEquipWeapons(rightWeaponItem, leftWeaponItem, newEquipWeapons.GetLeftHandShieldItem()); 192 | 193 | // Update avatar 194 | CacheUmaAvatar.BuildCharacter(true); 195 | CacheUmaAvatar.ForceUpdate(true, true, true); 196 | 197 | EquipItems = equipItems; 198 | SelectableWeaponSets = selectableWeaponSets; 199 | EquipWeaponSet = equipWeaponSet; 200 | IsWeaponsSheathed = isWeaponsSheathed; 201 | } 202 | 203 | private void ClearObjectsAndSlots(HashSet usedSlotsSet, List objectsList) 204 | { 205 | foreach (string usedSlotSet in usedSlotsSet) 206 | { 207 | CacheUmaAvatar.ClearSlot(usedSlotSet); 208 | } 209 | usedSlotsSet.Clear(); 210 | 211 | foreach (GameObject objectList in objectsList) 212 | { 213 | Destroy(objectList); 214 | } 215 | objectsList.Clear(); 216 | } 217 | 218 | private async UniTask SetEquipmentObject(List objectsList, EquipmentModel[] equipmentModels, int level) 219 | { 220 | BaseEquipmentEntity equipmentEntity = null; 221 | if (objectsList == null || equipmentModels == null || equipmentModels.Length == 0) 222 | return equipmentEntity; 223 | 224 | GameObject boneObj; 225 | GameObject tempEquipmentObject; 226 | BaseEquipmentEntity tempEquipmentEntity; 227 | foreach (EquipmentModel equipmentModel in equipmentModels) 228 | { 229 | GameObject meshPrefab = await equipmentModel.GetMeshPrefab(); 230 | if (string.IsNullOrEmpty(equipmentModel.equipSocket) || 231 | meshPrefab == null) 232 | { 233 | // If data is empty, skip it 234 | continue; 235 | } 236 | 237 | boneObj = CacheUmaData.GetBoneGameObject(equipmentModel.equipSocket); 238 | if (boneObj == null) 239 | continue; 240 | 241 | tempEquipmentObject = Instantiate(meshPrefab); 242 | tempEquipmentObject.transform.SetParent(boneObj.transform, false); 243 | tempEquipmentObject.transform.localPosition = equipmentModel.localPosition; 244 | tempEquipmentObject.transform.localEulerAngles = equipmentModel.localEulerAngles; 245 | tempEquipmentObject.transform.localScale = equipmentModel.localScale; 246 | tempEquipmentObject.gameObject.SetActive(true); 247 | tempEquipmentObject.gameObject.SetLayerRecursively(EquipmentLayer, true); 248 | tempEquipmentObject.RemoveComponentsInChildren(false); 249 | tempEquipmentEntity = tempEquipmentObject.GetComponent(); 250 | if (tempEquipmentEntity != null) 251 | { 252 | tempEquipmentEntity.Setup(this, equipmentModel.equipPosition, equipmentModel.item); 253 | if (equipmentEntity == null) 254 | equipmentEntity = tempEquipmentEntity; 255 | } 256 | 257 | objectsList.Add(tempEquipmentObject); 258 | } 259 | 260 | return equipmentEntity; 261 | } 262 | 263 | private void SetSlot(HashSet usedSlotsSet, UMATextRecipe[] receipes) 264 | { 265 | if (usedSlotsSet == null || receipes == null || receipes.Length == 0) 266 | return; 267 | 268 | foreach (UMATextRecipe receipeSlot in receipes) 269 | { 270 | if (receipeSlot == null || 271 | string.IsNullOrEmpty(receipeSlot.wardrobeSlot) || 272 | usedSlotsSet.Contains(receipeSlot.wardrobeSlot)) 273 | { 274 | // If data is empty or slot already used, skip it 275 | continue; 276 | } 277 | usedSlotsSet.Add(receipeSlot.wardrobeSlot); 278 | CacheUmaAvatar.SetSlot(receipeSlot); 279 | } 280 | } 281 | 282 | public void InitializeUMA() 283 | { 284 | if (IsInitializedUMA) 285 | return; 286 | IsInitializedUMA = true; 287 | CacheUmaAvatar.CharacterCreated.RemoveListener(OnUmaCharacterCreatedCallback); 288 | CacheUmaAvatar.CharacterCreated.AddListener(OnUmaCharacterCreatedCallback); 289 | } 290 | 291 | private void OnUmaCharacterCreatedCallback(UMAData data) 292 | { 293 | IsUmaCharacterCreated = true; 294 | ApplyPendingAvatarData(); 295 | if (OnUmaCharacterCreated != null) 296 | OnUmaCharacterCreated.Invoke(); 297 | } 298 | 299 | public void ApplyUmaAvatar(UmaAvatarData avatarData) 300 | { 301 | if (CacheUmaAvatar == null) 302 | { 303 | Debug.LogWarning("[CharacterModelUMA] Uma avatar or applier is empty, cannot change avatar appearances"); 304 | return; 305 | } 306 | InitializeUMA(); 307 | if (!IsUmaCharacterCreated) 308 | { 309 | _applyingAvatarData = avatarData; 310 | return; 311 | } 312 | if (_applyCoroutine != null) 313 | StopCoroutine(_applyCoroutine); 314 | _applyCoroutine = StartCoroutine(ApplyUmaAvatarRoutine(avatarData)); 315 | } 316 | 317 | IEnumerator ApplyUmaAvatarRoutine(UmaAvatarData avatarData) 318 | { 319 | int i; 320 | UmaRace race = CurrentGameInstance.UmaRaces[avatarData.raceIndex]; 321 | UmaRaceGender gender = race.genders[avatarData.genderIndex]; 322 | CacheUmaAvatar.ChangeRace(gender.raceData.raceName); 323 | yield return null; 324 | // Set character hair, beard, eyebrows (or other things up to your settings) 325 | if (avatarData.slots != null) 326 | { 327 | Dictionary> recipes = CacheUmaAvatar.AvailableRecipes; 328 | string slotName; 329 | for (i = 0; i < gender.customizableSlots.Length; ++i) 330 | { 331 | if (i >= avatarData.slots.Length) 332 | break; 333 | slotName = gender.customizableSlots[i].name; 334 | CacheUmaAvatar.SetSlot(recipes[slotName][avatarData.slots[i]]); 335 | } 336 | } 337 | // Set skin color, eyes color, hair color (or other things up to your settings) 338 | if (avatarData.colors != null) 339 | { 340 | SharedColorTable colorTable; 341 | for (i = 0; i < race.colorTables.Length; ++i) 342 | { 343 | if (i >= avatarData.colors.Length) 344 | break; 345 | colorTable = race.colorTables[i]; 346 | CacheUmaAvatar.SetColor(colorTable.sharedColorName, colorTable.colors[avatarData.colors[i]]); 347 | } 348 | } 349 | // Set equip items if it is already set 350 | SetEquipItems(EquipItems, SelectableWeaponSets, EquipWeaponSet, IsWeaponsSheathed); 351 | 352 | // Update avatar 353 | CacheUmaAvatar.BuildCharacter(true); 354 | CacheUmaAvatar.ForceUpdate(true, true, true); 355 | yield return null; 356 | // Set character dna 357 | if (avatarData.dnas != null) 358 | { 359 | Dictionary dnas = null; 360 | while (dnas == null || dnas.Count == 0) 361 | { 362 | dnas = CacheUmaAvatar.GetDNA(); 363 | yield return null; 364 | } 365 | List dnaNames = new List(dnas.Keys); 366 | dnaNames.Sort(); 367 | string dnaName; 368 | for (i = 0; i < dnaNames.Count; ++i) 369 | { 370 | if (i >= avatarData.dnas.Length) 371 | break; 372 | dnaName = dnaNames[i]; 373 | dnas[dnaName].Set(avatarData.dnas[i] * 0.01f); 374 | } 375 | } 376 | // Update avatar after set dna 377 | CacheUmaAvatar.ForceUpdate(true, false, false); 378 | } 379 | 380 | public void ApplyPendingAvatarData() 381 | { 382 | if (_applyingAvatarData.HasValue) 383 | { 384 | ApplyUmaAvatar(_applyingAvatarData.Value); 385 | _applyingAvatarData = null; 386 | } 387 | } 388 | } 389 | } -------------------------------------------------------------------------------- /Prefabs/UIDnaSlider.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1001 &100100000 4 | Prefab: 5 | m_ObjectHideFlags: 1 6 | serializedVersion: 2 7 | m_Modification: 8 | m_TransformParent: {fileID: 0} 9 | m_Modifications: [] 10 | m_RemovedComponents: [] 11 | m_SourcePrefab: {fileID: 0} 12 | m_RootGameObject: {fileID: 1612335102492062} 13 | m_IsPrefabAsset: 1 14 | --- !u!1 &1227499163195862 15 | GameObject: 16 | m_ObjectHideFlags: 1 17 | m_CorrespondingSourceObject: {fileID: 0} 18 | m_PrefabInternal: {fileID: 100100000} 19 | serializedVersion: 6 20 | m_Component: 21 | - component: {fileID: 224034587622972158} 22 | - component: {fileID: 222602932779585082} 23 | - component: {fileID: 114134352178218380} 24 | m_Layer: 5 25 | m_Name: Handle 26 | m_TagString: Untagged 27 | m_Icon: {fileID: 0} 28 | m_NavMeshLayer: 0 29 | m_StaticEditorFlags: 0 30 | m_IsActive: 1 31 | --- !u!1 &1495685782339972 32 | GameObject: 33 | m_ObjectHideFlags: 1 34 | m_CorrespondingSourceObject: {fileID: 0} 35 | m_PrefabInternal: {fileID: 100100000} 36 | serializedVersion: 6 37 | m_Component: 38 | - component: {fileID: 224953621513343872} 39 | - component: {fileID: 222375209937356800} 40 | - component: {fileID: 114442912732637354} 41 | m_Layer: 5 42 | m_Name: Fill 43 | m_TagString: Untagged 44 | m_Icon: {fileID: 0} 45 | m_NavMeshLayer: 0 46 | m_StaticEditorFlags: 0 47 | m_IsActive: 1 48 | --- !u!1 &1547419890944234 49 | GameObject: 50 | m_ObjectHideFlags: 1 51 | m_CorrespondingSourceObject: {fileID: 0} 52 | m_PrefabInternal: {fileID: 100100000} 53 | serializedVersion: 6 54 | m_Component: 55 | - component: {fileID: 224769787162223094} 56 | m_Layer: 5 57 | m_Name: Fill Area 58 | m_TagString: Untagged 59 | m_Icon: {fileID: 0} 60 | m_NavMeshLayer: 0 61 | m_StaticEditorFlags: 0 62 | m_IsActive: 1 63 | --- !u!1 &1568154944677326 64 | GameObject: 65 | m_ObjectHideFlags: 0 66 | m_CorrespondingSourceObject: {fileID: 0} 67 | m_PrefabInternal: {fileID: 100100000} 68 | serializedVersion: 6 69 | m_Component: 70 | - component: {fileID: 224541990902616662} 71 | - component: {fileID: 222796024086892788} 72 | - component: {fileID: 114791123609303828} 73 | - component: {fileID: 114584523072103714} 74 | - component: {fileID: 114562625460972410} 75 | m_Layer: 5 76 | m_Name: LabelTitle 77 | m_TagString: Untagged 78 | m_Icon: {fileID: 0} 79 | m_NavMeshLayer: 0 80 | m_StaticEditorFlags: 0 81 | m_IsActive: 1 82 | --- !u!1 &1612335102492062 83 | GameObject: 84 | m_ObjectHideFlags: 0 85 | m_CorrespondingSourceObject: {fileID: 0} 86 | m_PrefabInternal: {fileID: 100100000} 87 | serializedVersion: 6 88 | m_Component: 89 | - component: {fileID: 224012842923327066} 90 | - component: {fileID: 114302090696777032} 91 | - component: {fileID: 114251673724782010} 92 | m_Layer: 5 93 | m_Name: UIDnaSlider 94 | m_TagString: Untagged 95 | m_Icon: {fileID: 0} 96 | m_NavMeshLayer: 0 97 | m_StaticEditorFlags: 0 98 | m_IsActive: 1 99 | --- !u!1 &1751266090083732 100 | GameObject: 101 | m_ObjectHideFlags: 1 102 | m_CorrespondingSourceObject: {fileID: 0} 103 | m_PrefabInternal: {fileID: 100100000} 104 | serializedVersion: 6 105 | m_Component: 106 | - component: {fileID: 224616429189983300} 107 | m_Layer: 5 108 | m_Name: Handle Slide Area 109 | m_TagString: Untagged 110 | m_Icon: {fileID: 0} 111 | m_NavMeshLayer: 0 112 | m_StaticEditorFlags: 0 113 | m_IsActive: 1 114 | --- !u!1 &1843208922908790 115 | GameObject: 116 | m_ObjectHideFlags: 1 117 | m_CorrespondingSourceObject: {fileID: 0} 118 | m_PrefabInternal: {fileID: 100100000} 119 | serializedVersion: 6 120 | m_Component: 121 | - component: {fileID: 224657090989585492} 122 | - component: {fileID: 222258196134378798} 123 | - component: {fileID: 114066045467296262} 124 | m_Layer: 5 125 | m_Name: Background 126 | m_TagString: Untagged 127 | m_Icon: {fileID: 0} 128 | m_NavMeshLayer: 0 129 | m_StaticEditorFlags: 0 130 | m_IsActive: 1 131 | --- !u!1 &1876525975326690 132 | GameObject: 133 | m_ObjectHideFlags: 0 134 | m_CorrespondingSourceObject: {fileID: 0} 135 | m_PrefabInternal: {fileID: 100100000} 136 | serializedVersion: 6 137 | m_Component: 138 | - component: {fileID: 224713550013880250} 139 | - component: {fileID: 114562288982350952} 140 | m_Layer: 5 141 | m_Name: Slider 142 | m_TagString: Untagged 143 | m_Icon: {fileID: 0} 144 | m_NavMeshLayer: 0 145 | m_StaticEditorFlags: 0 146 | m_IsActive: 1 147 | --- !u!114 &114066045467296262 148 | MonoBehaviour: 149 | m_ObjectHideFlags: 1 150 | m_CorrespondingSourceObject: {fileID: 0} 151 | m_PrefabInternal: {fileID: 100100000} 152 | m_GameObject: {fileID: 1843208922908790} 153 | m_Enabled: 1 154 | m_EditorHideFlags: 0 155 | m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} 156 | m_Name: 157 | m_EditorClassIdentifier: 158 | m_Material: {fileID: 0} 159 | m_Color: {r: 0.8784314, g: 0.8784314, b: 0.8784314, a: 1} 160 | m_RaycastTarget: 1 161 | m_OnCullStateChanged: 162 | m_PersistentCalls: 163 | m_Calls: [] 164 | m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, 165 | Version=1.0.0.0, Culture=neutral, PublicKeyToken=null 166 | m_Sprite: {fileID: 21300000, guid: f72e834682cb1224d8ee12cc882a9420, type: 3} 167 | m_Type: 0 168 | m_PreserveAspect: 0 169 | m_FillCenter: 1 170 | m_FillMethod: 4 171 | m_FillAmount: 1 172 | m_FillClockwise: 1 173 | m_FillOrigin: 0 174 | --- !u!114 &114134352178218380 175 | MonoBehaviour: 176 | m_ObjectHideFlags: 1 177 | m_CorrespondingSourceObject: {fileID: 0} 178 | m_PrefabInternal: {fileID: 100100000} 179 | m_GameObject: {fileID: 1227499163195862} 180 | m_Enabled: 1 181 | m_EditorHideFlags: 0 182 | m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} 183 | m_Name: 184 | m_EditorClassIdentifier: 185 | m_Material: {fileID: 0} 186 | m_Color: {r: 1, g: 1, b: 1, a: 1} 187 | m_RaycastTarget: 1 188 | m_OnCullStateChanged: 189 | m_PersistentCalls: 190 | m_Calls: [] 191 | m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, 192 | Version=1.0.0.0, Culture=neutral, PublicKeyToken=null 193 | m_Sprite: {fileID: 21300000, guid: c330fa25d7995ce40ae0121750fb9a23, type: 3} 194 | m_Type: 0 195 | m_PreserveAspect: 0 196 | m_FillCenter: 1 197 | m_FillMethod: 4 198 | m_FillAmount: 1 199 | m_FillClockwise: 1 200 | m_FillOrigin: 0 201 | --- !u!114 &114251673724782010 202 | MonoBehaviour: 203 | m_ObjectHideFlags: 1 204 | m_CorrespondingSourceObject: {fileID: 0} 205 | m_PrefabInternal: {fileID: 100100000} 206 | m_GameObject: {fileID: 1612335102492062} 207 | m_Enabled: 1 208 | m_EditorHideFlags: 0 209 | m_Script: {fileID: 1679637790, guid: f70555f144d8491a825f0804e09c671c, type: 3} 210 | m_Name: 211 | m_EditorClassIdentifier: 212 | m_IgnoreLayout: 0 213 | m_MinWidth: -1 214 | m_MinHeight: -1 215 | m_PreferredWidth: -1 216 | m_PreferredHeight: 50 217 | m_FlexibleWidth: -1 218 | m_FlexibleHeight: -1 219 | m_LayoutPriority: 1 220 | --- !u!114 &114302090696777032 221 | MonoBehaviour: 222 | m_ObjectHideFlags: 1 223 | m_CorrespondingSourceObject: {fileID: 0} 224 | m_PrefabInternal: {fileID: 100100000} 225 | m_GameObject: {fileID: 1612335102492062} 226 | m_Enabled: 1 227 | m_EditorHideFlags: 0 228 | m_Script: {fileID: 11500000, guid: b3291e71160f9654ab983009e6b068d8, type: 3} 229 | m_Name: 230 | m_EditorClassIdentifier: 231 | textTitle: {fileID: 114562625460972410} 232 | slider: {fileID: 114562288982350952} 233 | --- !u!114 &114442912732637354 234 | MonoBehaviour: 235 | m_ObjectHideFlags: 1 236 | m_CorrespondingSourceObject: {fileID: 0} 237 | m_PrefabInternal: {fileID: 100100000} 238 | m_GameObject: {fileID: 1495685782339972} 239 | m_Enabled: 1 240 | m_EditorHideFlags: 0 241 | m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} 242 | m_Name: 243 | m_EditorClassIdentifier: 244 | m_Material: {fileID: 0} 245 | m_Color: {r: 0.7411765, g: 0.7411765, b: 0.7411765, a: 1} 246 | m_RaycastTarget: 1 247 | m_OnCullStateChanged: 248 | m_PersistentCalls: 249 | m_Calls: [] 250 | m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, 251 | Version=1.0.0.0, Culture=neutral, PublicKeyToken=null 252 | m_Sprite: {fileID: 21300000, guid: f72e834682cb1224d8ee12cc882a9420, type: 3} 253 | m_Type: 0 254 | m_PreserveAspect: 0 255 | m_FillCenter: 1 256 | m_FillMethod: 4 257 | m_FillAmount: 1 258 | m_FillClockwise: 1 259 | m_FillOrigin: 0 260 | --- !u!114 &114562288982350952 261 | MonoBehaviour: 262 | m_ObjectHideFlags: 1 263 | m_CorrespondingSourceObject: {fileID: 0} 264 | m_PrefabInternal: {fileID: 100100000} 265 | m_GameObject: {fileID: 1876525975326690} 266 | m_Enabled: 1 267 | m_EditorHideFlags: 0 268 | m_Script: {fileID: -113659843, guid: f70555f144d8491a825f0804e09c671c, type: 3} 269 | m_Name: 270 | m_EditorClassIdentifier: 271 | m_Navigation: 272 | m_Mode: 3 273 | m_SelectOnUp: {fileID: 0} 274 | m_SelectOnDown: {fileID: 0} 275 | m_SelectOnLeft: {fileID: 0} 276 | m_SelectOnRight: {fileID: 0} 277 | m_Transition: 1 278 | m_Colors: 279 | m_NormalColor: {r: 1, g: 1, b: 1, a: 1} 280 | m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} 281 | m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} 282 | m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} 283 | m_ColorMultiplier: 1 284 | m_FadeDuration: 0.1 285 | m_SpriteState: 286 | m_HighlightedSprite: {fileID: 0} 287 | m_PressedSprite: {fileID: 0} 288 | m_DisabledSprite: {fileID: 0} 289 | m_AnimationTriggers: 290 | m_NormalTrigger: Normal 291 | m_HighlightedTrigger: Highlighted 292 | m_PressedTrigger: Pressed 293 | m_DisabledTrigger: Disabled 294 | m_Interactable: 1 295 | m_TargetGraphic: {fileID: 114134352178218380} 296 | m_FillRect: {fileID: 224953621513343872} 297 | m_HandleRect: {fileID: 224034587622972158} 298 | m_Direction: 0 299 | m_MinValue: 0 300 | m_MaxValue: 1 301 | m_WholeNumbers: 0 302 | m_Value: 0.5 303 | m_OnValueChanged: 304 | m_PersistentCalls: 305 | m_Calls: [] 306 | m_TypeName: UnityEngine.UI.Slider+SliderEvent, UnityEngine.UI, Version=1.0.0.0, 307 | Culture=neutral, PublicKeyToken=null 308 | --- !u!114 &114562625460972410 309 | MonoBehaviour: 310 | m_ObjectHideFlags: 1 311 | m_CorrespondingSourceObject: {fileID: 0} 312 | m_PrefabInternal: {fileID: 100100000} 313 | m_GameObject: {fileID: 1568154944677326} 314 | m_Enabled: 1 315 | m_EditorHideFlags: 0 316 | m_Script: {fileID: 11500000, guid: d8355763b7cda344c9d206aa977ec27f, type: 3} 317 | m_Name: 318 | m_EditorClassIdentifier: 319 | unityText: {fileID: 114791123609303828} 320 | --- !u!114 &114584523072103714 321 | MonoBehaviour: 322 | m_ObjectHideFlags: 1 323 | m_CorrespondingSourceObject: {fileID: 0} 324 | m_PrefabInternal: {fileID: 100100000} 325 | m_GameObject: {fileID: 1568154944677326} 326 | m_Enabled: 1 327 | m_EditorHideFlags: 0 328 | m_Script: {fileID: -900027084, guid: f70555f144d8491a825f0804e09c671c, type: 3} 329 | m_Name: 330 | m_EditorClassIdentifier: 331 | m_EffectColor: {r: 0, g: 0, b: 0, a: 0.5} 332 | m_EffectDistance: {x: 1, y: -1} 333 | m_UseGraphicAlpha: 1 334 | --- !u!114 &114791123609303828 335 | MonoBehaviour: 336 | m_ObjectHideFlags: 1 337 | m_CorrespondingSourceObject: {fileID: 0} 338 | m_PrefabInternal: {fileID: 100100000} 339 | m_GameObject: {fileID: 1568154944677326} 340 | m_Enabled: 1 341 | m_EditorHideFlags: 0 342 | m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} 343 | m_Name: 344 | m_EditorClassIdentifier: 345 | m_Material: {fileID: 0} 346 | m_Color: {r: 1, g: 1, b: 1, a: 1} 347 | m_RaycastTarget: 1 348 | m_OnCullStateChanged: 349 | m_PersistentCalls: 350 | m_Calls: [] 351 | m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, 352 | Version=1.0.0.0, Culture=neutral, PublicKeyToken=null 353 | m_FontData: 354 | m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} 355 | m_FontSize: 14 356 | m_FontStyle: 1 357 | m_BestFit: 0 358 | m_MinSize: 10 359 | m_MaxSize: 40 360 | m_Alignment: 0 361 | m_AlignByGeometry: 0 362 | m_RichText: 1 363 | m_HorizontalOverflow: 0 364 | m_VerticalOverflow: 0 365 | m_LineSpacing: 1 366 | m_Text: Title 367 | --- !u!222 &222258196134378798 368 | CanvasRenderer: 369 | m_ObjectHideFlags: 1 370 | m_CorrespondingSourceObject: {fileID: 0} 371 | m_PrefabInternal: {fileID: 100100000} 372 | m_GameObject: {fileID: 1843208922908790} 373 | m_CullTransparentMesh: 0 374 | --- !u!222 &222375209937356800 375 | CanvasRenderer: 376 | m_ObjectHideFlags: 1 377 | m_CorrespondingSourceObject: {fileID: 0} 378 | m_PrefabInternal: {fileID: 100100000} 379 | m_GameObject: {fileID: 1495685782339972} 380 | m_CullTransparentMesh: 0 381 | --- !u!222 &222602932779585082 382 | CanvasRenderer: 383 | m_ObjectHideFlags: 1 384 | m_CorrespondingSourceObject: {fileID: 0} 385 | m_PrefabInternal: {fileID: 100100000} 386 | m_GameObject: {fileID: 1227499163195862} 387 | m_CullTransparentMesh: 0 388 | --- !u!222 &222796024086892788 389 | CanvasRenderer: 390 | m_ObjectHideFlags: 1 391 | m_CorrespondingSourceObject: {fileID: 0} 392 | m_PrefabInternal: {fileID: 100100000} 393 | m_GameObject: {fileID: 1568154944677326} 394 | m_CullTransparentMesh: 0 395 | --- !u!224 &224012842923327066 396 | RectTransform: 397 | m_ObjectHideFlags: 1 398 | m_CorrespondingSourceObject: {fileID: 0} 399 | m_PrefabInternal: {fileID: 100100000} 400 | m_GameObject: {fileID: 1612335102492062} 401 | m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} 402 | m_LocalPosition: {x: 0, y: 0, z: 0} 403 | m_LocalScale: {x: 1, y: 1, z: 1} 404 | m_Children: 405 | - {fileID: 224541990902616662} 406 | - {fileID: 224713550013880250} 407 | m_Father: {fileID: 0} 408 | m_RootOrder: 0 409 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 410 | m_AnchorMin: {x: 0, y: 0} 411 | m_AnchorMax: {x: 0, y: 0} 412 | m_AnchoredPosition: {x: 0, y: 0} 413 | m_SizeDelta: {x: 0, y: 0} 414 | m_Pivot: {x: 0.5, y: 0.5} 415 | --- !u!224 &224034587622972158 416 | RectTransform: 417 | m_ObjectHideFlags: 1 418 | m_CorrespondingSourceObject: {fileID: 0} 419 | m_PrefabInternal: {fileID: 100100000} 420 | m_GameObject: {fileID: 1227499163195862} 421 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 422 | m_LocalPosition: {x: 0, y: 0, z: 0} 423 | m_LocalScale: {x: 1, y: 1, z: 1} 424 | m_Children: [] 425 | m_Father: {fileID: 224616429189983300} 426 | m_RootOrder: 0 427 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 428 | m_AnchorMin: {x: 0, y: 0} 429 | m_AnchorMax: {x: 0, y: 0} 430 | m_AnchoredPosition: {x: 0, y: 0} 431 | m_SizeDelta: {x: 20, y: 0} 432 | m_Pivot: {x: 0.5, y: 0.5} 433 | --- !u!224 &224541990902616662 434 | RectTransform: 435 | m_ObjectHideFlags: 1 436 | m_CorrespondingSourceObject: {fileID: 0} 437 | m_PrefabInternal: {fileID: 100100000} 438 | m_GameObject: {fileID: 1568154944677326} 439 | m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} 440 | m_LocalPosition: {x: 0, y: 0, z: 0} 441 | m_LocalScale: {x: 1, y: 1, z: 1} 442 | m_Children: [] 443 | m_Father: {fileID: 224012842923327066} 444 | m_RootOrder: 0 445 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 446 | m_AnchorMin: {x: 0, y: 1} 447 | m_AnchorMax: {x: 0, y: 1} 448 | m_AnchoredPosition: {x: 0, y: 0} 449 | m_SizeDelta: {x: 155, y: 20} 450 | m_Pivot: {x: 0, y: 1} 451 | --- !u!224 &224616429189983300 452 | RectTransform: 453 | m_ObjectHideFlags: 1 454 | m_CorrespondingSourceObject: {fileID: 0} 455 | m_PrefabInternal: {fileID: 100100000} 456 | m_GameObject: {fileID: 1751266090083732} 457 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 458 | m_LocalPosition: {x: 0, y: 0, z: 0} 459 | m_LocalScale: {x: 1, y: 1, z: 1} 460 | m_Children: 461 | - {fileID: 224034587622972158} 462 | m_Father: {fileID: 224713550013880250} 463 | m_RootOrder: 2 464 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 465 | m_AnchorMin: {x: 0, y: 0} 466 | m_AnchorMax: {x: 1, y: 1} 467 | m_AnchoredPosition: {x: 0, y: 0} 468 | m_SizeDelta: {x: -20, y: 0} 469 | m_Pivot: {x: 0.5, y: 0.5} 470 | --- !u!224 &224657090989585492 471 | RectTransform: 472 | m_ObjectHideFlags: 1 473 | m_CorrespondingSourceObject: {fileID: 0} 474 | m_PrefabInternal: {fileID: 100100000} 475 | m_GameObject: {fileID: 1843208922908790} 476 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 477 | m_LocalPosition: {x: 0, y: 0, z: 0} 478 | m_LocalScale: {x: 1, y: 1, z: 1} 479 | m_Children: [] 480 | m_Father: {fileID: 224713550013880250} 481 | m_RootOrder: 0 482 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 483 | m_AnchorMin: {x: 0, y: 0.25} 484 | m_AnchorMax: {x: 1, y: 0.75} 485 | m_AnchoredPosition: {x: 0, y: 0} 486 | m_SizeDelta: {x: 0, y: 0} 487 | m_Pivot: {x: 0.5, y: 0.5} 488 | --- !u!224 &224713550013880250 489 | RectTransform: 490 | m_ObjectHideFlags: 1 491 | m_CorrespondingSourceObject: {fileID: 0} 492 | m_PrefabInternal: {fileID: 100100000} 493 | m_GameObject: {fileID: 1876525975326690} 494 | m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} 495 | m_LocalPosition: {x: 0, y: 0, z: 0} 496 | m_LocalScale: {x: 1, y: 1, z: 1} 497 | m_Children: 498 | - {fileID: 224657090989585492} 499 | - {fileID: 224769787162223094} 500 | - {fileID: 224616429189983300} 501 | m_Father: {fileID: 224012842923327066} 502 | m_RootOrder: 1 503 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 504 | m_AnchorMin: {x: 0, y: 1} 505 | m_AnchorMax: {x: 1, y: 1} 506 | m_AnchoredPosition: {x: 0, y: -20} 507 | m_SizeDelta: {x: 0, y: 20} 508 | m_Pivot: {x: 0.5, y: 1} 509 | --- !u!224 &224769787162223094 510 | RectTransform: 511 | m_ObjectHideFlags: 1 512 | m_CorrespondingSourceObject: {fileID: 0} 513 | m_PrefabInternal: {fileID: 100100000} 514 | m_GameObject: {fileID: 1547419890944234} 515 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 516 | m_LocalPosition: {x: 0, y: 0, z: 0} 517 | m_LocalScale: {x: 1, y: 1, z: 1} 518 | m_Children: 519 | - {fileID: 224953621513343872} 520 | m_Father: {fileID: 224713550013880250} 521 | m_RootOrder: 1 522 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 523 | m_AnchorMin: {x: 0, y: 0.25} 524 | m_AnchorMax: {x: 1, y: 0.75} 525 | m_AnchoredPosition: {x: -5, y: 0} 526 | m_SizeDelta: {x: -20, y: 0} 527 | m_Pivot: {x: 0.5, y: 0.5} 528 | --- !u!224 &224953621513343872 529 | RectTransform: 530 | m_ObjectHideFlags: 1 531 | m_CorrespondingSourceObject: {fileID: 0} 532 | m_PrefabInternal: {fileID: 100100000} 533 | m_GameObject: {fileID: 1495685782339972} 534 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 535 | m_LocalPosition: {x: 0, y: 0, z: 0} 536 | m_LocalScale: {x: 1, y: 1, z: 1} 537 | m_Children: [] 538 | m_Father: {fileID: 224769787162223094} 539 | m_RootOrder: 0 540 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 541 | m_AnchorMin: {x: 0, y: 0} 542 | m_AnchorMax: {x: 0, y: 0} 543 | m_AnchoredPosition: {x: 0, y: 0} 544 | m_SizeDelta: {x: 10, y: 0} 545 | m_Pivot: {x: 0.5, y: 0.5} 546 | -------------------------------------------------------------------------------- /Animations/CharacterAnimationController_UMA.controller: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!91 &9100000 4 | AnimatorController: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInternal: {fileID: 0} 8 | m_Name: CharacterAnimationController_UMA 9 | serializedVersion: 5 10 | m_AnimatorParameters: 11 | - m_Name: IsDead 12 | m_Type: 4 13 | m_DefaultFloat: 0 14 | m_DefaultInt: 0 15 | m_DefaultBool: 0 16 | m_Controller: {fileID: 0} 17 | - m_Name: IsGrounded 18 | m_Type: 4 19 | m_DefaultFloat: 0 20 | m_DefaultInt: 0 21 | m_DefaultBool: 0 22 | m_Controller: {fileID: 0} 23 | - m_Name: MoveSpeed 24 | m_Type: 1 25 | m_DefaultFloat: 0 26 | m_DefaultInt: 0 27 | m_DefaultBool: 0 28 | m_Controller: {fileID: 0} 29 | - m_Name: SideMoveSpeed 30 | m_Type: 1 31 | m_DefaultFloat: 0 32 | m_DefaultInt: 0 33 | m_DefaultBool: 0 34 | m_Controller: {fileID: 0} 35 | - m_Name: YSpeed 36 | m_Type: 1 37 | m_DefaultFloat: 0 38 | m_DefaultInt: 0 39 | m_DefaultBool: 0 40 | m_Controller: {fileID: 0} 41 | - m_Name: Hurt 42 | m_Type: 9 43 | m_DefaultFloat: 0 44 | m_DefaultInt: 0 45 | m_DefaultBool: 0 46 | m_Controller: {fileID: 0} 47 | - m_Name: Jump 48 | m_Type: 9 49 | m_DefaultFloat: 0 50 | m_DefaultInt: 0 51 | m_DefaultBool: 0 52 | m_Controller: {fileID: 0} 53 | - m_Name: DoAction 54 | m_Type: 4 55 | m_DefaultFloat: 0 56 | m_DefaultInt: 0 57 | m_DefaultBool: 0 58 | m_Controller: {fileID: 0} 59 | - m_Name: IsCastingSkill 60 | m_Type: 4 61 | m_DefaultFloat: 0 62 | m_DefaultInt: 0 63 | m_DefaultBool: 0 64 | m_Controller: {fileID: 0} 65 | - m_Name: MoveSpeedMultiplier 66 | m_Type: 1 67 | m_DefaultFloat: 0 68 | m_DefaultInt: 0 69 | m_DefaultBool: 0 70 | m_Controller: {fileID: 0} 71 | - m_Name: ActionSpeedMultiplier 72 | m_Type: 1 73 | m_DefaultFloat: 0 74 | m_DefaultInt: 0 75 | m_DefaultBool: 0 76 | m_Controller: {fileID: 0} 77 | m_AnimatorLayers: 78 | - serializedVersion: 5 79 | m_Name: Base Layer 80 | m_StateMachine: {fileID: 1107097320266080540} 81 | m_Mask: {fileID: 0} 82 | m_Motions: [] 83 | m_Behaviours: [] 84 | m_BlendingMode: 0 85 | m_SyncedLayerIndex: -1 86 | m_DefaultWeight: 0 87 | m_IKPass: 0 88 | m_SyncedLayerAffectsTiming: 0 89 | m_Controller: {fileID: 9100000} 90 | --- !u!206 &206889177364306100 91 | BlendTree: 92 | m_ObjectHideFlags: 1 93 | m_CorrespondingSourceObject: {fileID: 0} 94 | m_PrefabInternal: {fileID: 0} 95 | m_Name: BlendTree 96 | m_Childs: [] 97 | m_BlendParameter: MoveSpeed 98 | m_BlendParameterY: Blend 99 | m_MinThreshold: 0 100 | m_MaxThreshold: 1 101 | m_UseAutomaticThresholds: 1 102 | m_NormalizedBlendValues: 0 103 | m_BlendType: 0 104 | --- !u!1101 &1101126080168673104 105 | AnimatorStateTransition: 106 | m_ObjectHideFlags: 1 107 | m_CorrespondingSourceObject: {fileID: 0} 108 | m_PrefabInternal: {fileID: 0} 109 | m_Name: 110 | m_Conditions: 111 | - m_ConditionMode: 1 112 | m_ConditionEvent: DoAction 113 | m_EventTreshold: 0 114 | m_DstStateMachine: {fileID: 0} 115 | m_DstState: {fileID: 1102579084493029540} 116 | m_Solo: 0 117 | m_Mute: 0 118 | m_IsExit: 0 119 | serializedVersion: 3 120 | m_TransitionDuration: 0.1 121 | m_TransitionOffset: 0 122 | m_ExitTime: 0.75 123 | m_HasExitTime: 0 124 | m_HasFixedDuration: 1 125 | m_InterruptionSource: 0 126 | m_OrderedInterruption: 1 127 | m_CanTransitionToSelf: 0 128 | --- !u!1101 &1101148894893230228 129 | AnimatorStateTransition: 130 | m_ObjectHideFlags: 3 131 | m_CorrespondingSourceObject: {fileID: 0} 132 | m_PrefabInternal: {fileID: 0} 133 | m_Name: 134 | m_Conditions: 135 | - m_ConditionMode: 2 136 | m_ConditionEvent: DoAction 137 | m_EventTreshold: 0 138 | m_DstStateMachine: {fileID: 0} 139 | m_DstState: {fileID: 0} 140 | m_Solo: 0 141 | m_Mute: 0 142 | m_IsExit: 0 143 | serializedVersion: 3 144 | m_TransitionDuration: 0.25 145 | m_TransitionOffset: 0 146 | m_ExitTime: 0.75 147 | m_HasExitTime: 0 148 | m_HasFixedDuration: 1 149 | m_InterruptionSource: 0 150 | m_OrderedInterruption: 1 151 | m_CanTransitionToSelf: 1 152 | --- !u!1101 &1101235773756414552 153 | AnimatorStateTransition: 154 | m_ObjectHideFlags: 1 155 | m_CorrespondingSourceObject: {fileID: 0} 156 | m_PrefabInternal: {fileID: 0} 157 | m_Name: 158 | m_Conditions: 159 | - m_ConditionMode: 1 160 | m_ConditionEvent: IsGrounded 161 | m_EventTreshold: 0 162 | - m_ConditionMode: 2 163 | m_ConditionEvent: IsDead 164 | m_EventTreshold: 0 165 | - m_ConditionMode: 2 166 | m_ConditionEvent: DoAction 167 | m_EventTreshold: 0 168 | - m_ConditionMode: 3 169 | m_ConditionEvent: MoveSpeed 170 | m_EventTreshold: 0.5 171 | m_DstStateMachine: {fileID: 0} 172 | m_DstState: {fileID: 1102189102039045246} 173 | m_Solo: 0 174 | m_Mute: 0 175 | m_IsExit: 0 176 | serializedVersion: 3 177 | m_TransitionDuration: 0.1 178 | m_TransitionOffset: 0 179 | m_ExitTime: 0.75 180 | m_HasExitTime: 0 181 | m_HasFixedDuration: 1 182 | m_InterruptionSource: 0 183 | m_OrderedInterruption: 0 184 | m_CanTransitionToSelf: 0 185 | --- !u!1101 &1101307721821989322 186 | AnimatorStateTransition: 187 | m_ObjectHideFlags: 1 188 | m_CorrespondingSourceObject: {fileID: 0} 189 | m_PrefabInternal: {fileID: 0} 190 | m_Name: 191 | m_Conditions: [] 192 | m_DstStateMachine: {fileID: 0} 193 | m_DstState: {fileID: 0} 194 | m_Solo: 0 195 | m_Mute: 0 196 | m_IsExit: 0 197 | serializedVersion: 3 198 | m_TransitionDuration: 0.25 199 | m_TransitionOffset: 0 200 | m_ExitTime: 0.94495416 201 | m_HasExitTime: 1 202 | m_HasFixedDuration: 1 203 | m_InterruptionSource: 0 204 | m_OrderedInterruption: 1 205 | m_CanTransitionToSelf: 1 206 | --- !u!1101 &1101354536610192414 207 | AnimatorStateTransition: 208 | m_ObjectHideFlags: 1 209 | m_CorrespondingSourceObject: {fileID: 0} 210 | m_PrefabInternal: {fileID: 0} 211 | m_Name: 212 | m_Conditions: 213 | - m_ConditionMode: 1 214 | m_ConditionEvent: IsGrounded 215 | m_EventTreshold: 0 216 | - m_ConditionMode: 2 217 | m_ConditionEvent: IsDead 218 | m_EventTreshold: 0 219 | - m_ConditionMode: 2 220 | m_ConditionEvent: DoAction 221 | m_EventTreshold: 0 222 | - m_ConditionMode: 4 223 | m_ConditionEvent: MoveSpeed 224 | m_EventTreshold: 0.5 225 | - m_ConditionMode: 3 226 | m_ConditionEvent: MoveSpeed 227 | m_EventTreshold: -0.5 228 | - m_ConditionMode: 4 229 | m_ConditionEvent: SideMoveSpeed 230 | m_EventTreshold: 0.5 231 | - m_ConditionMode: 3 232 | m_ConditionEvent: SideMoveSpeed 233 | m_EventTreshold: -0.5 234 | m_DstStateMachine: {fileID: 0} 235 | m_DstState: {fileID: 1102417192334865382} 236 | m_Solo: 0 237 | m_Mute: 0 238 | m_IsExit: 0 239 | serializedVersion: 3 240 | m_TransitionDuration: 0.1 241 | m_TransitionOffset: 0 242 | m_ExitTime: 0.75 243 | m_HasExitTime: 0 244 | m_HasFixedDuration: 1 245 | m_InterruptionSource: 0 246 | m_OrderedInterruption: 1 247 | m_CanTransitionToSelf: 0 248 | --- !u!1101 &1101411365519417186 249 | AnimatorStateTransition: 250 | m_ObjectHideFlags: 1 251 | m_CorrespondingSourceObject: {fileID: 0} 252 | m_PrefabInternal: {fileID: 0} 253 | m_Name: 254 | m_Conditions: 255 | - m_ConditionMode: 1 256 | m_ConditionEvent: IsDead 257 | m_EventTreshold: 0 258 | m_DstStateMachine: {fileID: 0} 259 | m_DstState: {fileID: 1102929871947523648} 260 | m_Solo: 0 261 | m_Mute: 0 262 | m_IsExit: 0 263 | serializedVersion: 3 264 | m_TransitionDuration: 0.25 265 | m_TransitionOffset: 0 266 | m_ExitTime: 0.75 267 | m_HasExitTime: 0 268 | m_HasFixedDuration: 1 269 | m_InterruptionSource: 0 270 | m_OrderedInterruption: 1 271 | m_CanTransitionToSelf: 0 272 | --- !u!1101 &1101464055351837492 273 | AnimatorStateTransition: 274 | m_ObjectHideFlags: 1 275 | m_CorrespondingSourceObject: {fileID: 0} 276 | m_PrefabInternal: {fileID: 0} 277 | m_Name: 278 | m_Conditions: 279 | - m_ConditionMode: 1 280 | m_ConditionEvent: Jump 281 | m_EventTreshold: 0 282 | - m_ConditionMode: 2 283 | m_ConditionEvent: IsDead 284 | m_EventTreshold: 0 285 | m_DstStateMachine: {fileID: 0} 286 | m_DstState: {fileID: 1102707657108370860} 287 | m_Solo: 0 288 | m_Mute: 0 289 | m_IsExit: 0 290 | serializedVersion: 3 291 | m_TransitionDuration: 0.25 292 | m_TransitionOffset: 0 293 | m_ExitTime: 0.75 294 | m_HasExitTime: 0 295 | m_HasFixedDuration: 1 296 | m_InterruptionSource: 0 297 | m_OrderedInterruption: 1 298 | m_CanTransitionToSelf: 0 299 | --- !u!1101 &1101469757170666900 300 | AnimatorStateTransition: 301 | m_ObjectHideFlags: 3 302 | m_CorrespondingSourceObject: {fileID: 0} 303 | m_PrefabInternal: {fileID: 0} 304 | m_Name: 305 | m_Conditions: 306 | - m_ConditionMode: 2 307 | m_ConditionEvent: DoAction 308 | m_EventTreshold: 0 309 | m_DstStateMachine: {fileID: 0} 310 | m_DstState: {fileID: 0} 311 | m_Solo: 0 312 | m_Mute: 0 313 | m_IsExit: 0 314 | serializedVersion: 3 315 | m_TransitionDuration: 0.25 316 | m_TransitionOffset: 0 317 | m_ExitTime: 0.75 318 | m_HasExitTime: 0 319 | m_HasFixedDuration: 1 320 | m_InterruptionSource: 0 321 | m_OrderedInterruption: 1 322 | m_CanTransitionToSelf: 1 323 | --- !u!1101 &1101528814764646572 324 | AnimatorStateTransition: 325 | m_ObjectHideFlags: 1 326 | m_CorrespondingSourceObject: {fileID: 0} 327 | m_PrefabInternal: {fileID: 0} 328 | m_Name: 329 | m_Conditions: 330 | - m_ConditionMode: 1 331 | m_ConditionEvent: IsDead 332 | m_EventTreshold: 0 333 | m_DstStateMachine: {fileID: 0} 334 | m_DstState: {fileID: 1102929871947523648} 335 | m_Solo: 0 336 | m_Mute: 0 337 | m_IsExit: 0 338 | serializedVersion: 3 339 | m_TransitionDuration: 0.1 340 | m_TransitionOffset: 0 341 | m_ExitTime: 0.1 342 | m_HasExitTime: 0 343 | m_HasFixedDuration: 1 344 | m_InterruptionSource: 0 345 | m_OrderedInterruption: 1 346 | m_CanTransitionToSelf: 1 347 | --- !u!1101 &1101558546422952020 348 | AnimatorStateTransition: 349 | m_ObjectHideFlags: 3 350 | m_CorrespondingSourceObject: {fileID: 0} 351 | m_PrefabInternal: {fileID: 0} 352 | m_Name: 353 | m_Conditions: 354 | - m_ConditionMode: 2 355 | m_ConditionEvent: DoAction 356 | m_EventTreshold: 0 357 | m_DstStateMachine: {fileID: 0} 358 | m_DstState: {fileID: 0} 359 | m_Solo: 0 360 | m_Mute: 0 361 | m_IsExit: 0 362 | serializedVersion: 3 363 | m_TransitionDuration: 0.25 364 | m_TransitionOffset: 0 365 | m_ExitTime: 0.75 366 | m_HasExitTime: 0 367 | m_HasFixedDuration: 1 368 | m_InterruptionSource: 0 369 | m_OrderedInterruption: 1 370 | m_CanTransitionToSelf: 1 371 | --- !u!1101 &1101576580505255558 372 | AnimatorStateTransition: 373 | m_ObjectHideFlags: 3 374 | m_CorrespondingSourceObject: {fileID: 0} 375 | m_PrefabInternal: {fileID: 0} 376 | m_Name: 377 | m_Conditions: 378 | - m_ConditionMode: 1 379 | m_ConditionEvent: IsDead 380 | m_EventTreshold: 0 381 | m_DstStateMachine: {fileID: 0} 382 | m_DstState: {fileID: 0} 383 | m_Solo: 0 384 | m_Mute: 0 385 | m_IsExit: 0 386 | serializedVersion: 3 387 | m_TransitionDuration: 0.1 388 | m_TransitionOffset: 0 389 | m_ExitTime: 0.1 390 | m_HasExitTime: 0 391 | m_HasFixedDuration: 1 392 | m_InterruptionSource: 0 393 | m_OrderedInterruption: 1 394 | m_CanTransitionToSelf: 1 395 | --- !u!1101 &1101586412280804510 396 | AnimatorStateTransition: 397 | m_ObjectHideFlags: 1 398 | m_CorrespondingSourceObject: {fileID: 0} 399 | m_PrefabInternal: {fileID: 0} 400 | m_Name: 401 | m_Conditions: 402 | - m_ConditionMode: 2 403 | m_ConditionEvent: IsGrounded 404 | m_EventTreshold: 0 405 | - m_ConditionMode: 4 406 | m_ConditionEvent: YSpeed 407 | m_EventTreshold: -1 408 | m_DstStateMachine: {fileID: 0} 409 | m_DstState: {fileID: 1102641043948507600} 410 | m_Solo: 0 411 | m_Mute: 0 412 | m_IsExit: 0 413 | serializedVersion: 3 414 | m_TransitionDuration: 0.1 415 | m_TransitionOffset: 0 416 | m_ExitTime: 0.75 417 | m_HasExitTime: 0 418 | m_HasFixedDuration: 1 419 | m_InterruptionSource: 0 420 | m_OrderedInterruption: 1 421 | m_CanTransitionToSelf: 0 422 | --- !u!1101 &1101647775550484544 423 | AnimatorStateTransition: 424 | m_ObjectHideFlags: 1 425 | m_CorrespondingSourceObject: {fileID: 0} 426 | m_PrefabInternal: {fileID: 0} 427 | m_Name: 428 | m_Conditions: [] 429 | m_DstStateMachine: {fileID: 0} 430 | m_DstState: {fileID: 1102189102039045246} 431 | m_Solo: 0 432 | m_Mute: 0 433 | m_IsExit: 0 434 | serializedVersion: 3 435 | m_TransitionDuration: 0.25 436 | m_TransitionOffset: 0 437 | m_ExitTime: 0.94495416 438 | m_HasExitTime: 1 439 | m_HasFixedDuration: 1 440 | m_InterruptionSource: 0 441 | m_OrderedInterruption: 1 442 | m_CanTransitionToSelf: 1 443 | --- !u!1101 &1101683810394040716 444 | AnimatorStateTransition: 445 | m_ObjectHideFlags: 1 446 | m_CorrespondingSourceObject: {fileID: 0} 447 | m_PrefabInternal: {fileID: 0} 448 | m_Name: 449 | m_Conditions: [] 450 | m_DstStateMachine: {fileID: 0} 451 | m_DstState: {fileID: 0} 452 | m_Solo: 0 453 | m_Mute: 0 454 | m_IsExit: 0 455 | serializedVersion: 3 456 | m_TransitionDuration: 0.25 457 | m_TransitionOffset: 0 458 | m_ExitTime: 0.94495416 459 | m_HasExitTime: 1 460 | m_HasFixedDuration: 1 461 | m_InterruptionSource: 0 462 | m_OrderedInterruption: 1 463 | m_CanTransitionToSelf: 1 464 | --- !u!1101 &1101693243957318532 465 | AnimatorStateTransition: 466 | m_ObjectHideFlags: 1 467 | m_CorrespondingSourceObject: {fileID: 0} 468 | m_PrefabInternal: {fileID: 0} 469 | m_Name: 470 | m_Conditions: 471 | - m_ConditionMode: 1 472 | m_ConditionEvent: Hurt 473 | m_EventTreshold: 0 474 | - m_ConditionMode: 2 475 | m_ConditionEvent: IsDead 476 | m_EventTreshold: 0 477 | - m_ConditionMode: 2 478 | m_ConditionEvent: DoAction 479 | m_EventTreshold: 0 480 | - m_ConditionMode: 2 481 | m_ConditionEvent: IsCastingSkill 482 | m_EventTreshold: 0 483 | m_DstStateMachine: {fileID: 0} 484 | m_DstState: {fileID: 1102224331994790198} 485 | m_Solo: 0 486 | m_Mute: 0 487 | m_IsExit: 0 488 | serializedVersion: 3 489 | m_TransitionDuration: 0.1 490 | m_TransitionOffset: 0 491 | m_ExitTime: 0.75 492 | m_HasExitTime: 0 493 | m_HasFixedDuration: 1 494 | m_InterruptionSource: 0 495 | m_OrderedInterruption: 1 496 | m_CanTransitionToSelf: 0 497 | --- !u!1101 &1101727369352279828 498 | AnimatorStateTransition: 499 | m_ObjectHideFlags: 3 500 | m_CorrespondingSourceObject: {fileID: 0} 501 | m_PrefabInternal: {fileID: 0} 502 | m_Name: 503 | m_Conditions: 504 | - m_ConditionMode: 2 505 | m_ConditionEvent: DoAction 506 | m_EventTreshold: 0 507 | m_DstStateMachine: {fileID: 0} 508 | m_DstState: {fileID: 0} 509 | m_Solo: 0 510 | m_Mute: 0 511 | m_IsExit: 0 512 | serializedVersion: 3 513 | m_TransitionDuration: 0.25 514 | m_TransitionOffset: 0 515 | m_ExitTime: 0.75 516 | m_HasExitTime: 0 517 | m_HasFixedDuration: 1 518 | m_InterruptionSource: 0 519 | m_OrderedInterruption: 1 520 | m_CanTransitionToSelf: 1 521 | --- !u!1101 &1101744067981429862 522 | AnimatorStateTransition: 523 | m_ObjectHideFlags: 3 524 | m_CorrespondingSourceObject: {fileID: 0} 525 | m_PrefabInternal: {fileID: 0} 526 | m_Name: 527 | m_Conditions: 528 | - m_ConditionMode: 2 529 | m_ConditionEvent: DoAction 530 | m_EventTreshold: 0 531 | m_DstStateMachine: {fileID: 0} 532 | m_DstState: {fileID: 0} 533 | m_Solo: 0 534 | m_Mute: 0 535 | m_IsExit: 0 536 | serializedVersion: 3 537 | m_TransitionDuration: 0.25 538 | m_TransitionOffset: 0 539 | m_ExitTime: 0.75 540 | m_HasExitTime: 0 541 | m_HasFixedDuration: 1 542 | m_InterruptionSource: 0 543 | m_OrderedInterruption: 1 544 | m_CanTransitionToSelf: 1 545 | --- !u!1101 &1101780889162176000 546 | AnimatorStateTransition: 547 | m_ObjectHideFlags: 3 548 | m_CorrespondingSourceObject: {fileID: 0} 549 | m_PrefabInternal: {fileID: 0} 550 | m_Name: 551 | m_Conditions: 552 | - m_ConditionMode: 2 553 | m_ConditionEvent: DoAction 554 | m_EventTreshold: 0 555 | m_DstStateMachine: {fileID: 0} 556 | m_DstState: {fileID: 0} 557 | m_Solo: 0 558 | m_Mute: 0 559 | m_IsExit: 0 560 | serializedVersion: 3 561 | m_TransitionDuration: 0.25 562 | m_TransitionOffset: 0 563 | m_ExitTime: 0.75 564 | m_HasExitTime: 0 565 | m_HasFixedDuration: 1 566 | m_InterruptionSource: 0 567 | m_OrderedInterruption: 1 568 | m_CanTransitionToSelf: 1 569 | --- !u!1101 &1101789530714955442 570 | AnimatorStateTransition: 571 | m_ObjectHideFlags: 1 572 | m_CorrespondingSourceObject: {fileID: 0} 573 | m_PrefabInternal: {fileID: 0} 574 | m_Name: 575 | m_Conditions: 576 | - m_ConditionMode: 1 577 | m_ConditionEvent: IsCastingSkill 578 | m_EventTreshold: 0 579 | m_DstStateMachine: {fileID: 0} 580 | m_DstState: {fileID: 1102134488706761436} 581 | m_Solo: 0 582 | m_Mute: 0 583 | m_IsExit: 0 584 | serializedVersion: 3 585 | m_TransitionDuration: 0.25 586 | m_TransitionOffset: 0 587 | m_ExitTime: 0.75 588 | m_HasExitTime: 0 589 | m_HasFixedDuration: 1 590 | m_InterruptionSource: 0 591 | m_OrderedInterruption: 1 592 | m_CanTransitionToSelf: 0 593 | --- !u!1101 &1101813265026360960 594 | AnimatorStateTransition: 595 | m_ObjectHideFlags: 1 596 | m_CorrespondingSourceObject: {fileID: 0} 597 | m_PrefabInternal: {fileID: 0} 598 | m_Name: 599 | m_Conditions: [] 600 | m_DstStateMachine: {fileID: 0} 601 | m_DstState: {fileID: 0} 602 | m_Solo: 0 603 | m_Mute: 0 604 | m_IsExit: 0 605 | serializedVersion: 3 606 | m_TransitionDuration: 0.25 607 | m_TransitionOffset: 0 608 | m_ExitTime: 0.94495416 609 | m_HasExitTime: 1 610 | m_HasFixedDuration: 1 611 | m_InterruptionSource: 0 612 | m_OrderedInterruption: 1 613 | m_CanTransitionToSelf: 1 614 | --- !u!1101 &1101913636950852230 615 | AnimatorStateTransition: 616 | m_ObjectHideFlags: 3 617 | m_CorrespondingSourceObject: {fileID: 0} 618 | m_PrefabInternal: {fileID: 0} 619 | m_Name: 620 | m_Conditions: 621 | - m_ConditionMode: 4 622 | m_ConditionEvent: MoveSpeed 623 | m_EventTreshold: 0.1 624 | m_DstStateMachine: {fileID: 0} 625 | m_DstState: {fileID: 0} 626 | m_Solo: 0 627 | m_Mute: 0 628 | m_IsExit: 0 629 | serializedVersion: 3 630 | m_TransitionDuration: 0.1 631 | m_TransitionOffset: 0 632 | m_ExitTime: 0.75 633 | m_HasExitTime: 0 634 | m_HasFixedDuration: 1 635 | m_InterruptionSource: 0 636 | m_OrderedInterruption: 1 637 | m_CanTransitionToSelf: 1 638 | --- !u!1101 &1101915275129622366 639 | AnimatorStateTransition: 640 | m_ObjectHideFlags: 1 641 | m_CorrespondingSourceObject: {fileID: 0} 642 | m_PrefabInternal: {fileID: 0} 643 | m_Name: 644 | m_Conditions: [] 645 | m_DstStateMachine: {fileID: 0} 646 | m_DstState: {fileID: 0} 647 | m_Solo: 0 648 | m_Mute: 0 649 | m_IsExit: 0 650 | serializedVersion: 3 651 | m_TransitionDuration: 0.25 652 | m_TransitionOffset: 0 653 | m_ExitTime: 0.94495416 654 | m_HasExitTime: 1 655 | m_HasFixedDuration: 1 656 | m_InterruptionSource: 0 657 | m_OrderedInterruption: 1 658 | m_CanTransitionToSelf: 1 659 | --- !u!1101 &1101978604061713334 660 | AnimatorStateTransition: 661 | m_ObjectHideFlags: 3 662 | m_CorrespondingSourceObject: {fileID: 0} 663 | m_PrefabInternal: {fileID: 0} 664 | m_Name: 665 | m_Conditions: 666 | - m_ConditionMode: 4 667 | m_ConditionEvent: MoveSpeed 668 | m_EventTreshold: 0.1 669 | m_DstStateMachine: {fileID: 0} 670 | m_DstState: {fileID: 0} 671 | m_Solo: 0 672 | m_Mute: 0 673 | m_IsExit: 0 674 | serializedVersion: 3 675 | m_TransitionDuration: 0.1 676 | m_TransitionOffset: 0 677 | m_ExitTime: 0.75 678 | m_HasExitTime: 0 679 | m_HasFixedDuration: 1 680 | m_InterruptionSource: 0 681 | m_OrderedInterruption: 1 682 | m_CanTransitionToSelf: 1 683 | --- !u!1102 &1102134488706761436 684 | AnimatorState: 685 | serializedVersion: 5 686 | m_ObjectHideFlags: 1 687 | m_CorrespondingSourceObject: {fileID: 0} 688 | m_PrefabInternal: {fileID: 0} 689 | m_Name: CastingSkill 690 | m_Speed: 1 691 | m_CycleOffset: 0 692 | m_Transitions: [] 693 | m_StateMachineBehaviours: [] 694 | m_Position: {x: 50, y: 50, z: 0} 695 | m_IKOnFeet: 0 696 | m_WriteDefaultValues: 1 697 | m_Mirror: 0 698 | m_SpeedParameterActive: 0 699 | m_MirrorParameterActive: 0 700 | m_CycleOffsetParameterActive: 0 701 | m_TimeParameterActive: 0 702 | m_Motion: {fileID: 7400000, guid: dffa50cfe77e0434bbfa71245b3dd529, type: 3} 703 | m_Tag: 704 | m_SpeedParameter: 705 | m_MirrorParameter: 706 | m_CycleOffsetParameter: 707 | m_TimeParameter: 708 | --- !u!1102 &1102189102039045246 709 | AnimatorState: 710 | serializedVersion: 5 711 | m_ObjectHideFlags: 1 712 | m_CorrespondingSourceObject: {fileID: 0} 713 | m_PrefabInternal: {fileID: 0} 714 | m_Name: Move 715 | m_Speed: 1 716 | m_CycleOffset: 0 717 | m_Transitions: [] 718 | m_StateMachineBehaviours: [] 719 | m_Position: {x: 50, y: 50, z: 0} 720 | m_IKOnFeet: 0 721 | m_WriteDefaultValues: 1 722 | m_Mirror: 0 723 | m_SpeedParameterActive: 1 724 | m_MirrorParameterActive: 0 725 | m_CycleOffsetParameterActive: 0 726 | m_TimeParameterActive: 0 727 | m_Motion: {fileID: 7400000, guid: 1cb8ed3cbba15f0479fbae54e0a963df, type: 3} 728 | m_Tag: 729 | m_SpeedParameter: MoveSpeedMultiplier 730 | m_MirrorParameter: 731 | m_CycleOffsetParameter: 732 | m_TimeParameter: MoveSpeed 733 | --- !u!1102 &1102224331994790198 734 | AnimatorState: 735 | serializedVersion: 5 736 | m_ObjectHideFlags: 1 737 | m_CorrespondingSourceObject: {fileID: 0} 738 | m_PrefabInternal: {fileID: 0} 739 | m_Name: Hurt 740 | m_Speed: 1 741 | m_CycleOffset: 0 742 | m_Transitions: 743 | - {fileID: 1101528814764646572} 744 | m_StateMachineBehaviours: [] 745 | m_Position: {x: 50, y: 50, z: 0} 746 | m_IKOnFeet: 0 747 | m_WriteDefaultValues: 1 748 | m_Mirror: 0 749 | m_SpeedParameterActive: 0 750 | m_MirrorParameterActive: 0 751 | m_CycleOffsetParameterActive: 0 752 | m_TimeParameterActive: 0 753 | m_Motion: {fileID: 7400000, guid: f2283fcc1389144489d8a3ed7a005b1c, type: 3} 754 | m_Tag: 755 | m_SpeedParameter: 756 | m_MirrorParameter: 757 | m_CycleOffsetParameter: 758 | m_TimeParameter: 759 | --- !u!1102 &1102417192334865382 760 | AnimatorState: 761 | serializedVersion: 5 762 | m_ObjectHideFlags: 1 763 | m_CorrespondingSourceObject: {fileID: 0} 764 | m_PrefabInternal: {fileID: 0} 765 | m_Name: Idle 766 | m_Speed: 1 767 | m_CycleOffset: 0 768 | m_Transitions: [] 769 | m_StateMachineBehaviours: [] 770 | m_Position: {x: 50, y: 50, z: 0} 771 | m_IKOnFeet: 0 772 | m_WriteDefaultValues: 1 773 | m_Mirror: 0 774 | m_SpeedParameterActive: 0 775 | m_MirrorParameterActive: 0 776 | m_CycleOffsetParameterActive: 0 777 | m_TimeParameterActive: 0 778 | m_Motion: {fileID: 7400000, guid: dffa50cfe77e0434bbfa71245b3dd529, type: 3} 779 | m_Tag: 780 | m_SpeedParameter: 781 | m_MirrorParameter: 782 | m_CycleOffsetParameter: 783 | m_TimeParameter: 784 | --- !u!1102 &1102579084493029540 785 | AnimatorState: 786 | serializedVersion: 5 787 | m_ObjectHideFlags: 1 788 | m_CorrespondingSourceObject: {fileID: 0} 789 | m_PrefabInternal: {fileID: 0} 790 | m_Name: Action 791 | m_Speed: 1 792 | m_CycleOffset: 0 793 | m_Transitions: [] 794 | m_StateMachineBehaviours: [] 795 | m_Position: {x: 50, y: 50, z: 0} 796 | m_IKOnFeet: 0 797 | m_WriteDefaultValues: 1 798 | m_Mirror: 0 799 | m_SpeedParameterActive: 1 800 | m_MirrorParameterActive: 0 801 | m_CycleOffsetParameterActive: 0 802 | m_TimeParameterActive: 0 803 | m_Motion: {fileID: 7400000, guid: c5e70869262598d49809c2cf63f2f3c3, type: 2} 804 | m_Tag: 805 | m_SpeedParameter: ActionSpeedMultiplier 806 | m_MirrorParameter: 807 | m_CycleOffsetParameter: 808 | m_TimeParameter: 809 | --- !u!1102 &1102641043948507600 810 | AnimatorState: 811 | serializedVersion: 5 812 | m_ObjectHideFlags: 1 813 | m_CorrespondingSourceObject: {fileID: 0} 814 | m_PrefabInternal: {fileID: 0} 815 | m_Name: Fall 816 | m_Speed: 1 817 | m_CycleOffset: 0 818 | m_Transitions: [] 819 | m_StateMachineBehaviours: [] 820 | m_Position: {x: 50, y: 50, z: 0} 821 | m_IKOnFeet: 0 822 | m_WriteDefaultValues: 1 823 | m_Mirror: 0 824 | m_SpeedParameterActive: 0 825 | m_MirrorParameterActive: 0 826 | m_CycleOffsetParameterActive: 0 827 | m_TimeParameterActive: 0 828 | m_Motion: {fileID: 7400000, guid: 8164d5f25ce079442917b5582dfdbf2b, type: 3} 829 | m_Tag: 830 | m_SpeedParameter: 831 | m_MirrorParameter: 832 | m_CycleOffsetParameter: 833 | m_TimeParameter: 834 | --- !u!1102 &1102707657108370860 835 | AnimatorState: 836 | serializedVersion: 5 837 | m_ObjectHideFlags: 1 838 | m_CorrespondingSourceObject: {fileID: 0} 839 | m_PrefabInternal: {fileID: 0} 840 | m_Name: Jump 841 | m_Speed: 1 842 | m_CycleOffset: 0 843 | m_Transitions: [] 844 | m_StateMachineBehaviours: [] 845 | m_Position: {x: 50, y: 50, z: 0} 846 | m_IKOnFeet: 0 847 | m_WriteDefaultValues: 1 848 | m_Mirror: 0 849 | m_SpeedParameterActive: 0 850 | m_MirrorParameterActive: 0 851 | m_CycleOffsetParameterActive: 0 852 | m_TimeParameterActive: 0 853 | m_Motion: {fileID: 7400000, guid: 39c1e8b66fab3ba418b191caaf714f42, type: 3} 854 | m_Tag: 855 | m_SpeedParameter: 856 | m_MirrorParameter: 857 | m_CycleOffsetParameter: 858 | m_TimeParameter: 859 | --- !u!1102 &1102929871947523648 860 | AnimatorState: 861 | serializedVersion: 5 862 | m_ObjectHideFlags: 1 863 | m_CorrespondingSourceObject: {fileID: 0} 864 | m_PrefabInternal: {fileID: 0} 865 | m_Name: Dead 866 | m_Speed: 1 867 | m_CycleOffset: 0 868 | m_Transitions: [] 869 | m_StateMachineBehaviours: [] 870 | m_Position: {x: 50, y: 50, z: 0} 871 | m_IKOnFeet: 0 872 | m_WriteDefaultValues: 1 873 | m_Mirror: 0 874 | m_SpeedParameterActive: 0 875 | m_MirrorParameterActive: 0 876 | m_CycleOffsetParameterActive: 0 877 | m_TimeParameterActive: 0 878 | m_Motion: {fileID: 7400000, guid: 9757788373ec8734cb4f7a3db84aef2f, type: 3} 879 | m_Tag: 880 | m_SpeedParameter: MoveSpeed 881 | m_MirrorParameter: 882 | m_CycleOffsetParameter: 883 | m_TimeParameter: MoveSpeed 884 | --- !u!1107 &1107097320266080540 885 | AnimatorStateMachine: 886 | serializedVersion: 5 887 | m_ObjectHideFlags: 1 888 | m_CorrespondingSourceObject: {fileID: 0} 889 | m_PrefabInternal: {fileID: 0} 890 | m_Name: Base Layer 891 | m_ChildStates: 892 | - serializedVersion: 1 893 | m_State: {fileID: 1102929871947523648} 894 | m_Position: {x: -72, y: 420, z: 0} 895 | - serializedVersion: 1 896 | m_State: {fileID: 1102224331994790198} 897 | m_Position: {x: -72, y: 480, z: 0} 898 | - serializedVersion: 1 899 | m_State: {fileID: 1102707657108370860} 900 | m_Position: {x: -72, y: 180, z: 0} 901 | - serializedVersion: 1 902 | m_State: {fileID: 1102641043948507600} 903 | m_Position: {x: -72, y: 240, z: 0} 904 | - serializedVersion: 1 905 | m_State: {fileID: 1102417192334865382} 906 | m_Position: {x: -72, y: 60, z: 0} 907 | - serializedVersion: 1 908 | m_State: {fileID: 1102189102039045246} 909 | m_Position: {x: -72, y: 120, z: 0} 910 | - serializedVersion: 1 911 | m_State: {fileID: 1102579084493029540} 912 | m_Position: {x: -72, y: 300, z: 0} 913 | - serializedVersion: 1 914 | m_State: {fileID: 1102134488706761436} 915 | m_Position: {x: -72, y: 360, z: 0} 916 | m_ChildStateMachines: [] 917 | m_AnyStateTransitions: 918 | - {fileID: 1101411365519417186} 919 | - {fileID: 1101693243957318532} 920 | - {fileID: 1101464055351837492} 921 | - {fileID: 1101586412280804510} 922 | - {fileID: 1101235773756414552} 923 | - {fileID: 1101354536610192414} 924 | - {fileID: 1101126080168673104} 925 | - {fileID: 1101789530714955442} 926 | m_EntryTransitions: [] 927 | m_StateMachineTransitions: {} 928 | m_StateMachineBehaviours: [] 929 | m_AnyStatePosition: {x: -312, y: 228, z: 0} 930 | m_EntryPosition: {x: 468, y: 228, z: 0} 931 | m_ExitPosition: {x: 468, y: 276, z: 0} 932 | m_ParentStateMachinePosition: {x: 800, y: 20, z: 0} 933 | m_DefaultState: {fileID: 1102417192334865382} 934 | --------------------------------------------------------------------------------