UMA 2 - Howto

Also when you add line 264 you will need to remove the #if UNITY_EDITOR macros surrounding the Start or that code won't be included in the game build.

That's how it was when I found it, doesn't look like it does anything except provide the checkbox to enable/disable.
 
UMA doesn't like that Items is created under the left and right hand with the same name. =/

AddBonesRecursive: Items already exists in the dictionary! Consider renaming those bones. For example, `Items` under each hand bone can become `LeftItems` and `RightItems`.
 
@line 449: CharacterBuilder.cs
C#:
                            var items = new GameObject("LeftItems");
                            items.transform.SetParentOrigin(leftHand.transform);
                            var itemSlot = items.AddComponent<Items.ItemSlot>();
                            itemSlot.ID = 1;
                        }
                        if (rightHand.GetComponentInChildren<Items.ItemSlot>() == null) {
                            var items = new GameObject("RightItems");
                            items.transform.SetParentOrigin(rightHand.transform);
 
More incompatible stuff.

Weapons, there are a lot of duplicate bones created with the same name.

My initial thought is to just add the name of the item to the prefabs.

In UMA we can hide the head with a wardrobe change so we don't need the extra first person weapon as well.

We would switch the animators at runtime, probably.

Layers are different too though, Overlay vs Subcharacter.
 
My solution is going to be to keep the game third person until this is supported. Eliminating having to deal with first person issues as well.

line 560: ItemBuilder.cs
C#:
                shootableProperties.FirePointLocation = CreateGameObject(firstPersonObject.name +  "Fire Point", parent);
                shootableProperties.MuzzleFlashLocation = CreateGameObject(firstPersonObject.name + " Muzzle Flash", parent);
                shootableProperties.ShellLocation = CreateGameObject(firstPersonObject.name + " Shell Eject Point", parent);
            }
#endif
            if (thirdPersonObject != null) {
                var shootableProperties = itemGameObject.AddComponent<ThirdPersonController.Items.ThirdPersonShootableWeaponProperties>();
                // Setup the standard references.
                shootableProperties.ActionID = actionID;
                shootableProperties.FirePointLocation = CreateGameObject(thirdPersonObject.name + " Fire Point", thirdPersonObject.transform);
                shootableProperties.MuzzleFlashLocation = CreateGameObject(thirdPersonObject.name + " Muzzle Flash", thirdPersonObject.transform);
                shootableProperties.ShellLocation = CreateGameObject(thirdPersonObject.name + " Shell Eject Point", thirdPersonObject.transform);
            }

It might be a good idea @ line 261 & 360 to make the First and Third Person objects named as such whether or not there is a character, for name separation purposes in the UMA bone dictionary.
 
Now everything's looking good no errors, weapon on character.

I notice there's some other stuff that needs to be renamed as well though that get created with the Item and the weapon doesn't fire.
 
Last edited:
While creating third person characters I get this sometimes:
Error: Unable to find the movement type with name Opsive.UltimateCharacterController.FirstPersonController.Character.MovementTypes.Combat

I think when I use the Nolan presets. But if I don't use those I miss out on all the state so I'll have to filter it and retry without first person states in a new preset.

And it spits out a bunch of errors of course =(.
 
Last edited:
Thanks for the input! I removed my earlier thread because after looking through Yolan's code I figured out I never properly installed UMA 2, and I've been using UMA 1 this whole time without realizing it. I think UMA 2 may have fixed a lot of my issues with UMA 1, so I'm going to investigate this a bit more before I decide how to proceed. Thanks again for you and Yolan for investigating this so quickly!
 
I'm not sure how good my plan is but I'll try to keep this thread updated with relevant progress.

Currently I have a client auto-joining the game server and going to a modified character creation screen which instantiates my UMA prefab then when they are done customizing it sends them into the game level with that prefab being set persistent with DoNotDestroy.

I'm getting some errors in the Deterministic Object Manager now the character doesn't show up in the characters list. But it was working when I instantiated single player directly into the game scene and single player from character creation to game screen.

Still trying to figure out the best way to do multiplayer. Earlier tests loading multiplayer directly into the game scene and using a spawner everything seemed to work at least with the one assault rifle that I have added.
 
C#:
            DeterministicObjectManager.RegisterCharacter(go.GetComponent<UltimateCharacterLocomotion>());
Add that into your spawning code, to fix that last issue I had.

I have little hacks all over the place to fix null reference exceptions in the camera controller, object fader and other places that have to do with runtime initialization or add stuff to maps, checking for duplicate indexes before adding, etc. I'm sure there's a more elegant approach but I'll have to figure that out later.
 
That sounds great! I'd like to understand how it works with multiplayer but I'm working exclusively in single player. There's a lot in UMA 2 that I'm not familiar with yet, but I have some questions about what your character creation screen allows. Specifically, how much control do you give them over the UMADna, do you let them manipulate the body sliders at all? I had a bunch of issues in my UMA 1 integration with the male and female characters needing specific animations for their individual avatars. The dna sliders have to be restricted, as I know from my experiments setting the base recipe with all the UMADna values set to 1 produces bloated monstrosities that look ridiculous trying to hold items, but I'm trying to get a sense of how much variance I can apply to the base prefab without it looking wrong.
 
I wouldn't use what I've implemented so far as good multiplayer stuff. It's the bare minimum and with multiple clients I'm sure there would be chaos. lol, I'm about to test that in a little bit.

*EDIT*
Definitely chaos, my next challenge =) now I can leave Justin alone for a bit, until I try the horse out.

I'm not restricting anything for now, you can check out the current progress @ https://opsive.com/forum/index.php?threads/an-as-of-yet-unnamed-shooter-game.12/
 
Last edited:
I'm also not using the camera controller in the character creation screen so the character kind of just twitches in that screen. Twitches itself into decimation, starts to look awkward pretty quick.
 
Network is going to be pretty basic, I'm using TNet 3 which syncs the input from the players across the network and sets the rigidbody position once per second. I'll probably end up extending TNet's channel system to auto connect to multiple servers as the characters change zones eventually and host dedicated instances that provide authority, as I understand it the host of the channel is authoritative.
 
Top