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,51 @@
using UnityEngine;
namespace UMA.Examples
{
public class Locomotion : MonoBehaviour
{
protected Animator animator;
public float DirectionDampTime = .25f;
void Start()
{
animator = GetComponent<Animator>();
if (animator == null)
{
return;
}
if (animator.layerCount >= 2)
{
animator.SetLayerWeight(1, 1);
}
}
void Update()
{
if (animator)
{
float h = Input.GetAxis("Horizontal");
float v = Input.GetAxis("Vertical");
animator.SetFloat("Speed", h * h + v * v);
animator.SetFloat("Direction", h, DirectionDampTime, Time.deltaTime);
}
else
{
animator = GetComponent<Animator>();
}
}
void OnCollisionEnter(Collision collision)
{
if (Debug.isDebugBuild)
{
Debug.Log(collision.collider.name + ":" + name);
}
}
}
}
@@ -0,0 +1,15 @@
fileFormatVersion: 2
guid: b003f49536bd7c8428486a98fb3cc4fb
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
AssetOrigin:
serializedVersion: 1
productId: 35611
packageName: UMA 2
packageVersion: 2.13
assetPath: Assets/UMA/Content/Example/AdditionalSlots/Locomotion/Locomotion.cs
uploadId: 679826
@@ -0,0 +1,30 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 9448878e2e40f1a4c9f8fd2b56832b13, type: 3}
m_Name: LocomotionRecipe
m_EditorClassIdentifier:
label:
resourcesOnly: 0
recipeType: Standard
DisplayValue:
compatibleRaces: []
wardrobeRecipeThumbs: []
wardrobeSlot: None
Appended: 0
Hides: []
HideTags: []
suppressWardrobeSlots: []
activeWardrobeSet: []
MeshHideAssets: []
OverrideDNA:
PreloadValues: []
recipeString: '{"version":2,"packedSlotDataList":null,"slotsV2":[{"id":"Locomotion","scale":100,"copyIdx":-1,"overlays":[]}],"colors":[],"sharedColorCount":0,"race":null,"umaDna":{},"packedDna":[]}'
@@ -0,0 +1,17 @@
fileFormatVersion: 2
guid: e32a3ba3a6520264e99766273eb44e01
labels:
- UMA_Text Recipe
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 0
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 35611
packageName: UMA 2
packageVersion: 2.13
assetPath: Assets/UMA/Content/Example/AdditionalSlots/Locomotion/LocomotionRecipe.asset
uploadId: 679826
@@ -0,0 +1,53 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &115436
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
serializedVersion: 4
m_Component:
- 4: {fileID: 473822}
- 114: {fileID: 11432686}
m_Layer: 0
m_Name: LocomotionScriptPrefab
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &473822
Transform:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 115436}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 0
--- !u!114 &11432686
MonoBehaviour:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 115436}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: a32a7985c036ddc4ebda30571ff4c09d, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !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: 115436}
m_IsPrefabParent: 1
m_IsExploded: 1
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 3b6271d9a68fa754b9048fc76ecba386
NativeFormatImporter:
userData:
AssetOrigin:
serializedVersion: 1
productId: 35611
packageName: UMA 2
packageVersion: 2.13
assetPath: Assets/UMA/Content/Example/AdditionalSlots/Locomotion/LocomotionScriptPrefab.prefab
uploadId: 679826
@@ -0,0 +1,17 @@
fileFormatVersion: 2
guid: 0fbc0a0bbfb29084bbeafb0876b6e28b
labels:
- UMA_Slot
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 0
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 35611
packageName: UMA 2
packageVersion: 2.13
assetPath: Assets/UMA/Content/Example/AdditionalSlots/Locomotion/LocomotionSlot.asset
uploadId: 679826
@@ -0,0 +1,19 @@
using UnityEngine;
namespace UMA.Examples
{
/// <summary>
/// Auxillary slot which adds a Locomotion component to a newly created character.
/// </summary>
public class LocomotionSlotScript : MonoBehaviour
{
public void OnDnaApplied(UMAData umaData)
{
var locomotion = umaData.GetComponent<Locomotion>();
if (locomotion == null)
{
umaData.gameObject.AddComponent<Locomotion>();
}
}
}
}
@@ -0,0 +1,15 @@
fileFormatVersion: 2
guid: a32a7985c036ddc4ebda30571ff4c09d
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
AssetOrigin:
serializedVersion: 1
productId: 35611
packageName: UMA 2
packageVersion: 2.13
assetPath: Assets/UMA/Content/Example/AdditionalSlots/Locomotion/LocomotionSlotScript.cs
uploadId: 679826