first commit

This commit is contained in:
lethanhsonvsp
2025-11-17 15:16:36 +07:00
commit a40d0921eb
17012 changed files with 2652386 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
using System.Collections.Generic;
namespace UnityEngine.Animations.Rigging
{
/// <summary>
/// This interface represents classes that hold and serialize effectors.
/// Effectors do nothing during runtime.
/// </summary>
public interface IRigEffectorHolder
{
#if UNITY_EDITOR
/// <summary>List of rig effectors associated with this IRigEffectorHolder.
IEnumerable<RigEffectorData> effectors { get; }
/// <summary>Adds a new effector to the IRigEffectorHolder.</summary>
/// <param name="transform">The Transform represented by the effector.</param>
/// <param name="style">The visual style of the effector.</param>
void AddEffector(Transform transform, RigEffectorData.Style style);
/// <summary>Removes an effector from the IRigEffectorHolder.</summary>
/// <param name="transform">The Transform from which to remove the effector.</param>
void RemoveEffector(Transform transform);
/// <summary>Queries whether there is an effector for the specified Transform.</summary>
/// <param name="transform">The Transform to query.</param>
/// <returns>True if there is an effector for this transform. False otherwise.</returns>
bool ContainsEffector(Transform transform);
#endif
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 79848f3b11e0243eaa4c599daee0d153
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,52 @@
using System;
namespace UnityEngine.Animations.Rigging
{
/// <summary>
/// This class holds the serialized data necessary to build
/// a rig effector. This is saved in either the RigBuilder, or the Rig component.
/// </summary>
[Serializable]
public class RigEffectorData
{
/// <summary>
/// The effector visual style.
/// </summary>
[Serializable]
public struct Style
{
/// <summary>The effector shape. This is represented by a Mesh.</summary>
public Mesh shape;
/// <summary>The effector main color.</summary>
public Color color;
/// <summary>The</summary>
public float size;
/// <summary>The position offset applied to the effector.</summary>
public Vector3 position;
/// <summary>The rotation offset applied to the effector.</summary>
public Vector3 rotation;
};
[SerializeField] private Transform m_Transform;
[SerializeField] private Style m_Style = new Style();
[SerializeField] private bool m_Visible = true;
/// <summary>The Transform represented by the effector.</summary>
public Transform transform { get => m_Transform; }
/// <summary>The visual style of the effector.</summary>
public Style style { get => m_Style; }
/// <summary>The visibility state of the effector. True if visible, false otherwise.</summary>
public bool visible { get => m_Visible; set => m_Visible = value; }
/// <summary>
/// Initializes the effector with a Transform and a default style.
/// </summary>
/// <param name="transform">The Transform represented by the effector.</param>
/// <param name="style">The visual style of the effector.</param>
public void Initialize(Transform transform, Style style)
{
m_Transform = transform;
m_Style = style;
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 656f99ca017f841b1b1993eb44309b1a
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant: