squash commits

This commit is contained in:
2025-01-07 18:54:46 +02:00
parent 855639487b
commit 62c0a21987
3632 changed files with 708443 additions and 999 deletions
@@ -0,0 +1,172 @@
namespace UMA
{
/// <summary>
/// Base class for Humanoid DNA converters.
/// </summary>
/// <remarks>
/// Holds hash values for all the bones used in the default UMA humanoid rig.
/// </remarks>
public class HumanoidDNAConverterBehaviour : DnaConverterBehaviour
{
static bool builtHashes = false;
static protected int headAdjustHash;
static protected int neckAdjustHash;
static protected int leftOuterBreastHash;
static protected int rightOuterBreastHash;
static protected int leftEyeHash;
static protected int rightEyeHash;
static protected int leftEyeAdjustHash;
static protected int rightEyeAdjustHash;
static protected int spine1AdjustHash;
static protected int spineAdjustHash;
static protected int lowerBackBellyHash;
static protected int lowerBackAdjustHash;
static protected int leftTrapeziusHash;
static protected int rightTrapeziusHash;
static protected int leftArmAdjustHash;
static protected int rightArmAdjustHash;
static protected int leftForeArmAdjustHash;
static protected int rightForeArmAdjustHash;
static protected int leftForeArmTwistAdjustHash;
static protected int rightForeArmTwistAdjustHash;
static protected int leftShoulderAdjustHash;
static protected int rightShoulderAdjustHash;
static protected int leftUpLegAdjustHash;
static protected int rightUpLegAdjustHash;
static protected int leftLegAdjustHash;
static protected int rightLegAdjustHash;
static protected int leftGluteusHash;
static protected int rightGluteusHash;
static protected int leftEarAdjustHash;
static protected int rightEarAdjustHash;
static protected int noseBaseAdjustHash;
static protected int noseMiddleAdjustHash;
static protected int leftNoseAdjustHash;
static protected int rightNoseAdjustHash;
static protected int upperLipsAdjustHash;
static protected int mandibleAdjustHash;
static protected int leftLowMaxilarAdjustHash;
static protected int rightLowMaxilarAdjustHash;
static protected int leftCheekAdjustHash;
static protected int rightCheekAdjustHash;
static protected int leftLowCheekAdjustHash;
static protected int rightLowCheekAdjustHash;
static protected int noseTopAdjustHash;
static protected int leftEyebrowLowAdjustHash;
static protected int rightEyebrowLowAdjustHash;
static protected int leftEyebrowMiddleAdjustHash;
static protected int rightEyebrowMiddleAdjustHash;
static protected int leftEyebrowUpAdjustHash;
static protected int rightEyebrowUpAdjustHash;
static protected int lipsSuperiorAdjustHash;
static protected int lipsInferiorAdjustHash;
static protected int leftLipsSuperiorMiddleAdjustHash;
static protected int rightLipsSuperiorMiddleAdjustHash;
static protected int leftLipsInferiorAdjustHash;
static protected int rightLipsInferiorAdjustHash;
static protected int leftLipsAdjustHash;
static protected int rightLipsAdjustHash;
static protected int globalHash;
static protected int positionHash;
static protected int lowerBackHash;
static protected int headHash;
static protected int leftArmHash;
static protected int rightArmHash;
static protected int leftForeArmHash;
static protected int rightForeArmHash;
static protected int leftHandHash;
static protected int rightHandHash;
static protected int leftFootHash;
static protected int rightFootHash;
static protected int leftUpLegHash;
static protected int rightUpLegHash;
static protected int leftShoulderHash;
static protected int rightShoulderHash;
static protected int mandibleHash;
public override void Prepare()
{
if (builtHashes)
{
return;
}
headAdjustHash = UMAUtils.StringToHash("HeadAdjust");
neckAdjustHash = UMAUtils.StringToHash("NeckAdjust");
leftOuterBreastHash = UMAUtils.StringToHash("LeftOuterBreast");
rightOuterBreastHash = UMAUtils.StringToHash("RightOuterBreast");
leftEyeHash = UMAUtils.StringToHash("LeftEye");
rightEyeHash = UMAUtils.StringToHash("RightEye");
leftEyeAdjustHash = UMAUtils.StringToHash("LeftEyeAdjust");
rightEyeAdjustHash = UMAUtils.StringToHash("RightEyeAdjust");
spine1AdjustHash = UMAUtils.StringToHash("Spine1Adjust");
spineAdjustHash = UMAUtils.StringToHash("SpineAdjust");
lowerBackBellyHash = UMAUtils.StringToHash("LowerBackBelly");
lowerBackAdjustHash = UMAUtils.StringToHash("LowerBackAdjust");
leftTrapeziusHash = UMAUtils.StringToHash("LeftTrapezius");
rightTrapeziusHash = UMAUtils.StringToHash("RightTrapezius");
leftArmAdjustHash = UMAUtils.StringToHash("LeftArmAdjust");
rightArmAdjustHash = UMAUtils.StringToHash("RightArmAdjust");
leftForeArmAdjustHash = UMAUtils.StringToHash("LeftForeArmAdjust");
rightForeArmAdjustHash = UMAUtils.StringToHash("RightForeArmAdjust");
leftForeArmTwistAdjustHash = UMAUtils.StringToHash("LeftForeArmTwistAdjust");
rightForeArmTwistAdjustHash = UMAUtils.StringToHash("RightForeArmTwistAdjust");
leftShoulderAdjustHash = UMAUtils.StringToHash("LeftShoulderAdjust");
rightShoulderAdjustHash = UMAUtils.StringToHash("RightShoulderAdjust");
leftUpLegAdjustHash = UMAUtils.StringToHash("LeftUpLegAdjust");
rightUpLegAdjustHash = UMAUtils.StringToHash("RightUpLegAdjust");
leftLegAdjustHash = UMAUtils.StringToHash("LeftLegAdjust");
rightLegAdjustHash = UMAUtils.StringToHash("RightLegAdjust");
leftGluteusHash = UMAUtils.StringToHash("LeftGluteus");
rightGluteusHash = UMAUtils.StringToHash("RightGluteus");
leftEarAdjustHash = UMAUtils.StringToHash("LeftEarAdjust");
rightEarAdjustHash = UMAUtils.StringToHash("RightEarAdjust");
noseBaseAdjustHash = UMAUtils.StringToHash("NoseBaseAdjust");
noseMiddleAdjustHash = UMAUtils.StringToHash("NoseMiddleAdjust");
leftNoseAdjustHash = UMAUtils.StringToHash("LeftNoseAdjust");
rightNoseAdjustHash = UMAUtils.StringToHash("RightNoseAdjust");
upperLipsAdjustHash = UMAUtils.StringToHash("UpperLipsAdjust");
mandibleAdjustHash = UMAUtils.StringToHash("MandibleAdjust");
leftLowMaxilarAdjustHash = UMAUtils.StringToHash("LeftLowMaxilarAdjust");
rightLowMaxilarAdjustHash = UMAUtils.StringToHash("RightLowMaxilarAdjust");
leftCheekAdjustHash = UMAUtils.StringToHash("LeftCheekAdjust");
rightCheekAdjustHash = UMAUtils.StringToHash("RightCheekAdjust");
leftLowCheekAdjustHash = UMAUtils.StringToHash("LeftLowCheekAdjust");
rightLowCheekAdjustHash = UMAUtils.StringToHash("RightLowCheekAdjust");
noseTopAdjustHash = UMAUtils.StringToHash("NoseTopAdjust");
leftEyebrowLowAdjustHash = UMAUtils.StringToHash("LeftEyebrowLowAdjust");
rightEyebrowLowAdjustHash = UMAUtils.StringToHash("RightEyebrowLowAdjust");
leftEyebrowMiddleAdjustHash = UMAUtils.StringToHash("LeftEyebrowMiddleAdjust");
rightEyebrowMiddleAdjustHash = UMAUtils.StringToHash("RightEyebrowMiddleAdjust");
leftEyebrowUpAdjustHash = UMAUtils.StringToHash("LeftEyebrowUpAdjust");
rightEyebrowUpAdjustHash = UMAUtils.StringToHash("RightEyebrowUpAdjust");
lipsSuperiorAdjustHash = UMAUtils.StringToHash("LipsSuperiorAdjust");
lipsInferiorAdjustHash = UMAUtils.StringToHash("LipsInferiorAdjust");
leftLipsSuperiorMiddleAdjustHash = UMAUtils.StringToHash("LeftLipsSuperiorMiddleAdjust");
rightLipsSuperiorMiddleAdjustHash = UMAUtils.StringToHash("RightLipsSuperiorMiddleAdjust");
leftLipsInferiorAdjustHash = UMAUtils.StringToHash("LeftLipsInferiorAdjust");
rightLipsInferiorAdjustHash = UMAUtils.StringToHash("RightLipsInferiorAdjust");
leftLipsAdjustHash = UMAUtils.StringToHash("LeftLipsAdjust");
rightLipsAdjustHash = UMAUtils.StringToHash("RightLipsAdjust");
globalHash = UMAUtils.StringToHash("Global");
positionHash = UMAUtils.StringToHash("Position");
lowerBackHash = UMAUtils.StringToHash("LowerBack");
headHash = UMAUtils.StringToHash("Head");
leftArmHash = UMAUtils.StringToHash("LeftArm");
rightArmHash = UMAUtils.StringToHash("RightArm");
leftForeArmHash = UMAUtils.StringToHash("LeftForeArm");
rightForeArmHash = UMAUtils.StringToHash("RightForeArm");
leftHandHash = UMAUtils.StringToHash("LeftHand");
rightHandHash = UMAUtils.StringToHash("RightHand");
leftFootHash = UMAUtils.StringToHash("LeftFoot");
rightFootHash = UMAUtils.StringToHash("RightFoot");
leftUpLegHash = UMAUtils.StringToHash("LeftUpLeg");
rightUpLegHash = UMAUtils.StringToHash("RightUpLeg");
leftShoulderHash = UMAUtils.StringToHash("LeftShoulder");
rightShoulderHash = UMAUtils.StringToHash("RightShoulder");
mandibleHash = UMAUtils.StringToHash("Mandible");
builtHashes = true;
}
}
}
@@ -0,0 +1,15 @@
fileFormatVersion: 2
guid: 4dddfeb7c1d47498c82430e5960d4cce
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
AssetOrigin:
serializedVersion: 1
productId: 35611
packageName: UMA 2
packageVersion: 2.13
assetPath: Assets/UMA/Core/Scripts/DNA/Legacy/HumanoidDNAConverterBehaviour.cs
uploadId: 679826
@@ -0,0 +1,31 @@
using UnityEngine;
namespace UMA
{
/// <summary>
/// Example DNA converter behaviour. Only adjusts distance between eyes.
/// </summary>
public class TutorialDNAConverterBehaviour : DnaConverterBehaviour
{
public TutorialDNAConverterBehaviour()
{
this.ApplyDnaAction = UpdateTutorialBones;
this.DNAType = typeof(UMADnaTutorial);
}
/// <summary>
/// Apply the DNA information about eye spacing to a skeleton.
/// </summary>
/// <param name="umaData">The character data.</param>
/// <param name="skeleton">Skeleton.</param>
public static void UpdateTutorialBones(UMAData umaData, UMASkeleton skeleton)
{
var umaDna = umaData.GetDna<UMADnaTutorial>();
float spacing = (umaDna.eyeSpacing - 0.5f) * 0.01f;
skeleton.SetPositionRelative(UMAUtils.StringToHash("LeftEye"), new Vector3(0f, -spacing, 0f));
skeleton.SetPositionRelative(UMAUtils.StringToHash("RightEye"), new Vector3(0f, spacing, 0f));
}
}
}
@@ -0,0 +1,15 @@
fileFormatVersion: 2
guid: 461a6e020632b416b879aa3a48c5638e
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
AssetOrigin:
serializedVersion: 1
productId: 35611
packageName: UMA 2
packageVersion: 2.13
assetPath: Assets/UMA/Core/Scripts/DNA/Legacy/TutorialDNAConverterBehaviour.cs
uploadId: 679826
@@ -0,0 +1,55 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &100000
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
serializedVersion: 5
m_Component:
- component: {fileID: 400000}
- component: {fileID: 11400000}
m_Layer: 0
m_Name: TutorialDNAConverterBehaviour
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &400000
Transform:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 100000}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0.2752999, y: 1.682059, z: -0.43053064}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 100000}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 461a6e020632b416b879aa3a48c5638e, type: 3}
m_Name:
m_EditorClassIdentifier:
_displayValue:
dnaTypeHash: -1679007774
--- !u!1001 &100100000
Prefab:
m_ObjectHideFlags: 1
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications: []
m_RemovedComponents: []
m_ParentPrefab: {fileID: 0}
m_RootGameObject: {fileID: 100000}
m_IsPrefabParent: 1
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 2a5c36ccd1f394ff3b7aac62b5d1e308
NativeFormatImporter:
userData:
AssetOrigin:
serializedVersion: 1
productId: 35611
packageName: UMA 2
packageVersion: 2.13
assetPath: Assets/UMA/Core/Scripts/DNA/Legacy/TutorialDNAConverterBehaviour.prefab
uploadId: 679826
@@ -0,0 +1,7 @@
namespace UMA
{
public abstract partial class UMADna : UMADnaBase
{
}
}
@@ -0,0 +1,15 @@
fileFormatVersion: 2
guid: 874a34061c7cbe64fbd33c61faaefd26
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
AssetOrigin:
serializedVersion: 1
productId: 35611
packageName: UMA 2
packageVersion: 2.13
assetPath: Assets/UMA/Core/Scripts/DNA/Legacy/UMADna.cs
uploadId: 679826
@@ -0,0 +1,69 @@
namespace UMA
{
/// <summary>
/// Humanoid DNA.
/// </summary>
/// <remarks>
/// Contains a large number of variables for the ways that the
/// basic UMA human models can be adjusted to create different
/// body shapes and sizes.
/// </remarks>
[System.Serializable]
public partial class UMADnaHumanoid : UMADna
{
public float height = 0.5f;
public float headSize = 0.5f;
public float headWidth = 0.5f;
public float neckThickness = 0.5f;
public float armLength = 0.5f;
public float forearmLength = 0.5f;
public float armWidth = 0.5f;
public float forearmWidth = 0.5f;
public float handsSize = 0.5f;
public float feetSize = 0.5f;
public float legSeparation = 0.5f;
public float upperMuscle = 0.5f;
public float lowerMuscle = 0.5f;
public float upperWeight = 0.5f;
public float lowerWeight = 0.5f;
public float legsSize = 0.5f;
public float belly = 0.5f;
public float waist = 0.5f;
public float gluteusSize = 0.5f;
public float earsSize = 0.5f;
public float earsPosition = 0.5f;
public float earsRotation = 0.5f;
public float noseSize = 0.5f;
public float noseCurve = 0.5f;
public float noseWidth = 0.5f;
public float noseInclination = 0.5f;
public float nosePosition = 0.5f;
public float nosePronounced = 0.5f;
public float noseFlatten = 0.5f;
public float chinSize = 0.5f;
public float chinPronounced = 0.5f;
public float chinPosition = 0.5f;
public float mandibleSize = 0.5f;
public float jawsSize = 0.5f;
public float jawsPosition = 0.5f;
public float cheekSize = 0.5f;
public float cheekPosition = 0.5f;
public float lowCheekPronounced = 0.5f;
public float lowCheekPosition = 0.5f;
public float foreheadSize = 0.5f;
public float foreheadPosition = 0.5f;
public float lipsSize = 0.5f;
public float mouthSize = 0.5f;
public float eyeRotation = 0.5f;
public float eyeSize = 0.5f;
public float breastSize = 0.5f;
}
}
@@ -0,0 +1,15 @@
fileFormatVersion: 2
guid: 1928e74356386b64795aeafad7902c3d
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
AssetOrigin:
serializedVersion: 1
productId: 35611
packageName: UMA 2
packageVersion: 2.13
assetPath: Assets/UMA/Core/Scripts/DNA/Legacy/UMADnaHumanoid.cs
uploadId: 679826
@@ -0,0 +1,466 @@
// UMA Auto genered code, DO NOT MODIFY!!!
// All changes to this file will be destroyed without warning or confirmation!
// Use double { to escape a single curly bracket
//
// template junk executed per dna Field , the accumulated content is available through the {0:ID} tag
//
//#TEMPLATE GetValues UmaDnaChild_GetIndex_Fragment.cs.txt
//#TEMPLATE SetValues UmaDnaChild_SetIndex_Fragment.cs.txt
//#TEMPLATE GetValue UmaDnaChild_GetValue_Fragment.cs.txt
//#TEMPLATE SetValue UmaDnaChild_SetValue_Fragment.cs.txt
//#TEMPLATE GetNames UmaDnaChild_GetNames_Fragment.cs.txt
//
// Byte Serialization Handling
//
//#TEMPLATE Byte_Fields UmaDnaChild_Byte_Fields_Fragment.cs.txt
//#TEMPLATE Byte_ToDna UmaDnaChild_Byte_ToDna_Fragment.cs.txt
//#TEMPLATE Byte_FromDna UmaDnaChild_Byte_FromDna_Fragment.cs.txt
//
namespace UMA
{
public partial class UMADnaHumanoid
{
public override int Count { get { return 46; } }
public override float[] Values
{
get
{
return new float[]
{
height,
headSize,
headWidth,
neckThickness,
armLength,
forearmLength,
armWidth,
forearmWidth,
handsSize,
feetSize,
legSeparation,
upperMuscle,
lowerMuscle,
upperWeight,
lowerWeight,
legsSize,
belly,
waist,
gluteusSize,
earsSize,
earsPosition,
earsRotation,
noseSize,
noseCurve,
noseWidth,
noseInclination,
nosePosition,
nosePronounced,
noseFlatten,
chinSize,
chinPronounced,
chinPosition,
mandibleSize,
jawsSize,
jawsPosition,
cheekSize,
cheekPosition,
lowCheekPronounced,
lowCheekPosition,
foreheadSize,
foreheadPosition,
lipsSize,
mouthSize,
eyeRotation,
eyeSize,
breastSize,
};
}
set
{
height = value[0];
headSize = value[1];
headWidth = value[2];
neckThickness = value[3];
armLength = value[4];
forearmLength = value[5];
armWidth = value[6];
forearmWidth = value[7];
handsSize = value[8];
feetSize = value[9];
legSeparation = value[10];
upperMuscle = value[11];
lowerMuscle = value[12];
upperWeight = value[13];
lowerWeight = value[14];
legsSize = value[15];
belly = value[16];
waist = value[17];
gluteusSize = value[18];
earsSize = value[19];
earsPosition = value[20];
earsRotation = value[21];
noseSize = value[22];
noseCurve = value[23];
noseWidth = value[24];
noseInclination = value[25];
nosePosition = value[26];
nosePronounced = value[27];
noseFlatten = value[28];
chinSize = value[29];
chinPronounced = value[30];
chinPosition = value[31];
mandibleSize = value[32];
jawsSize = value[33];
jawsPosition = value[34];
cheekSize = value[35];
cheekPosition = value[36];
lowCheekPronounced = value[37];
lowCheekPosition = value[38];
foreheadSize = value[39];
foreheadPosition = value[40];
lipsSize = value[41];
mouthSize = value[42];
eyeRotation = value[43];
eyeSize = value[44];
breastSize = value[45];
}
}
public override float GetValue(int idx)
{
switch(idx)
{
case 0: return height;
case 1: return headSize;
case 2: return headWidth;
case 3: return neckThickness;
case 4: return armLength;
case 5: return forearmLength;
case 6: return armWidth;
case 7: return forearmWidth;
case 8: return handsSize;
case 9: return feetSize;
case 10: return legSeparation;
case 11: return upperMuscle;
case 12: return lowerMuscle;
case 13: return upperWeight;
case 14: return lowerWeight;
case 15: return legsSize;
case 16: return belly;
case 17: return waist;
case 18: return gluteusSize;
case 19: return earsSize;
case 20: return earsPosition;
case 21: return earsRotation;
case 22: return noseSize;
case 23: return noseCurve;
case 24: return noseWidth;
case 25: return noseInclination;
case 26: return nosePosition;
case 27: return nosePronounced;
case 28: return noseFlatten;
case 29: return chinSize;
case 30: return chinPronounced;
case 31: return chinPosition;
case 32: return mandibleSize;
case 33: return jawsSize;
case 34: return jawsPosition;
case 35: return cheekSize;
case 36: return cheekPosition;
case 37: return lowCheekPronounced;
case 38: return lowCheekPosition;
case 39: return foreheadSize;
case 40: return foreheadPosition;
case 41: return lipsSize;
case 42: return mouthSize;
case 43: return eyeRotation;
case 44: return eyeSize;
case 45: return breastSize;
}
throw new System.ArgumentOutOfRangeException();
}
public override void SetValue(int idx, float value)
{
switch(idx)
{
case 0: height = value; return;
case 1: headSize = value; return;
case 2: headWidth = value; return;
case 3: neckThickness = value; return;
case 4: armLength = value; return;
case 5: forearmLength = value; return;
case 6: armWidth = value; return;
case 7: forearmWidth = value; return;
case 8: handsSize = value; return;
case 9: feetSize = value; return;
case 10: legSeparation = value; return;
case 11: upperMuscle = value; return;
case 12: lowerMuscle = value; return;
case 13: upperWeight = value; return;
case 14: lowerWeight = value; return;
case 15: legsSize = value; return;
case 16: belly = value; return;
case 17: waist = value; return;
case 18: gluteusSize = value; return;
case 19: earsSize = value; return;
case 20: earsPosition = value; return;
case 21: earsRotation = value; return;
case 22: noseSize = value; return;
case 23: noseCurve = value; return;
case 24: noseWidth = value; return;
case 25: noseInclination = value; return;
case 26: nosePosition = value; return;
case 27: nosePronounced = value; return;
case 28: noseFlatten = value; return;
case 29: chinSize = value; return;
case 30: chinPronounced = value; return;
case 31: chinPosition = value; return;
case 32: mandibleSize = value; return;
case 33: jawsSize = value; return;
case 34: jawsPosition = value; return;
case 35: cheekSize = value; return;
case 36: cheekPosition = value; return;
case 37: lowCheekPronounced = value; return;
case 38: lowCheekPosition = value; return;
case 39: foreheadSize = value; return;
case 40: foreheadPosition = value; return;
case 41: lipsSize = value; return;
case 42: mouthSize = value; return;
case 43: eyeRotation = value; return;
case 44: eyeSize = value; return;
case 45: breastSize = value; return;
}
throw new System.ArgumentOutOfRangeException();
}
public static string[] GetNames()
{
return new string[]
{
"height",
"headSize",
"headWidth",
"neckThickness",
"armLength",
"forearmLength",
"armWidth",
"forearmWidth",
"handsSize",
"feetSize",
"legSeparation",
"upperMuscle",
"lowerMuscle",
"upperWeight",
"lowerWeight",
"legsSize",
"belly",
"waist",
"gluteusSize",
"earsSize",
"earsPosition",
"earsRotation",
"noseSize",
"noseCurve",
"noseWidth",
"noseInclination",
"nosePosition",
"nosePronounced",
"noseFlatten",
"chinSize",
"chinPronounced",
"chinPosition",
"mandibleSize",
"jawsSize",
"jawsPosition",
"cheekSize",
"cheekPosition",
"lowCheekPronounced",
"lowCheekPosition",
"foreheadSize",
"foreheadPosition",
"lipsSize",
"mouthSize",
"eyeRotation",
"eyeSize",
"breastSize",
};
}
public override string[] Names
{
get
{
return GetNames();
}
}
public static UMADnaHumanoid LoadInstance(string data)
{
return UnityEngine.JsonUtility.FromJson<UMADnaHumanoid_Byte>(data).ToDna();
}
public static string SaveInstance(UMADnaHumanoid instance)
{
return UnityEngine.JsonUtility.ToJson(UMADnaHumanoid_Byte.FromDna(instance));
}
}
[System.Serializable]
public class UMADnaHumanoid_Byte
{
public System.Byte height;
public System.Byte headSize;
public System.Byte headWidth;
public System.Byte neckThickness;
public System.Byte armLength;
public System.Byte forearmLength;
public System.Byte armWidth;
public System.Byte forearmWidth;
public System.Byte handsSize;
public System.Byte feetSize;
public System.Byte legSeparation;
public System.Byte upperMuscle;
public System.Byte lowerMuscle;
public System.Byte upperWeight;
public System.Byte lowerWeight;
public System.Byte legsSize;
public System.Byte belly;
public System.Byte waist;
public System.Byte gluteusSize;
public System.Byte earsSize;
public System.Byte earsPosition;
public System.Byte earsRotation;
public System.Byte noseSize;
public System.Byte noseCurve;
public System.Byte noseWidth;
public System.Byte noseInclination;
public System.Byte nosePosition;
public System.Byte nosePronounced;
public System.Byte noseFlatten;
public System.Byte chinSize;
public System.Byte chinPronounced;
public System.Byte chinPosition;
public System.Byte mandibleSize;
public System.Byte jawsSize;
public System.Byte jawsPosition;
public System.Byte cheekSize;
public System.Byte cheekPosition;
public System.Byte lowCheekPronounced;
public System.Byte lowCheekPosition;
public System.Byte foreheadSize;
public System.Byte foreheadPosition;
public System.Byte lipsSize;
public System.Byte mouthSize;
public System.Byte eyeRotation;
public System.Byte eyeSize;
public System.Byte breastSize;
public UMADnaHumanoid ToDna()
{
var res = new UMADnaHumanoid();
res.height = height * (1f / 255f);
res.headSize = headSize * (1f / 255f);
res.headWidth = headWidth * (1f / 255f);
res.neckThickness = neckThickness * (1f / 255f);
res.armLength = armLength * (1f / 255f);
res.forearmLength = forearmLength * (1f / 255f);
res.armWidth = armWidth * (1f / 255f);
res.forearmWidth = forearmWidth * (1f / 255f);
res.handsSize = handsSize * (1f / 255f);
res.feetSize = feetSize * (1f / 255f);
res.legSeparation = legSeparation * (1f / 255f);
res.upperMuscle = upperMuscle * (1f / 255f);
res.lowerMuscle = lowerMuscle * (1f / 255f);
res.upperWeight = upperWeight * (1f / 255f);
res.lowerWeight = lowerWeight * (1f / 255f);
res.legsSize = legsSize * (1f / 255f);
res.belly = belly * (1f / 255f);
res.waist = waist * (1f / 255f);
res.gluteusSize = gluteusSize * (1f / 255f);
res.earsSize = earsSize * (1f / 255f);
res.earsPosition = earsPosition * (1f / 255f);
res.earsRotation = earsRotation * (1f / 255f);
res.noseSize = noseSize * (1f / 255f);
res.noseCurve = noseCurve * (1f / 255f);
res.noseWidth = noseWidth * (1f / 255f);
res.noseInclination = noseInclination * (1f / 255f);
res.nosePosition = nosePosition * (1f / 255f);
res.nosePronounced = nosePronounced * (1f / 255f);
res.noseFlatten = noseFlatten * (1f / 255f);
res.chinSize = chinSize * (1f / 255f);
res.chinPronounced = chinPronounced * (1f / 255f);
res.chinPosition = chinPosition * (1f / 255f);
res.mandibleSize = mandibleSize * (1f / 255f);
res.jawsSize = jawsSize * (1f / 255f);
res.jawsPosition = jawsPosition * (1f / 255f);
res.cheekSize = cheekSize * (1f / 255f);
res.cheekPosition = cheekPosition * (1f / 255f);
res.lowCheekPronounced = lowCheekPronounced * (1f / 255f);
res.lowCheekPosition = lowCheekPosition * (1f / 255f);
res.foreheadSize = foreheadSize * (1f / 255f);
res.foreheadPosition = foreheadPosition * (1f / 255f);
res.lipsSize = lipsSize * (1f / 255f);
res.mouthSize = mouthSize * (1f / 255f);
res.eyeRotation = eyeRotation * (1f / 255f);
res.eyeSize = eyeSize * (1f / 255f);
res.breastSize = breastSize * (1f / 255f);
return res;
}
public static UMADnaHumanoid_Byte FromDna(UMADnaHumanoid dna)
{
var res = new UMADnaHumanoid_Byte();
res.height = (System.Byte)(dna.height * 255f+0.5f);
res.headSize = (System.Byte)(dna.headSize * 255f+0.5f);
res.headWidth = (System.Byte)(dna.headWidth * 255f+0.5f);
res.neckThickness = (System.Byte)(dna.neckThickness * 255f+0.5f);
res.armLength = (System.Byte)(dna.armLength * 255f+0.5f);
res.forearmLength = (System.Byte)(dna.forearmLength * 255f+0.5f);
res.armWidth = (System.Byte)(dna.armWidth * 255f+0.5f);
res.forearmWidth = (System.Byte)(dna.forearmWidth * 255f+0.5f);
res.handsSize = (System.Byte)(dna.handsSize * 255f+0.5f);
res.feetSize = (System.Byte)(dna.feetSize * 255f+0.5f);
res.legSeparation = (System.Byte)(dna.legSeparation * 255f+0.5f);
res.upperMuscle = (System.Byte)(dna.upperMuscle * 255f+0.5f);
res.lowerMuscle = (System.Byte)(dna.lowerMuscle * 255f+0.5f);
res.upperWeight = (System.Byte)(dna.upperWeight * 255f+0.5f);
res.lowerWeight = (System.Byte)(dna.lowerWeight * 255f+0.5f);
res.legsSize = (System.Byte)(dna.legsSize * 255f+0.5f);
res.belly = (System.Byte)(dna.belly * 255f+0.5f);
res.waist = (System.Byte)(dna.waist * 255f+0.5f);
res.gluteusSize = (System.Byte)(dna.gluteusSize * 255f+0.5f);
res.earsSize = (System.Byte)(dna.earsSize * 255f+0.5f);
res.earsPosition = (System.Byte)(dna.earsPosition * 255f+0.5f);
res.earsRotation = (System.Byte)(dna.earsRotation * 255f+0.5f);
res.noseSize = (System.Byte)(dna.noseSize * 255f+0.5f);
res.noseCurve = (System.Byte)(dna.noseCurve * 255f+0.5f);
res.noseWidth = (System.Byte)(dna.noseWidth * 255f+0.5f);
res.noseInclination = (System.Byte)(dna.noseInclination * 255f+0.5f);
res.nosePosition = (System.Byte)(dna.nosePosition * 255f+0.5f);
res.nosePronounced = (System.Byte)(dna.nosePronounced * 255f+0.5f);
res.noseFlatten = (System.Byte)(dna.noseFlatten * 255f+0.5f);
res.chinSize = (System.Byte)(dna.chinSize * 255f+0.5f);
res.chinPronounced = (System.Byte)(dna.chinPronounced * 255f+0.5f);
res.chinPosition = (System.Byte)(dna.chinPosition * 255f+0.5f);
res.mandibleSize = (System.Byte)(dna.mandibleSize * 255f+0.5f);
res.jawsSize = (System.Byte)(dna.jawsSize * 255f+0.5f);
res.jawsPosition = (System.Byte)(dna.jawsPosition * 255f+0.5f);
res.cheekSize = (System.Byte)(dna.cheekSize * 255f+0.5f);
res.cheekPosition = (System.Byte)(dna.cheekPosition * 255f+0.5f);
res.lowCheekPronounced = (System.Byte)(dna.lowCheekPronounced * 255f+0.5f);
res.lowCheekPosition = (System.Byte)(dna.lowCheekPosition * 255f+0.5f);
res.foreheadSize = (System.Byte)(dna.foreheadSize * 255f+0.5f);
res.foreheadPosition = (System.Byte)(dna.foreheadPosition * 255f+0.5f);
res.lipsSize = (System.Byte)(dna.lipsSize * 255f+0.5f);
res.mouthSize = (System.Byte)(dna.mouthSize * 255f+0.5f);
res.eyeRotation = (System.Byte)(dna.eyeRotation * 255f+0.5f);
res.eyeSize = (System.Byte)(dna.eyeSize * 255f+0.5f);
res.breastSize = (System.Byte)(dna.breastSize * 255f+0.5f);
return res;
}
}
}
@@ -0,0 +1,19 @@
fileFormatVersion: 2
guid: 92db5a2bef85c8a49bd095e03118735e
timeCreated: 1426456705
licenseType: Store
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 35611
packageName: UMA 2
packageVersion: 2.13
assetPath: Assets/UMA/Core/Scripts/DNA/Legacy/UMADnaHumanoid_Generated.cs
uploadId: 679826
@@ -0,0 +1,8 @@
namespace UMA
{
[System.Serializable]
public partial class UMADnaTutorial : UMADna
{
public float eyeSpacing = 0.5f;
}
}
@@ -0,0 +1,15 @@
fileFormatVersion: 2
guid: eaf5b852437ea4db0a37bba17017d480
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
AssetOrigin:
serializedVersion: 1
productId: 35611
packageName: UMA 2
packageVersion: 2.13
assetPath: Assets/UMA/Core/Scripts/DNA/Legacy/UMADnaTutorial.cs
uploadId: 679826
@@ -0,0 +1,106 @@
// UMA Auto genered code, DO NOT MODIFY!!!
// All changes to this file will be destroyed without warning or confirmation!
// Use double { to escape a single curly bracket
//
// template junk executed per dna Field , the accumulated content is available through the {0:ID} tag
//
//#TEMPLATE GetValues UmaDnaChild_GetIndex_Fragment.cs.txt
//#TEMPLATE SetValues UmaDnaChild_SetIndex_Fragment.cs.txt
//#TEMPLATE GetValue UmaDnaChild_GetValue_Fragment.cs.txt
//#TEMPLATE SetValue UmaDnaChild_SetValue_Fragment.cs.txt
//#TEMPLATE GetNames UmaDnaChild_GetNames_Fragment.cs.txt
//
// Byte Serialization Handling
//
//#TEMPLATE Byte_Fields UmaDnaChild_Byte_Fields_Fragment.cs.txt
//#TEMPLATE Byte_ToDna UmaDnaChild_Byte_ToDna_Fragment.cs.txt
//#TEMPLATE Byte_FromDna UmaDnaChild_Byte_FromDna_Fragment.cs.txt
//
namespace UMA
{
public partial class UMADnaTutorial
{
public override int Count { get { return 1; } }
public override float[] Values
{
get
{
return new float[]
{
eyeSpacing,
};
}
set
{
eyeSpacing = value[0];
}
}
public override float GetValue(int idx)
{
switch(idx)
{
case 0: return eyeSpacing;
}
throw new System.ArgumentOutOfRangeException();
}
public override void SetValue(int idx, float value)
{
switch(idx)
{
case 0: eyeSpacing = value; return;
}
throw new System.ArgumentOutOfRangeException();
}
public static string[] GetNames()
{
return new string[]
{
"eyeSpacing",
};
}
public override string[] Names
{
get
{
return GetNames();
}
}
public static UMADnaTutorial LoadInstance(string data)
{
return UnityEngine.JsonUtility.FromJson<UMADnaTutorial_Byte>(data).ToDna();
}
public static string SaveInstance(UMADnaTutorial instance)
{
return UnityEngine.JsonUtility.ToJson(UMADnaTutorial_Byte.FromDna(instance));
}
}
[System.Serializable]
public class UMADnaTutorial_Byte
{
public System.Byte eyeSpacing;
public UMADnaTutorial ToDna()
{
var res = new UMADnaTutorial();
res.eyeSpacing = eyeSpacing * (1f / 255f);
return res;
}
public static UMADnaTutorial_Byte FromDna(UMADnaTutorial dna)
{
var res = new UMADnaTutorial_Byte();
res.eyeSpacing = (System.Byte)(dna.eyeSpacing * 255f+0.5f);
return res;
}
}
}
@@ -0,0 +1,19 @@
fileFormatVersion: 2
guid: acb2973fae9fe3945b0f810cf4ba6269
timeCreated: 1426456705
licenseType: Store
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 35611
packageName: UMA 2
packageVersion: 2.13
assetPath: Assets/UMA/Core/Scripts/DNA/Legacy/UMADnaTutorial_Generated.cs
uploadId: 679826
@@ -0,0 +1,117 @@
// UMA Auto genered code, DO NOT MODIFY!!!
// All changes to this file will be destroyed without warning or confirmation!
// Use double { to escape a single curly bracket
//
// template junk executed per UMADna derived sub class, the accumulated content is available through the {0:ID} tag
//
//#TEMPLATE GetNames UmaDna_GetNames_Fragment.cs.txt
//#TEMPLATE GetType UmaDna_GetType_Fragment.cs.txt
//#TEMPLATE GetTypes UmaDna_GetTypes_Fragment.cs.txt
//#TEMPLATE Load UmaDna_Load_Fragment.cs.txt
//#TEMPLATE Save UmaDna_Save_Fragment.cs.txt
//
namespace UMA
{
public abstract partial class UMADna
{
public static string[] GetNames(System.Type dnaType)
{
if( dnaType == typeof(UMADnaHumanoid) )
{
return UMADnaHumanoid.GetNames();
}
if ( dnaType == typeof(UMADnaTutorial) )
{
return UMADnaTutorial.GetNames();
}
if ( dnaType == typeof(DynamicUMADna) )
{
return DynamicUMADna.GetNames();
}
return new string[0];
}
public static System.Type GetType(System.String className)
{
if( "UMADnaHumanoid" == className )
{
return typeof(UMADnaHumanoid);
}
if ( "UMADnaTutorial" == className )
{
return typeof(UMADnaTutorial);
}
if ( "DynamicUMADna" == className )
{
return typeof(DynamicUMADna);
}
return null;
}
public static System.Type[] GetTypes()
{
return new System.Type[]
{
typeof(UMADnaHumanoid),
typeof(UMADnaTutorial),
typeof(DynamicUMADna),
};
}
public static UMADnaBase LoadInstance(System.Type dnaType, System.String data)
{
if( dnaType == typeof(UMADnaHumanoid))
{
return UMADnaHumanoid.LoadInstance(data);
}
if ( dnaType == typeof(UMADnaTutorial))
{
return UMADnaTutorial.LoadInstance(data);
}
if ( dnaType == typeof(DynamicUMADna))
{
return DynamicUMADna.LoadInstance(data);
}
return null;
}
public static System.String SaveInstance(UMADnaBase instance)
{
System.Type dnaType = instance.GetType();
if( dnaType == typeof(UMADnaHumanoid))
{
return UMADnaHumanoid.SaveInstance(instance as UMADnaHumanoid);
}
if ( dnaType == typeof(UMADnaTutorial))
{
return UMADnaTutorial.SaveInstance(instance as UMADnaTutorial);
}
if ( dnaType == typeof(DynamicUMADna))
{
return DynamicUMADna.SaveInstance(instance as DynamicUMADna);
}
return null;
}
}
}
@@ -0,0 +1,19 @@
fileFormatVersion: 2
guid: 0f206c530b2ebc34cb647c71a68a825c
timeCreated: 1426456705
licenseType: Store
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 35611
packageName: UMA 2
packageVersion: 2.13
assetPath: Assets/UMA/Core/Scripts/DNA/Legacy/UMADna_Generated.cs
uploadId: 679826