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,4 @@
namespace UnityEngine.Animations.Rigging
{
sealed class ExpandChildrenAttribute : PropertyAttribute {}
}

View File

@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 8bce5d2428eb4d4aa4115d557baa49aa
timeCreated: 1607627626

View File

@@ -0,0 +1,70 @@
using System;
namespace UnityEngine.Animations.Rigging
{
/// <summary>
/// The [SyncSceneToStream] attribute can be used to ensure constraints properties are read from the scene
/// and written back in the AnimationStream if they were not previously animated.
/// Supported value types are: Float, Int, Bool, Vector2, Vector3, Vector4, Quaternion, Vector3Int, Vector3Bool,
/// Transform, Transform[], WeightedTransform and WeightedTransformArray.
/// </summary>
[AttributeUsage(AttributeTargets.Field, Inherited = false, AllowMultiple = false)]
public sealed class SyncSceneToStreamAttribute : Attribute { }
internal enum PropertyType : byte { Bool, Int, Float };
internal struct PropertyDescriptor
{
public int size;
public PropertyType type;
}
internal struct Property
{
public string name;
public PropertyDescriptor descriptor;
}
internal struct RigProperties
{
public static string s_Weight = "m_Weight";
public Component component;
}
internal struct ConstraintProperties
{
public static string s_Weight = "m_Weight";
public Component component;
public Property[] properties;
}
/// <summary>
/// Utility functions for constraints (deprecated).
/// </summary>
[Obsolete("PropertyUtils is deprecated. Use ConstraintsUtils instead. (UnityUpgradable) -> ConstraintsUtils")]
public static class PropertyUtils
{
/// <summary>
/// Prepends RigConstraint data property to specified property name.
/// </summary>
/// <param name="property">Property name.</param>
/// <returns>Return a complete property name.</returns>
[Obsolete("ConstructConstraintDataPropertyName is deprecated. Use ConstraintsUtils.ConstructConstraintDataPropertyName instead.")]
public static string ConstructConstraintDataPropertyName(string property)
{
return ConstraintsUtils.ConstructConstraintDataPropertyName(property);
}
/// <summary>
/// Builds a unique property name for a custom property.
/// </summary>
/// <param name="component">Associated component.</param>
/// <param name="property">Property name.</param>
/// <returns>Returns a custom property name.</returns>
[Obsolete("ConstructCustomPropertyName is deprecated. Use ConstraintsUtils.ConstructCustomPropertyName instead.")]
public static string ConstructCustomPropertyName(Component component, string property)
{
return ConstraintsUtils.ConstructCustomPropertyName(component, property);
}
}
}

View File

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

View File

@@ -0,0 +1,34 @@
using System;
namespace UnityEngine.Animations.Rigging
{
/// <summary>
/// By default, <see cref="WeightedTransform.weight"/> appears as a numeric input field in the Inspector.
/// Decorate <see cref="WeightedTransform"/> or <see cref="WeightedTransformArray"/> fields with this attribute to make it display using a slider with the specified range.
/// See also <seealso cref="WeightedTransformArray.OnValidate"/>.
/// </summary>
[AttributeUsage(AttributeTargets.Field, Inherited = true, AllowMultiple = false)]
public sealed class WeightRangeAttribute : PropertyAttribute
{
/// <summary>
/// The smallest permissible value the weight may have.
/// </summary>
public readonly float min = 0f;
/// <summary>
/// The largest permissible value the weight may have.
/// </summary>
public readonly float max = 1f;
/// <summary>
/// Constructs a new <see cref="WeightRangeAttribute"/> instance with the specified range.
/// A value of <see cref="Single.NaN"/> for either end of the range will permit any value to be entered.
/// </summary>
/// <param name="min">The smallest permissible value the weight may have.</param>
/// <param name="max">The largest permissible value the weight may have.</param>
public WeightRangeAttribute(float min, float max)
{
this.min = min;
this.max = max;
}
}
}

View File

@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 5846e4298a804f4ab6b901fe69417ca7
timeCreated: 1608217004