캐릭터 움직임 및 애니메이션
This commit is contained in:
38
Assets/External/Tools/SyntyPropBoneTool/Utils/PropBoneDefinitionPresets.cs
vendored
Normal file
38
Assets/External/Tools/SyntyPropBoneTool/Utils/PropBoneDefinitionPresets.cs
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
|
||||
// Copyright (c) 2024 Synty Studios Limited. All rights reserved.
|
||||
//
|
||||
// Use of this software is subject to the terms and conditions of the Synty Studios End User Licence Agreement (EULA)
|
||||
// available at: https://syntystore.com/pages/end-user-licence-agreement
|
||||
//
|
||||
// For additional details, see the LICENSE.MD file bundled with this software.
|
||||
|
||||
using UnityEngine;
|
||||
|
||||
namespace Synty.Tools.SyntyPropBoneTool
|
||||
{
|
||||
/// <summary>
|
||||
/// Hard coded default values for PropBoneDefinitions.
|
||||
/// </summary>
|
||||
public static class PropBoneDefinitionPresets
|
||||
{
|
||||
// Preset configs for Synty rigs
|
||||
public static PropBoneDefinition[] PolygonBoneDefinition
|
||||
{
|
||||
get
|
||||
{
|
||||
return new PropBoneDefinition[]
|
||||
{
|
||||
new PropBoneDefinition() {
|
||||
parentBoneName = "Hand_R",
|
||||
boneName = "Prop_R",
|
||||
socketName = "Prop_R_Socket",
|
||||
rotationOffset = new Vector3(0,0,0),
|
||||
scale = 1f,
|
||||
scaleCalculationBone1 = "Hand_R",
|
||||
scaleCalculationBone2 = "Elbow_R"
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
11
Assets/External/Tools/SyntyPropBoneTool/Utils/PropBoneDefinitionPresets.cs.meta
vendored
Normal file
11
Assets/External/Tools/SyntyPropBoneTool/Utils/PropBoneDefinitionPresets.cs.meta
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0dff29751f13d4476aa02d6bed4dcc8e
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
48
Assets/External/Tools/SyntyPropBoneTool/Utils/TransformUtil.cs
vendored
Normal file
48
Assets/External/Tools/SyntyPropBoneTool/Utils/TransformUtil.cs
vendored
Normal file
@@ -0,0 +1,48 @@
|
||||
// Copyright (c) 2024 Synty Studios Limited. All rights reserved.
|
||||
//
|
||||
// Use of this software is subject to the terms and conditions of the Synty Studios End User Licence Agreement (EULA)
|
||||
// available at: https://syntystore.com/pages/end-user-licence-agreement
|
||||
//
|
||||
// For additional details, see the LICENSE.MD file bundled with this software.
|
||||
|
||||
using UnityEngine;
|
||||
|
||||
namespace Synty.Tools.SyntyPropBoneTool
|
||||
{
|
||||
/// <summary>
|
||||
/// Helper class containing helpful functions relating to Transform objects.
|
||||
/// </summary>
|
||||
public static class TransformUtil
|
||||
{
|
||||
/// <summary>
|
||||
/// Performs a depth first recursive searche of the hierarchy to find a transform with the searchName.
|
||||
/// </summary>
|
||||
/// <param name="node">The current node in the recursive search.</param>
|
||||
/// <param name="searchName">The name of the node to find.</param>
|
||||
/// <returns>A <c>Transform</c> that is the first match to the searchName or null if no match is found.</returns>
|
||||
public static Transform SearchHierarchy(Transform node, string searchName)
|
||||
{
|
||||
if (node == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
if (node.name == searchName)
|
||||
{
|
||||
return node;
|
||||
}
|
||||
|
||||
Transform result = null;
|
||||
for (int childIndex = 0; childIndex < node.childCount; childIndex++)
|
||||
{
|
||||
result = SearchHierarchy(node.GetChild(childIndex), searchName);
|
||||
if (result != null)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
||||
11
Assets/External/Tools/SyntyPropBoneTool/Utils/TransformUtil.cs.meta
vendored
Normal file
11
Assets/External/Tools/SyntyPropBoneTool/Utils/TransformUtil.cs.meta
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5935aa19cf8174e8f871b2c3b2102e25
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in New Issue
Block a user