bschumacher
Member
See Yolan's post.
Last edited:
I created a simpler process that automates this and doesn't require modifications to UMA or UCC. Basically same steps as above (bone builder works to shorten that process) but no code modifications. Just add the UCCUma script to your avatar.
https://github.com/yolanother/UCCExtensions
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.
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);
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);
}
DeterministicObjectManager.RegisterCharacter(go.GetComponent<UltimateCharacterLocomotion>());