Move third party assets to ThirdParty folder
This commit is contained in:
8
Assets/ThirdParty/UltimateXR/Editor/Animation/IK.meta
vendored
Normal file
8
Assets/ThirdParty/UltimateXR/Editor/Animation/IK.meta
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 906ea6ad0d27cd741af855d8d8031c03
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
138
Assets/ThirdParty/UltimateXR/Editor/Animation/IK/UxrCcdIKSolverEditor.cs
vendored
Normal file
138
Assets/ThirdParty/UltimateXR/Editor/Animation/IK/UxrCcdIKSolverEditor.cs
vendored
Normal file
@@ -0,0 +1,138 @@
|
||||
// --------------------------------------------------------------------------------------------------------------------
|
||||
// <copyright file="UxrCcdIKSolverEditor.cs" company="VRMADA">
|
||||
// Copyright (c) VRMADA, All rights reserved.
|
||||
// </copyright>
|
||||
// --------------------------------------------------------------------------------------------------------------------
|
||||
using UltimateXR.Animation.IK;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace UltimateXR.Editor.Animation.IK
|
||||
{
|
||||
/// <summary>
|
||||
/// Custom inspector for <see cref="UxrCcdIKSolver" />. Also draws handles in the scene window.
|
||||
/// </summary>
|
||||
[CustomEditor(typeof(UxrCcdIKSolver))]
|
||||
public class UxrCcdIKSolverEditor : UnityEditor.Editor
|
||||
{
|
||||
#region Unity
|
||||
|
||||
/// <summary>
|
||||
/// Initializes the link count variable and hooks the Update() method to monitor changes on the component's link count.
|
||||
/// </summary>
|
||||
private void OnEnable()
|
||||
{
|
||||
_linkCount = ((UxrCcdIKSolver)serializedObject.targetObject).Links.Count;
|
||||
EditorApplication.update += EditorApplication_Updated;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Removes the Update hook.
|
||||
/// </summary>
|
||||
private void OnDisable()
|
||||
{
|
||||
EditorApplication.update -= EditorApplication_Updated;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Draws the IK scene handles.
|
||||
/// </summary>
|
||||
private void OnSceneGUI()
|
||||
{
|
||||
UxrCcdIKSolver solverCcd = target as UxrCcdIKSolver;
|
||||
|
||||
if (solverCcd == null || solverCcd.Links == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (Application.isPlaying == false)
|
||||
{
|
||||
solverCcd.ComputeLinkData();
|
||||
}
|
||||
|
||||
int index = 0;
|
||||
|
||||
foreach (UxrCcdLink link in solverCcd.Links)
|
||||
{
|
||||
if (link.Bone == null)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
Vector3 normal = link.Bone.TransformDirection(link.RotationAxis1);
|
||||
Handles.color = new Color(Mathf.Abs(link.RotationAxis1.x), Mathf.Abs(link.RotationAxis1.y), Mathf.Abs(link.RotationAxis1.z), 0.3f);
|
||||
|
||||
float angle1Min = link.Axis1HasLimits ? link.Axis1AngleMin : -180.0f;
|
||||
float angle1Max = link.Axis1HasLimits ? link.Axis1AngleMax : 180.0f;
|
||||
|
||||
Handles.DrawSolidArc(link.Bone.position,
|
||||
normal,
|
||||
Quaternion.AngleAxis(angle1Min - link.Angle1, normal) * link.Bone.TransformDirection(link.LocalSpaceAxis1ZeroAngleVector),
|
||||
angle1Max - angle1Min,
|
||||
link.LinkLength * 0.5f);
|
||||
Handles.color = new Color(Mathf.Abs(link.RotationAxis1.x), Mathf.Abs(link.RotationAxis1.y), Mathf.Abs(link.RotationAxis1.z), 1.0f);
|
||||
Handles.DrawLine(link.Bone.position, link.Bone.position + 0.6f * link.LinkLength * link.Bone.TransformDirection(link.LocalSpaceAxis1ZeroAngleVector));
|
||||
|
||||
if (link.Constraint == UxrCcdConstraintType.TwoAxes)
|
||||
{
|
||||
float angle2Min = link.Axis2HasLimits ? link.Axis2AngleMin : -180.0f;
|
||||
float angle2Max = link.Axis2HasLimits ? link.Axis2AngleMax : 180.0f;
|
||||
|
||||
normal = link.Bone.TransformDirection(link.RotationAxis2);
|
||||
Handles.color = new Color(Mathf.Abs(link.RotationAxis2.x), Mathf.Abs(link.RotationAxis2.y), Mathf.Abs(link.RotationAxis2.z), 0.3f);
|
||||
Handles.DrawSolidArc(link.Bone.position,
|
||||
normal,
|
||||
Quaternion.AngleAxis(angle2Min + link.Angle2, normal) * link.Bone.TransformDirection(link.LocalSpaceAxis2ZeroAngleVector),
|
||||
angle2Max - angle2Min,
|
||||
link.LinkLength * 0.5f);
|
||||
Handles.color = new Color(Mathf.Abs(link.RotationAxis2.x), Mathf.Abs(link.RotationAxis2.y), Mathf.Abs(link.RotationAxis2.z), 1.0f);
|
||||
Handles.DrawLine(link.Bone.position, link.Bone.position + 0.6f * link.LinkLength * link.Bone.TransformDirection(link.LocalSpaceAxis2ZeroAngleVector));
|
||||
}
|
||||
|
||||
if (index == 0 && link.Bone != null && solverCcd.EndEffector != null && solverCcd.Goal != null)
|
||||
{
|
||||
Handles.color = Color.magenta;
|
||||
Handles.DrawLine(link.Bone.position, solverCcd.EndEffector.position);
|
||||
Handles.DrawLine(solverCcd.EndEffector.position, solverCcd.Goal.position);
|
||||
}
|
||||
|
||||
index++;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Event Handling Methods
|
||||
|
||||
/// <summary>
|
||||
/// Monitors for changes in the link count so that if new ones are added they are assigned default parameters.
|
||||
/// Unity does not support assigning default values to new elements added. This is the reason we need to do this.
|
||||
/// </summary>
|
||||
private void EditorApplication_Updated()
|
||||
{
|
||||
UxrCcdIKSolver solverCcd = target as UxrCcdIKSolver;
|
||||
|
||||
if (solverCcd != null && solverCcd.Links.Count != _linkCount)
|
||||
{
|
||||
if (solverCcd.Links.Count > _linkCount)
|
||||
{
|
||||
for (int i = _linkCount; i < solverCcd.Links.Count; ++i)
|
||||
{
|
||||
solverCcd.SetLinkDefaultValues(i);
|
||||
}
|
||||
}
|
||||
|
||||
_linkCount = solverCcd.Links.Count;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Private Types & Data
|
||||
|
||||
private int _linkCount;
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
13
Assets/ThirdParty/UltimateXR/Editor/Animation/IK/UxrCcdIKSolverEditor.cs.meta
vendored
Normal file
13
Assets/ThirdParty/UltimateXR/Editor/Animation/IK/UxrCcdIKSolverEditor.cs.meta
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3af81a625b57a0747b423d4b3523c429
|
||||
timeCreated: 1511875957
|
||||
licenseType: Pro
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
210
Assets/ThirdParty/UltimateXR/Editor/Animation/IK/UxrIKBodySettingsDrawer.cs
vendored
Normal file
210
Assets/ThirdParty/UltimateXR/Editor/Animation/IK/UxrIKBodySettingsDrawer.cs
vendored
Normal file
@@ -0,0 +1,210 @@
|
||||
// --------------------------------------------------------------------------------------------------------------------
|
||||
// <copyright file="UxrIKBodySettingsDrawer.cs" company="VRMADA">
|
||||
// Copyright (c) VRMADA, All rights reserved.
|
||||
// </copyright>
|
||||
// --------------------------------------------------------------------------------------------------------------------
|
||||
using UltimateXR.Animation.IK;
|
||||
using UltimateXR.Avatar;
|
||||
using UltimateXR.Avatar.Controllers;
|
||||
using UltimateXR.Core;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace UltimateXR.Editor.Animation.IK
|
||||
{
|
||||
/// <summary>
|
||||
/// Custom inspector for <see cref="UxrBodyIKSettings" />.
|
||||
/// </summary>
|
||||
[CustomPropertyDrawer(typeof(UxrBodyIKSettings))]
|
||||
public class UxrIKBodySettingsDrawer : PropertyDrawer
|
||||
{
|
||||
#region Public Types & Data
|
||||
|
||||
public const string PropertyLockBodyPivot = "_lockBodyPivot";
|
||||
public const string PropertyBodyPivotRotationSpeed = "_bodyPivotRotationSpeed";
|
||||
public const string PropertyHeadFreeRangeBend = "_headFreeRangeBend";
|
||||
public const string PropertyHeadFreeRangeTorsion = "_headFreeRangeTorsion";
|
||||
public const string PropertyNeckHeadBalance = "_neckHeadBalance";
|
||||
public const string PropertySpineBend = "_spineBend";
|
||||
public const string PropertySpineTorsion = "_spineTorsion";
|
||||
public const string PropertyChestBend = "_chestBend";
|
||||
public const string PropertyChestTorsion = "_chestTorsion";
|
||||
public const string PropertyUpperChestBend = "_upperChestBend";
|
||||
public const string PropertyUpperChestTorsion = "_upperChestTorsion";
|
||||
public const string PropertyNeckBaseHeight = "_neckBaseHeight";
|
||||
public const string PropertyNeckForwardOffset = "_neckForwardOffset";
|
||||
public const string PropertyEyesBaseHeight = "_eyesBaseHeight";
|
||||
public const string PropertyEyesForwardOffset = "_eyesForwardOffset";
|
||||
|
||||
#endregion
|
||||
|
||||
#region Public Overrides PropertyDrawer
|
||||
|
||||
/// <summary>
|
||||
/// Gets the height in pixels for the given serialized property targeting a <see cref="UxrBodyIKSettings" />.
|
||||
/// </summary>
|
||||
/// <param name="property">Serialized property</param>
|
||||
/// <param name="label">UI label</param>
|
||||
/// <returns>Height in pixels</returns>
|
||||
public override float GetPropertyHeight(SerializedProperty property, GUIContent label)
|
||||
{
|
||||
if (ShowNeckProperties(property))
|
||||
{
|
||||
return 15 * EditorGUIUtility.singleLineHeight;
|
||||
}
|
||||
return 13 * EditorGUIUtility.singleLineHeight;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Unity
|
||||
|
||||
/// <summary>
|
||||
/// Draws an <see cref="UxrBodyIKSettings" /> serialized property and handles input.
|
||||
/// </summary>
|
||||
/// <param name="position">Position where to draw the property</param>
|
||||
/// <param name="property">Serialized property</param>
|
||||
/// <param name="label">UI label</param>
|
||||
public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
|
||||
{
|
||||
EditorGUI.BeginProperty(position, label, property);
|
||||
|
||||
int line = 0;
|
||||
|
||||
UxrAvatar avatar = ((MonoBehaviour)property.serializedObject.targetObject).GetComponent<UxrAvatar>();
|
||||
property.FindPropertyRelative(PropertyLockBodyPivot).boolValue = EditorGUI.Toggle(GetRect(position, line++, -1), ContentLockBodyPivot, property.FindPropertyRelative(PropertyLockBodyPivot).boolValue);
|
||||
EditorGUI.Slider(GetRect(position, line++, -1), property.FindPropertyRelative(PropertyBodyPivotRotationSpeed), 0.0f, 1.0f, ContentBodyPivotRotationSpeed);
|
||||
EditorGUI.Slider(GetRect(position, line++, -1), property.FindPropertyRelative(PropertyHeadFreeRangeBend), 0.0f, 180.0f, ContentHeadFreeRangeBend);
|
||||
EditorGUI.Slider(GetRect(position, line++, -1), property.FindPropertyRelative(PropertyHeadFreeRangeTorsion), 0.0f, 180.0f, ContentHeadFreeRangeTorsion);
|
||||
EditorGUI.Slider(GetRect(position, line++, -1), property.FindPropertyRelative(PropertyNeckHeadBalance), 0.0f, 1.0f, ContentNeckHeadBalance);
|
||||
EditorGUI.Slider(GetRect(position, line++, -1), property.FindPropertyRelative(PropertySpineBend), 0.0f, 1.0f, ContentSpineBend);
|
||||
EditorGUI.Slider(GetRect(position, line++, -1), property.FindPropertyRelative(PropertySpineTorsion), 0.0f, 1.0f, ContentSpineTorsion);
|
||||
EditorGUI.Slider(GetRect(position, line++, -1), property.FindPropertyRelative(PropertyChestBend), 0.0f, 1.0f, ContentChestBend);
|
||||
EditorGUI.Slider(GetRect(position, line++, -1), property.FindPropertyRelative(PropertyChestTorsion), 0.0f, 1.0f, ContentChestTorsion);
|
||||
EditorGUI.Slider(GetRect(position, line++, -1), property.FindPropertyRelative(PropertyUpperChestBend), 0.0f, 1.0f, ContentUpperChestBend);
|
||||
EditorGUI.Slider(GetRect(position, line++, -1), property.FindPropertyRelative(PropertyUpperChestTorsion), 0.0f, 1.0f, ContentUpperChestTorsion);
|
||||
|
||||
if (ShowNeckProperties(property))
|
||||
{
|
||||
EditorGUILayout.BeginHorizontal();
|
||||
EditorGUI.PropertyField(GetRect(position, line++, 0), property.FindPropertyRelative(PropertyNeckBaseHeight), ContentNeckBaseHeight);
|
||||
EditorGUILayout.EndHorizontal();
|
||||
|
||||
EditorGUILayout.BeginHorizontal();
|
||||
EditorGUI.PropertyField(GetRect(position, line++, 0), property.FindPropertyRelative(PropertyNeckForwardOffset), ContentNeckForwardOffset);
|
||||
EditorGUILayout.EndHorizontal();
|
||||
}
|
||||
|
||||
EditorGUILayout.BeginHorizontal();
|
||||
EditorGUI.PropertyField(GetRect(position, line, 0), property.FindPropertyRelative(PropertyEyesBaseHeight), ContentEyesBaseHeight);
|
||||
bool useAvatarEyesPressedBaseHeight = GUI.Button(GetRect(position, line, 1), new GUIContent("Use Avatar Eyes"));
|
||||
EditorGUILayout.EndHorizontal();
|
||||
|
||||
if (useAvatarEyesPressedBaseHeight)
|
||||
{
|
||||
if (avatar.AvatarRig.Head.LeftEye == null || avatar.AvatarRig.Head.RightEye == null)
|
||||
{
|
||||
EditorUtility.DisplayDialog("Assign field first", "The avatar component Rig field has eye(s) missing. Try to assign the value manually and use the eye gizmos for guidance.", UxrConstants.Editor.Ok);
|
||||
GUIUtility.ExitGUI();
|
||||
}
|
||||
else
|
||||
{
|
||||
property.FindPropertyRelative(PropertyEyesBaseHeight).floatValue = (avatar.AvatarRig.Head.LeftEye.position.y + avatar.AvatarRig.Head.RightEye.position.y) * 0.5f - avatar.transform.position.y;
|
||||
}
|
||||
}
|
||||
|
||||
line++;
|
||||
|
||||
EditorGUILayout.BeginHorizontal();
|
||||
EditorGUI.PropertyField(GetRect(position, line, 0), property.FindPropertyRelative(PropertyEyesForwardOffset), ContentEyesForwardOffset);
|
||||
EditorGUILayout.EndHorizontal();
|
||||
|
||||
bool useAvatarEyesPressedForwardOffset = GUI.Button(GetRect(position, line, 1), new GUIContent("Use Avatar Eyes"));
|
||||
|
||||
if (useAvatarEyesPressedForwardOffset)
|
||||
{
|
||||
if (avatar.AvatarRig.Head.LeftEye == null || avatar.AvatarRig.Head.RightEye == null)
|
||||
{
|
||||
EditorUtility.DisplayDialog("Assign field first", "The avatar component Rig field has eye(s) missing. Try to assign the value manually and use the eye gizmos for guidance.", UxrConstants.Editor.Ok);
|
||||
GUIUtility.ExitGUI();
|
||||
}
|
||||
else
|
||||
{
|
||||
Vector3 eyeLeft = avatar.transform.InverseTransformPoint(avatar.AvatarRig.Head.LeftEye.position);
|
||||
Vector3 eyeRight = avatar.transform.InverseTransformPoint(avatar.AvatarRig.Head.RightEye.position);
|
||||
property.FindPropertyRelative(PropertyEyesForwardOffset).floatValue = (eyeLeft.z + eyeRight.z) * 0.5f + 0.02f;
|
||||
}
|
||||
}
|
||||
|
||||
EditorGUI.EndProperty();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Private Methods
|
||||
|
||||
/// <summary>
|
||||
/// Checks whether to show the neck properties of the serialized <see cref="UxrBodyIKSettings" />.
|
||||
/// </summary>
|
||||
/// <param name="property">Serialized property</param>
|
||||
/// <returns>Whether to show the neck properties</returns>
|
||||
private static bool ShowNeckProperties(SerializedProperty property)
|
||||
{
|
||||
UxrAvatarController controller = property.serializedObject.targetObject as UxrAvatarController;
|
||||
|
||||
if (controller == null)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!controller.TryGetComponent<UxrAvatar>(out var avatar))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return avatar.AvatarRig.Head.Neck == null;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the rect for a given line in the property, since it will have multiple lines.
|
||||
/// </summary>
|
||||
/// <param name="position">Serialized property draw position</param>
|
||||
/// <param name="line">Line index</param>
|
||||
/// <param name="column">Column index</param>
|
||||
/// <returns>Rect to draw the given line in</returns>
|
||||
private static Rect GetRect(Rect position, int line, int column)
|
||||
{
|
||||
const int buttonWidth = 150;
|
||||
const int margin = 5;
|
||||
|
||||
return column switch
|
||||
{
|
||||
-1 => new Rect(position.x, position.y + EditorGUIUtility.singleLineHeight * line, position.width, EditorGUIUtility.singleLineHeight),
|
||||
0 => new Rect(position.x, position.y + EditorGUIUtility.singleLineHeight * line, position.width - buttonWidth - margin, EditorGUIUtility.singleLineHeight),
|
||||
_ => new Rect(position.x + position.width - buttonWidth, position.y + EditorGUIUtility.singleLineHeight * line, buttonWidth, EditorGUIUtility.singleLineHeight)
|
||||
};
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Private Types & Data
|
||||
|
||||
private GUIContent ContentLockBodyPivot { get; } = new GUIContent("Lock Body Pivot", "For applications that require the avatar to remain in a fixed position");
|
||||
private GUIContent ContentBodyPivotRotationSpeed { get; } = new GUIContent("Body Pivot Rotation Speed", "The speed the body will twist to keep up with the head orientation");
|
||||
private GUIContent ContentHeadFreeRangeBend { get; } = new GUIContent("Head Free Range Bend", "The amount of degrees the head can rotate up and down without requiring support from the neck and bones below");
|
||||
private GUIContent ContentHeadFreeRangeTorsion { get; } = new GUIContent("Head Free Range Torsion", "The amount of degrees the head can rotate left and right without requiring support from the neck and bones below");
|
||||
private GUIContent ContentNeckHeadBalance { get; } = new GUIContent("Neck-Head Balance", "The balance between the neck and the head when solving the head orientation. Lower values will have the neck play a bigger role, while higher values will make the head play a bigger role");
|
||||
private GUIContent ContentSpineBend { get; } = new GUIContent("Spine Bend", "The amount of weight the spine will apply to solve up/down rotations");
|
||||
private GUIContent ContentSpineTorsion { get; } = new GUIContent("Spine Torsion", "The amount of weight the spine will apply to solve left/right rotations");
|
||||
private GUIContent ContentChestBend { get; } = new GUIContent("Chest Bend", "The amount of weight the chest will apply to solve up/down rotations");
|
||||
private GUIContent ContentChestTorsion { get; } = new GUIContent("Chest Torsion", "The amount of weight the chest will apply to solve left/right rotations");
|
||||
private GUIContent ContentUpperChestBend { get; } = new GUIContent("Upper Chest Bend", "The amount of weight the upper chest will apply to solve up/down rotations");
|
||||
private GUIContent ContentUpperChestTorsion { get; } = new GUIContent("Upper Chest Torsion", "The amount of weight the upper chest will apply to solve left/right rotations");
|
||||
private GUIContent ContentNeckBaseHeight { get; } = new GUIContent("Neck Base Height", "The height on the avatar where the base of the neck is located. The neck base will be drawn on the scene window as a white disc gizmo");
|
||||
private GUIContent ContentNeckForwardOffset { get; } = new GUIContent("Neck Forward Offset", "The forward offset from the avatar pivot where the neck is located. The neck base will be drawn on the scene window as a white disc gizmo");
|
||||
private GUIContent ContentEyesBaseHeight { get; } = new GUIContent("Eyes Base Height", "The height on the avatar where the eyes are located. The eye positions will be drawn on the scene window as white disc gizmos");
|
||||
private GUIContent ContentEyesForwardOffset { get; } = new GUIContent("Eyes Forward Offset", "The forward offset from the avatar pivot where the eyes are located. The eye positions will be drawn on the scene window as white disc gizmos");
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
13
Assets/ThirdParty/UltimateXR/Editor/Animation/IK/UxrIKBodySettingsDrawer.cs.meta
vendored
Normal file
13
Assets/ThirdParty/UltimateXR/Editor/Animation/IK/UxrIKBodySettingsDrawer.cs.meta
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2121affa9bada5149845f3cfef8e8d4a
|
||||
timeCreated: 1512027976
|
||||
licenseType: Pro
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
141
Assets/ThirdParty/UltimateXR/Editor/Animation/IK/UxrIKSolverCcdLinkDrawer.cs
vendored
Normal file
141
Assets/ThirdParty/UltimateXR/Editor/Animation/IK/UxrIKSolverCcdLinkDrawer.cs
vendored
Normal file
@@ -0,0 +1,141 @@
|
||||
// --------------------------------------------------------------------------------------------------------------------
|
||||
// <copyright file="UxrIKSolverCcdLinkDrawer.cs" company="VRMADA">
|
||||
// Copyright (c) VRMADA, All rights reserved.
|
||||
// </copyright>
|
||||
// --------------------------------------------------------------------------------------------------------------------
|
||||
using UltimateXR.Animation.IK;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace UltimateXR.Editor.Animation.IK
|
||||
{
|
||||
/// <summary>
|
||||
/// Custom property drawer for <see cref="UxrCcdLink" />.
|
||||
/// </summary>
|
||||
[CustomPropertyDrawer(typeof(UxrCcdLink))]
|
||||
public class UxrIKSolverCcdLinkDrawer : PropertyDrawer
|
||||
{
|
||||
#region Public Overrides PropertyDrawer
|
||||
|
||||
/// <summary>
|
||||
/// Returns the height in pixels required to draw the property.
|
||||
/// </summary>
|
||||
/// <param name="property">Serialized property to draw</param>
|
||||
/// <param name="label">UI label</param>
|
||||
/// <returns>Height in pixels</returns>
|
||||
public override float GetPropertyHeight(SerializedProperty property, GUIContent label)
|
||||
{
|
||||
int lines = 7;
|
||||
|
||||
if (property.FindPropertyRelative(PropertyAxis1HasLimits).boolValue)
|
||||
{
|
||||
lines += 2;
|
||||
}
|
||||
|
||||
int enumIndex = property.FindPropertyRelative(PropertyConstraint).enumValueIndex;
|
||||
|
||||
if (enumIndex == (int)UxrCcdConstraintType.TwoAxes)
|
||||
{
|
||||
if (property.FindPropertyRelative(PropertyAxis2HasLimits).boolValue)
|
||||
{
|
||||
lines += 4;
|
||||
}
|
||||
else
|
||||
{
|
||||
lines += 2;
|
||||
}
|
||||
}
|
||||
|
||||
return lines * EditorGUIUtility.singleLineHeight;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Unity
|
||||
|
||||
/// <summary>
|
||||
/// Draws the inspector and handles input.
|
||||
/// </summary>
|
||||
/// <param name="position">Position where to draw the serialized property</param>
|
||||
/// <param name="property">Serialized property</param>
|
||||
/// <param name="label">UI label</param>
|
||||
public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
|
||||
{
|
||||
EditorGUI.BeginProperty(position, label, property);
|
||||
|
||||
EditorGUI.PrefixLabel(position, GUIUtility.GetControlID(FocusType.Passive), label);
|
||||
EditorGUI.indentLevel += 1;
|
||||
|
||||
int line = 1;
|
||||
|
||||
property.FindPropertyRelative(PropertyWeight).floatValue = EditorGUI.Slider(UxrEditorUtils.GetRect(position, line++),
|
||||
ContentWeight,
|
||||
property.FindPropertyRelative(PropertyWeight).floatValue,
|
||||
0.0f,
|
||||
1.0f);
|
||||
|
||||
EditorGUI.PropertyField(UxrEditorUtils.GetRect(position, line++), property.FindPropertyRelative(PropertyBone), ContentBone);
|
||||
|
||||
EditorGUI.PropertyField(UxrEditorUtils.GetRect(position, line++), property.FindPropertyRelative(PropertyConstraint), ContentConstraint);
|
||||
EditorGUI.PropertyField(UxrEditorUtils.GetRect(position, line++), property.FindPropertyRelative(PropertyRotationAxis1), ContentRotationAxis1);
|
||||
EditorGUI.PropertyField(UxrEditorUtils.GetRect(position, line++), property.FindPropertyRelative(PropertyAxis1HasLimits), ContentAxis1HasLimits);
|
||||
|
||||
if (property.FindPropertyRelative(PropertyAxis1HasLimits).boolValue)
|
||||
{
|
||||
EditorGUI.PropertyField(UxrEditorUtils.GetRect(position, line++), property.FindPropertyRelative(PropertyAxis1AngleMin), ContentAxis1AngleMin);
|
||||
EditorGUI.PropertyField(UxrEditorUtils.GetRect(position, line++), property.FindPropertyRelative(PropertyAxis1AngleMax), ContentAxis1AngleMax);
|
||||
}
|
||||
|
||||
int enumIndex = property.FindPropertyRelative(PropertyConstraint).enumValueIndex;
|
||||
|
||||
if (enumIndex == (int)UxrCcdConstraintType.TwoAxes)
|
||||
{
|
||||
EditorGUI.PropertyField(UxrEditorUtils.GetRect(position, line++), property.FindPropertyRelative(PropertyRotationAxis2), ContentRotationAxis2);
|
||||
EditorGUI.PropertyField(UxrEditorUtils.GetRect(position, line++), property.FindPropertyRelative(PropertyAxis2HasLimits), ContentAxis2HasLimits);
|
||||
|
||||
if (property.FindPropertyRelative(PropertyAxis2HasLimits).boolValue)
|
||||
{
|
||||
EditorGUI.PropertyField(UxrEditorUtils.GetRect(position, line++), property.FindPropertyRelative(PropertyAxis2AngleMin), ContentAxis2AngleMin);
|
||||
EditorGUI.PropertyField(UxrEditorUtils.GetRect(position, line++), property.FindPropertyRelative(PropertyAxis2AngleMax), ContentAxis2AngleMax);
|
||||
}
|
||||
}
|
||||
|
||||
EditorGUI.PropertyField(UxrEditorUtils.GetRect(position, line++), property.FindPropertyRelative(PropertyAlignToGoal), ContentAlignToGoal);
|
||||
|
||||
EditorGUI.indentLevel -= 1;
|
||||
EditorGUI.EndProperty();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Private Types & Data
|
||||
|
||||
private GUIContent ContentBone { get; } = new GUIContent("Bone", "");
|
||||
private GUIContent ContentWeight { get; } = new GUIContent("Weight", "");
|
||||
private GUIContent ContentConstraint { get; } = new GUIContent("Constraint", "");
|
||||
private GUIContent ContentRotationAxis1 { get; } = new GUIContent("Rotation Axis1", "");
|
||||
private GUIContent ContentRotationAxis2 { get; } = new GUIContent("Rotation Axis2", "");
|
||||
private GUIContent ContentAxis1HasLimits { get; } = new GUIContent("Axis1 Has Angle Limits", "");
|
||||
private GUIContent ContentAxis1AngleMin { get; } = new GUIContent("Axis1 Angle Min", "");
|
||||
private GUIContent ContentAxis1AngleMax { get; } = new GUIContent("Axis1 Angle Max", "");
|
||||
private GUIContent ContentAxis2HasLimits { get; } = new GUIContent("Axis2 Has Angle Limits", "");
|
||||
private GUIContent ContentAxis2AngleMin { get; } = new GUIContent("Axis2 Angle Min", "");
|
||||
private GUIContent ContentAxis2AngleMax { get; } = new GUIContent("Axis2 Angle Max", "");
|
||||
private GUIContent ContentAlignToGoal { get; } = new GUIContent("Align To Goal", "Tries to align this link to the same axes as the goal");
|
||||
|
||||
private const string PropertyBone = "_bone";
|
||||
private const string PropertyWeight = "_weight";
|
||||
private const string PropertyConstraint = "_constraint";
|
||||
private const string PropertyRotationAxis1 = "_rotationAxis1";
|
||||
private const string PropertyRotationAxis2 = "_rotationAxis2";
|
||||
private const string PropertyAxis1HasLimits = "_axis1HasLimits";
|
||||
private const string PropertyAxis1AngleMin = "_axis1AngleMin";
|
||||
private const string PropertyAxis1AngleMax = "_axis1AngleMax";
|
||||
private const string PropertyAxis2HasLimits = "_axis2HasLimits";
|
||||
private const string PropertyAxis2AngleMin = "_axis2AngleMin";
|
||||
private const string PropertyAxis2AngleMax = "_axis2AngleMax";
|
||||
private const string PropertyAlignToGoal = "_alignToGoal";
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
13
Assets/ThirdParty/UltimateXR/Editor/Animation/IK/UxrIKSolverCcdLinkDrawer.cs.meta
vendored
Normal file
13
Assets/ThirdParty/UltimateXR/Editor/Animation/IK/UxrIKSolverCcdLinkDrawer.cs.meta
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f57588fb49769d4449e44e297f493eca
|
||||
timeCreated: 1512027976
|
||||
licenseType: Pro
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
8
Assets/ThirdParty/UltimateXR/Editor/Animation/Interpolation.meta
vendored
Normal file
8
Assets/ThirdParty/UltimateXR/Editor/Animation/Interpolation.meta
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 378b67fc1aa90e441ad3217fa6ca9138
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
189
Assets/ThirdParty/UltimateXR/Editor/Animation/Interpolation/UxrEasingDrawer.cs
vendored
Normal file
189
Assets/ThirdParty/UltimateXR/Editor/Animation/Interpolation/UxrEasingDrawer.cs
vendored
Normal file
@@ -0,0 +1,189 @@
|
||||
// --------------------------------------------------------------------------------------------------------------------
|
||||
// <copyright file="UxrEasingDrawer.cs" company="VRMADA">
|
||||
// Copyright (c) VRMADA, All rights reserved.
|
||||
// </copyright>
|
||||
// --------------------------------------------------------------------------------------------------------------------
|
||||
using UltimateXR.Animation.Interpolation;
|
||||
using UltimateXR.Core;
|
||||
using UltimateXR.Extensions.Unity.Render;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace UltimateXR.Editor.Animation.Interpolation
|
||||
{
|
||||
/// <summary>
|
||||
/// Custom inspector drawer for <see cref="UxrEasing" />.
|
||||
/// </summary>
|
||||
[CustomPropertyDrawer(typeof(UxrEasing))]
|
||||
public class UxrEasingDrawer : PropertyDrawer
|
||||
{
|
||||
#region Public Types & Data
|
||||
|
||||
/// <summary>
|
||||
/// This constant determines the graph height in pixels.
|
||||
/// </summary>
|
||||
public const int GraphHeight = 80;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Constructors & Finalizer
|
||||
|
||||
/// <summary>
|
||||
/// Creates the temporal material to draw the graph.
|
||||
/// </summary>
|
||||
public UxrEasingDrawer()
|
||||
{
|
||||
var shader = Shader.Find(UxrConstants.Shaders.HiddenInternalColoredShader);
|
||||
_lineMaterial = new Material(shader);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Destroys the temporal material to draw the graph.
|
||||
/// </summary>
|
||||
~UxrEasingDrawer()
|
||||
{
|
||||
Object.DestroyImmediate(_lineMaterial);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Public Overrides PropertyDrawer
|
||||
|
||||
/// <summary>
|
||||
/// Gets the height in pixels required to draw the property.
|
||||
/// </summary>
|
||||
/// <param name="property">Serialized property describing an <see cref="UxrEasing" /></param>
|
||||
/// <param name="label">UI label</param>
|
||||
/// <returns>Height in pixels</returns>
|
||||
public override float GetPropertyHeight(SerializedProperty property, GUIContent label)
|
||||
{
|
||||
return EditorGUIUtility.singleLineHeight + GraphHeight;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Public Methods
|
||||
|
||||
/// <summary>
|
||||
/// Draws the easing graph.
|
||||
/// </summary>
|
||||
/// <param name="rect">Target rect</param>
|
||||
/// <param name="material">Material used</param>
|
||||
/// <param name="color">The line color</param>
|
||||
/// <param name="easing">The easing used</param>
|
||||
/// <param name="loopMode">The loop mode</param>
|
||||
/// <param name="loops">The number of loops to draw</param>
|
||||
public static void DrawGraph(Rect rect, Material material, Color color, UxrEasing easing, UxrLoopMode loopMode = UxrLoopMode.None, int loops = 1)
|
||||
{
|
||||
// Make coordinates relative to the rect.
|
||||
GUI.BeginClip(rect);
|
||||
|
||||
// Enable the internal material.
|
||||
material.SetPass(0);
|
||||
|
||||
// Draw background. Use alpha to avoid getting too dark.
|
||||
GL.Begin(GL.QUADS);
|
||||
GL.Color(Color.black.WithAlpha(0.4f));
|
||||
GL.Vertex3(0, rect.height, 0);
|
||||
GL.Vertex3(rect.width, rect.height, 0);
|
||||
GL.Vertex3(rect.width, 0, 0);
|
||||
GL.Vertex3(0, 0, 0);
|
||||
GL.End();
|
||||
|
||||
// Now draw the graph as a connected set of points.
|
||||
GL.Begin(GL.LINE_STRIP);
|
||||
GL.Color(color);
|
||||
|
||||
// Get the min/max graph values.
|
||||
// This is important because some interpolation curves go out the [0, 1] range.
|
||||
GetGraphRange(easing, out float min, out float max);
|
||||
|
||||
// Iterate over points and draw vertices.
|
||||
for (int i = 0; i < CurveSegments + 1; ++i)
|
||||
{
|
||||
float t = (float)i / CurveSegments;
|
||||
float value = UxrInterpolator.Interpolate(Vector4.one, Vector4.zero, 1.0f, 0.0f, t * loops, easing, loopMode).x;
|
||||
float valueScaled = Mathf.InverseLerp(min, max, value);
|
||||
GL.Vertex3(t * rect.width, rect.height * valueScaled, 0);
|
||||
}
|
||||
|
||||
GL.End();
|
||||
GUI.EndClip();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Unity
|
||||
|
||||
/// <summary>
|
||||
/// Draws the inspector and handles input.
|
||||
/// </summary>
|
||||
/// <param name="position">Position where to draw the inspector</param>
|
||||
/// <param name="property">Serialized property to draw</param>
|
||||
/// <param name="label">UI label</param>
|
||||
public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
|
||||
{
|
||||
// Draw the property label and value
|
||||
EditorGUI.PropertyField(UxrEditorUtils.GetRect(position, 0), property, label);
|
||||
|
||||
// Get the graph rect. Overwrite with graph height in pixels and indentation so that it is drawn below the values only and not taking the whole inspector width.
|
||||
Rect rect = UxrEditorUtils.GetRect(position, 1);
|
||||
rect.height = GraphHeight;
|
||||
rect.xMin += EditorGUIUtility.labelWidth;
|
||||
|
||||
// Get our easing value from the property.
|
||||
UxrEasing easing = (UxrEasing)property.enumValueIndex;
|
||||
|
||||
// Draw the graph!
|
||||
if (Event.current.type == EventType.Repaint)
|
||||
{
|
||||
DrawGraph(rect, _lineMaterial, Color.green, easing);
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Private Methods
|
||||
|
||||
/// <summary>
|
||||
/// Gets the min and max values for a type of interpolation.
|
||||
/// </summary>
|
||||
/// <param name="easing">Easing</param>
|
||||
/// <param name="min">Returns the min graph value</param>
|
||||
/// <param name="max">Returns the max graph value</param>
|
||||
private static void GetGraphRange(UxrEasing easing, out float min, out float max)
|
||||
{
|
||||
min = float.MaxValue;
|
||||
max = float.MinValue;
|
||||
|
||||
for (int i = 0; i < CurveSegments + 1; ++i)
|
||||
{
|
||||
float t = (float)i / CurveSegments;
|
||||
float value = UxrInterpolator.Interpolate(1.0f, 0.0f, t, easing);
|
||||
|
||||
if (value < min)
|
||||
{
|
||||
min = value;
|
||||
}
|
||||
|
||||
if (value > max)
|
||||
{
|
||||
max = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Private Types & Data
|
||||
|
||||
/// <summary>
|
||||
/// Determines the amount of segments to draw the graph with.
|
||||
/// </summary>
|
||||
private const int CurveSegments = 200;
|
||||
|
||||
private readonly Material _lineMaterial;
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
11
Assets/ThirdParty/UltimateXR/Editor/Animation/Interpolation/UxrEasingDrawer.cs.meta
vendored
Normal file
11
Assets/ThirdParty/UltimateXR/Editor/Animation/Interpolation/UxrEasingDrawer.cs.meta
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 29edf75ae0a2aee4b88acb8a976dbb6e
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
139
Assets/ThirdParty/UltimateXR/Editor/Animation/Interpolation/UxrInterpolationSettingsDrawer.cs
vendored
Normal file
139
Assets/ThirdParty/UltimateXR/Editor/Animation/Interpolation/UxrInterpolationSettingsDrawer.cs
vendored
Normal file
@@ -0,0 +1,139 @@
|
||||
// --------------------------------------------------------------------------------------------------------------------
|
||||
// <copyright file="UxrInterpolationSettingsDrawer.cs" company="VRMADA">
|
||||
// Copyright (c) VRMADA, All rights reserved.
|
||||
// </copyright>
|
||||
// --------------------------------------------------------------------------------------------------------------------
|
||||
using UltimateXR.Animation.Interpolation;
|
||||
using UltimateXR.Core;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace UltimateXR.Editor.Animation.Interpolation
|
||||
{
|
||||
/// <summary>
|
||||
/// Custom inspector drawer for <see cref="UxrInterpolationSettings" />.
|
||||
/// </summary>
|
||||
[CustomPropertyDrawer(typeof(UxrInterpolationSettings))]
|
||||
public class UxrInterpolationSettingsDrawer : PropertyDrawer
|
||||
{
|
||||
#region Constructors & Finalizer
|
||||
|
||||
/// <summary>
|
||||
/// Creates the temporal material to draw the graph.
|
||||
/// </summary>
|
||||
public UxrInterpolationSettingsDrawer()
|
||||
{
|
||||
var shader = Shader.Find(UxrConstants.Shaders.HiddenInternalColoredShader);
|
||||
_lineMaterial = new Material(shader);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Destroys the temporal material to draw the graph.
|
||||
/// </summary>
|
||||
~UxrInterpolationSettingsDrawer()
|
||||
{
|
||||
Object.DestroyImmediate(_lineMaterial);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Public Overrides PropertyDrawer
|
||||
|
||||
/// <summary>
|
||||
/// Gets the height in pixels required to draw the property.
|
||||
/// </summary>
|
||||
/// <param name="property">Serialized property describing an <see cref="UxrInterpolationSettings" /></param>
|
||||
/// <param name="label">UI label</param>
|
||||
/// <returns>Height in pixels</returns>
|
||||
public override float GetPropertyHeight(SerializedProperty property, GUIContent label)
|
||||
{
|
||||
int lineCount = 5;
|
||||
int loopGraphHeight = 0;
|
||||
|
||||
if (property.FindPropertyRelative(PropertyLoopMode).enumValueIndex != (int)UxrLoopMode.None)
|
||||
{
|
||||
lineCount++;
|
||||
loopGraphHeight += UxrEasingDrawer.GraphHeight;
|
||||
}
|
||||
|
||||
if (property.FindPropertyRelative(PropertyDelay).floatValue > 0.0f)
|
||||
{
|
||||
lineCount++;
|
||||
}
|
||||
|
||||
return lineCount * EditorGUIUtility.singleLineHeight + UxrEasingDrawer.GraphHeight + loopGraphHeight;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Unity
|
||||
|
||||
/// <summary>
|
||||
/// Draws the inspector and handles input.
|
||||
/// </summary>
|
||||
/// <param name="position">Position where to draw the inspector</param>
|
||||
/// <param name="property">Serialized property to draw</param>
|
||||
/// <param name="label">UI label</param>
|
||||
public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
|
||||
{
|
||||
int line = 0;
|
||||
|
||||
EditorGUI.PropertyField(UxrEditorUtils.GetRect(position, line++), property.FindPropertyRelative(PropertyDurationSeconds), ContentDurationSeconds);
|
||||
EditorGUI.PropertyField(UxrEditorUtils.GetRect(position, line++), property.FindPropertyRelative(PropertyDelay), ContentDelay);
|
||||
EditorGUI.PropertyField(UxrEditorUtils.GetRect(position, line++), property.FindPropertyRelative(PropertyEasing), ContentEasing);
|
||||
position.y += UxrEasingDrawer.GraphHeight;
|
||||
EditorGUI.PropertyField(UxrEditorUtils.GetRect(position, line++), property.FindPropertyRelative(PropertyLoopMode), ContentLoopMode);
|
||||
|
||||
UxrLoopMode loopMode = (UxrLoopMode)property.FindPropertyRelative(PropertyLoopMode).enumValueIndex;
|
||||
|
||||
if (loopMode != (int)UxrLoopMode.None)
|
||||
{
|
||||
// Draw preview graph
|
||||
|
||||
Rect graphRect = UxrEditorUtils.GetRect(position, line);
|
||||
graphRect.height = UxrEasingDrawer.GraphHeight;
|
||||
graphRect.xMin += EditorGUIUtility.labelWidth;
|
||||
|
||||
UxrEasing easing = (UxrEasing)property.FindPropertyRelative(PropertyEasing).enumValueIndex;
|
||||
|
||||
UxrEasingDrawer.DrawGraph(graphRect, _lineMaterial, Color.green, easing, loopMode, 5);
|
||||
|
||||
position.y += UxrEasingDrawer.GraphHeight;
|
||||
|
||||
// Draw looped duration property
|
||||
EditorGUI.PropertyField(UxrEditorUtils.GetRect(position, line++), property.FindPropertyRelative(PropertyLoopedDurationSeconds), ContentLoopedDurationSeconds);
|
||||
}
|
||||
|
||||
EditorGUI.PropertyField(UxrEditorUtils.GetRect(position, line++), property.FindPropertyRelative(PropertyUnscaledTime), ContentUnscaledTime);
|
||||
|
||||
if (property.FindPropertyRelative(PropertyDelay).floatValue > 0.0f)
|
||||
{
|
||||
EditorGUI.PropertyField(UxrEditorUtils.GetRect(position, line), property.FindPropertyRelative(PropertyDelayUsingEndValue), ContentDelayUsingEndValue);
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Private Types & Data
|
||||
|
||||
private GUIContent ContentDurationSeconds { get; } = new GUIContent("Duration (Seconds)", "The duration in seconds of the interpolation. In a looped animation it specifies the duration of each loop.");
|
||||
private GUIContent ContentDelay { get; } = new GUIContent("Delay (Seconds)", "The seconds to wait before the interpolation starts");
|
||||
private GUIContent ContentEasing { get; } = new GUIContent("Easing", "The animation curve to use for the interpolation");
|
||||
private GUIContent ContentLoopMode { get; } = new GUIContent("Loop Mode", "The type of loop to use");
|
||||
private GUIContent ContentLoopedDurationSeconds { get; } = new GUIContent("Looped Duration (Seconds)", "The total duration in seconds in a looped interpolation. Use -1 to loop indefinitely.");
|
||||
private GUIContent ContentUnscaledTime { get; } = new GUIContent("Use Unscaled Time", "Whether to use unscaled time, which is unaffected by the timescale");
|
||||
private GUIContent ContentDelayUsingEndValue { get; } = new GUIContent("Use End Value During Delay?", "Whether to use the end value in the interpolation during the initial delay");
|
||||
|
||||
private const string PropertyDurationSeconds = "_durationSeconds";
|
||||
private const string PropertyDelay = "_delaySeconds";
|
||||
private const string PropertyEasing = "_easing";
|
||||
private const string PropertyLoopMode = "_loopMode";
|
||||
private const string PropertyLoopedDurationSeconds = "_loopedDurationSeconds";
|
||||
private const string PropertyUnscaledTime = "_useUnscaledTime";
|
||||
private const string PropertyDelayUsingEndValue = "_delayUsingEndValue";
|
||||
|
||||
private readonly Material _lineMaterial;
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d13258678ccb1cf4fb668f0506bfce5b
|
||||
timeCreated: 1505111962
|
||||
licenseType: Pro
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
8
Assets/ThirdParty/UltimateXR/Editor/Animation/Lights.meta
vendored
Normal file
8
Assets/ThirdParty/UltimateXR/Editor/Animation/Lights.meta
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7b495cabfdb786e4082f0e4f3366f1a1
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
163
Assets/ThirdParty/UltimateXR/Editor/Animation/Lights/UxrAnimateLightIntensityEditor.cs
vendored
Normal file
163
Assets/ThirdParty/UltimateXR/Editor/Animation/Lights/UxrAnimateLightIntensityEditor.cs
vendored
Normal file
@@ -0,0 +1,163 @@
|
||||
// --------------------------------------------------------------------------------------------------------------------
|
||||
// <copyright file="UxrAnimateLightIntensityEditor.cs" company="VRMADA">
|
||||
// Copyright (c) VRMADA, All rights reserved.
|
||||
// </copyright>
|
||||
// --------------------------------------------------------------------------------------------------------------------
|
||||
using UltimateXR.Animation;
|
||||
using UltimateXR.Animation.Lights;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace UltimateXR.Editor.Animation.Lights
|
||||
{
|
||||
/// <summary>
|
||||
/// Custom inspector for <see cref="UxrAnimatedLightIntensity" />.
|
||||
/// </summary>
|
||||
[CustomEditor(typeof(UxrAnimatedLightIntensity))]
|
||||
[CanEditMultipleObjects]
|
||||
public class UxrAnimateLightIntensityEditor : UnityEditor.Editor
|
||||
{
|
||||
#region Unity
|
||||
|
||||
private void OnEnable()
|
||||
{
|
||||
_propertyLight = serializedObject.FindProperty("_light");
|
||||
_propertyAnimationMode = serializedObject.FindProperty("_animationMode");
|
||||
_propertyValueSpeed = serializedObject.FindProperty("_valueSpeed");
|
||||
_propertyValueSpeedDuration = serializedObject.FindProperty("_valueSpeedDurationSeconds");
|
||||
_propertyValueStart = serializedObject.FindProperty("_valueStart");
|
||||
_propertyValueEnd = serializedObject.FindProperty("_valueEnd");
|
||||
_propertyValueDisabled = serializedObject.FindProperty("_valueDisabled");
|
||||
_propertyInterpolationSettings = serializedObject.FindProperty("_interpolationSettings");
|
||||
_propertyValueNoiseTimeStart = serializedObject.FindProperty("_valueNoiseTimeStart");
|
||||
_propertyValueNoiseDuration = serializedObject.FindProperty("_valueNoiseDuration");
|
||||
_propertyValueNoiseValueStart = serializedObject.FindProperty("_valueNoiseValueStart");
|
||||
_propertyValueNoiseValueEnd = serializedObject.FindProperty("_valueNoiseValueEnd");
|
||||
_propertyValueNoiseValueMin = serializedObject.FindProperty("_valueNoiseValueMin");
|
||||
_propertyValueNoiseValueMax = serializedObject.FindProperty("_valueNoiseValueMax");
|
||||
_propertyValueNoiseFrequency = serializedObject.FindProperty("_valueNoiseFrequency");
|
||||
_propertyValueNoiseOffset = serializedObject.FindProperty("_valueNoiseOffset");
|
||||
_propertyUseUnscaledTime = serializedObject.FindProperty("_useUnscaledTime");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Draws the inspector and handles input.
|
||||
/// </summary>
|
||||
public override void OnInspectorGUI()
|
||||
{
|
||||
serializedObject.Update();
|
||||
|
||||
UxrAnimatedLightIntensity animatedLightIntensity = (UxrAnimatedLightIntensity)serializedObject.targetObject;
|
||||
|
||||
if (animatedLightIntensity == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
EditorGUILayout.Space();
|
||||
|
||||
EditorGUILayout.PropertyField(_propertyLight, ContentLight);
|
||||
|
||||
if (animatedLightIntensity.HasFinished == false)
|
||||
{
|
||||
EditorGUILayout.PropertyField(_propertyAnimationMode, ContentAnimationMode);
|
||||
}
|
||||
else
|
||||
{
|
||||
EditorGUILayout.LabelField("Curve finished");
|
||||
}
|
||||
|
||||
if (_propertyAnimationMode.enumValueIndex == (int)UxrAnimationMode.None)
|
||||
{
|
||||
serializedObject.ApplyModifiedProperties();
|
||||
return;
|
||||
}
|
||||
|
||||
if (_propertyAnimationMode.enumValueIndex == (int)UxrAnimationMode.Speed)
|
||||
{
|
||||
Vector4AsFloatPropertyField(_propertyValueSpeed, ContentValueSpeed);
|
||||
EditorGUILayout.PropertyField(_propertyValueSpeedDuration, ContentValueSpeedDuration);
|
||||
EditorGUILayout.PropertyField(_propertyUseUnscaledTime);
|
||||
}
|
||||
else if (_propertyAnimationMode.enumValueIndex == (int)UxrAnimationMode.Interpolate)
|
||||
{
|
||||
Vector4AsFloatPropertyField(_propertyValueStart, ContentValueStart);
|
||||
Vector4AsFloatPropertyField(_propertyValueEnd, ContentValueEnd);
|
||||
Vector4AsFloatPropertyField(_propertyValueDisabled, ContentValueDisabled);
|
||||
EditorGUILayout.PropertyField(_propertyInterpolationSettings, ContentInterpolationSettings);
|
||||
}
|
||||
else if (_propertyAnimationMode.enumValueIndex == (int)UxrAnimationMode.Noise)
|
||||
{
|
||||
EditorGUILayout.PropertyField(_propertyValueNoiseTimeStart, ContentValueNoiseTimeStart);
|
||||
EditorGUILayout.PropertyField(_propertyValueNoiseDuration, ContentValueNoiseDuration);
|
||||
Vector4AsFloatPropertyField(_propertyValueNoiseValueStart, ContentValueNoiseValueStart);
|
||||
Vector4AsFloatPropertyField(_propertyValueNoiseValueEnd, ContentValueNoiseValueEnd);
|
||||
Vector4AsFloatPropertyField(_propertyValueNoiseValueMin, ContentValueNoiseValueMin);
|
||||
Vector4AsFloatPropertyField(_propertyValueNoiseValueMax, ContentValueNoiseValueMax);
|
||||
Vector4AsFloatPropertyField(_propertyValueNoiseFrequency, ContentValueNoiseFrequency);
|
||||
Vector4AsFloatPropertyField(_propertyValueNoiseOffset, ContentValueNoiseOffset);
|
||||
EditorGUILayout.PropertyField(_propertyUseUnscaledTime, ContentUseUnscaledTime);
|
||||
}
|
||||
|
||||
EditorGUILayout.Space();
|
||||
|
||||
serializedObject.ApplyModifiedProperties();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Private Methods
|
||||
|
||||
/// <summary>
|
||||
/// Draws a float property field but assigns it to a Vector4 serialized property.
|
||||
/// </summary>
|
||||
/// <param name="property">Serialized property that targets a Vector4 value</param>
|
||||
/// <param name="guiContent">UI information</param>
|
||||
private void Vector4AsFloatPropertyField(SerializedProperty property, GUIContent guiContent)
|
||||
{
|
||||
property.vector4Value = new Vector4(EditorGUILayout.FloatField(guiContent, property.vector4Value.x), 0.0f, 0.0f, 0.0f);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Private Types & Data
|
||||
|
||||
private GUIContent ContentLight { get; } = new GUIContent("Light");
|
||||
private GUIContent ContentAnimationMode { get; } = new GUIContent("Animation Mode");
|
||||
private GUIContent ContentValueSpeed { get; } = new GUIContent("Speed");
|
||||
private GUIContent ContentValueSpeedDuration { get; } = new GUIContent("Duration (seconds)");
|
||||
private GUIContent ContentValueStart { get; } = new GUIContent("Start Value");
|
||||
private GUIContent ContentValueEnd { get; } = new GUIContent("End Value");
|
||||
private GUIContent ContentValueDisabled { get; } = new GUIContent("Value When Disabled");
|
||||
private GUIContent ContentInterpolationSettings { get; } = new GUIContent("Interpolation Settings");
|
||||
private GUIContent ContentValueNoiseTimeStart { get; } = new GUIContent("Noise Time Start");
|
||||
private GUIContent ContentValueNoiseDuration { get; } = new GUIContent("Noise Duration");
|
||||
private GUIContent ContentValueNoiseValueStart { get; } = new GUIContent("Value Start");
|
||||
private GUIContent ContentValueNoiseValueEnd { get; } = new GUIContent("Value End");
|
||||
private GUIContent ContentValueNoiseValueMin { get; } = new GUIContent("Noise Value Min");
|
||||
private GUIContent ContentValueNoiseValueMax { get; } = new GUIContent("Noise Value Max");
|
||||
private GUIContent ContentValueNoiseFrequency { get; } = new GUIContent("Noise Frequency");
|
||||
private GUIContent ContentValueNoiseOffset { get; } = new GUIContent("Noise Offset");
|
||||
private GUIContent ContentUseUnscaledTime { get; } = new GUIContent("Use Unscaled Time");
|
||||
|
||||
private SerializedProperty _propertyLight;
|
||||
private SerializedProperty _propertyAnimationMode;
|
||||
private SerializedProperty _propertyValueSpeed;
|
||||
private SerializedProperty _propertyValueSpeedDuration;
|
||||
private SerializedProperty _propertyValueStart;
|
||||
private SerializedProperty _propertyValueEnd;
|
||||
private SerializedProperty _propertyValueDisabled;
|
||||
private SerializedProperty _propertyInterpolationSettings;
|
||||
private SerializedProperty _propertyValueNoiseTimeStart;
|
||||
private SerializedProperty _propertyValueNoiseDuration;
|
||||
private SerializedProperty _propertyValueNoiseValueStart;
|
||||
private SerializedProperty _propertyValueNoiseValueEnd;
|
||||
private SerializedProperty _propertyValueNoiseValueMin;
|
||||
private SerializedProperty _propertyValueNoiseValueMax;
|
||||
private SerializedProperty _propertyValueNoiseFrequency;
|
||||
private SerializedProperty _propertyValueNoiseOffset;
|
||||
private SerializedProperty _propertyUseUnscaledTime;
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
13
Assets/ThirdParty/UltimateXR/Editor/Animation/Lights/UxrAnimateLightIntensityEditor.cs.meta
vendored
Normal file
13
Assets/ThirdParty/UltimateXR/Editor/Animation/Lights/UxrAnimateLightIntensityEditor.cs.meta
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ca36d821a4c7a8b4698ed55dcd0080b4
|
||||
timeCreated: 1511875957
|
||||
licenseType: Pro
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
8
Assets/ThirdParty/UltimateXR/Editor/Animation/Materials.meta
vendored
Normal file
8
Assets/ThirdParty/UltimateXR/Editor/Animation/Materials.meta
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b0c28b289ce91fc43a0b03df7ebc1f63
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
237
Assets/ThirdParty/UltimateXR/Editor/Animation/Materials/UxrAnimatedMaterialEditor.cs
vendored
Normal file
237
Assets/ThirdParty/UltimateXR/Editor/Animation/Materials/UxrAnimatedMaterialEditor.cs
vendored
Normal file
@@ -0,0 +1,237 @@
|
||||
// --------------------------------------------------------------------------------------------------------------------
|
||||
// <copyright file="UxrAnimatedMaterialEditor.cs" company="VRMADA">
|
||||
// Copyright (c) VRMADA, All rights reserved.
|
||||
// </copyright>
|
||||
// --------------------------------------------------------------------------------------------------------------------
|
||||
using UltimateXR.Animation;
|
||||
using UltimateXR.Animation.Materials;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace UltimateXR.Editor.Animation.Materials
|
||||
{
|
||||
/// <summary>
|
||||
/// Custom inspector for <see cref="UxrAnimatedMaterial" />.
|
||||
/// </summary>
|
||||
[CustomEditor(typeof(UxrAnimatedMaterial))]
|
||||
[CanEditMultipleObjects]
|
||||
public class UxrAnimatedMaterialEditor : UnityEditor.Editor
|
||||
{
|
||||
#region Unity
|
||||
|
||||
/// <summary>
|
||||
/// Caches serialized properties.
|
||||
/// </summary>
|
||||
private void OnEnable()
|
||||
{
|
||||
_propertyAnimationMode = serializedObject.FindProperty("_animationMode");
|
||||
_propertyAnimateSelf = serializedObject.FindProperty("_animateSelf");
|
||||
_propertyTargetGameObject = serializedObject.FindProperty("_targetGameObject");
|
||||
_propertyMaterialSlot = serializedObject.FindProperty("_materialSlot");
|
||||
_propertyMaterialMode = serializedObject.FindProperty("_materialMode");
|
||||
_propertyRestoreWhenFinished = serializedObject.FindProperty("_restoreWhenFinished");
|
||||
_propertyParameterType = serializedObject.FindProperty("_parameterType");
|
||||
_propertyParameterName = serializedObject.FindProperty("_parameterName");
|
||||
_propertyValueSpeed = serializedObject.FindProperty("_valueSpeed");
|
||||
_propertyValueSpeedDuration = serializedObject.FindProperty("_valueSpeedDurationSeconds");
|
||||
_propertyValueStart = serializedObject.FindProperty("_valueStart");
|
||||
_propertyValueEnd = serializedObject.FindProperty("_valueEnd");
|
||||
_propertyValueDisabled = serializedObject.FindProperty("_valueDisabled");
|
||||
_propertyInterpolationSettings = serializedObject.FindProperty("_interpolationSettings");
|
||||
_propertyValueNoiseTimeStart = serializedObject.FindProperty("_valueNoiseTimeStart");
|
||||
_propertyValueNoiseDuration = serializedObject.FindProperty("_valueNoiseDuration");
|
||||
_propertyValueNoiseValueStart = serializedObject.FindProperty("_valueNoiseValueStart");
|
||||
_propertyValueNoiseValueEnd = serializedObject.FindProperty("_valueNoiseValueEnd");
|
||||
_propertyValueNoiseValueMin = serializedObject.FindProperty("_valueNoiseValueMin");
|
||||
_propertyValueNoiseValueMax = serializedObject.FindProperty("_valueNoiseValueMax");
|
||||
_propertyValueNoiseFrequency = serializedObject.FindProperty("_valueNoiseFrequency");
|
||||
_propertyValueNoiseOffset = serializedObject.FindProperty("_valueNoiseOffset");
|
||||
_propertyUseUnscaledTime = serializedObject.FindProperty("_useUnscaledTime");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Draws the inspector UI.
|
||||
/// </summary>
|
||||
public override void OnInspectorGUI()
|
||||
{
|
||||
serializedObject.Update();
|
||||
|
||||
UxrAnimatedMaterial animatedMaterial = (UxrAnimatedMaterial)serializedObject.targetObject;
|
||||
|
||||
if (animatedMaterial == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
EditorGUILayout.Space();
|
||||
|
||||
if (animatedMaterial.HasFinished == false)
|
||||
{
|
||||
EditorGUILayout.PropertyField(_propertyAnimationMode, ContentAnimationMode);
|
||||
EditorGUILayout.PropertyField(_propertyAnimateSelf, ContentAnimateSelf);
|
||||
|
||||
if (!_propertyAnimateSelf.boolValue)
|
||||
{
|
||||
EditorGUILayout.PropertyField(_propertyTargetGameObject, ContentTargetGameObject);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
EditorGUILayout.LabelField("Curve finished");
|
||||
}
|
||||
|
||||
if (_propertyAnimationMode.enumValueIndex == (int)UxrAnimationMode.None)
|
||||
{
|
||||
serializedObject.ApplyModifiedProperties();
|
||||
return;
|
||||
}
|
||||
|
||||
EditorGUILayout.PropertyField(_propertyMaterialSlot, ContentMaterialSlot);
|
||||
EditorGUILayout.PropertyField(_propertyMaterialMode, ContentMaterialMode);
|
||||
|
||||
if (_propertyMaterialMode.enumValueIndex == (int)UxrMaterialMode.InstanceOnly)
|
||||
{
|
||||
EditorGUILayout.PropertyField(_propertyRestoreWhenFinished, ContentRestoreWhenFinished);
|
||||
}
|
||||
|
||||
EditorGUILayout.PropertyField(_propertyParameterType, ContentParameterType);
|
||||
EditorGUILayout.PropertyField(_propertyParameterName, ContentParameterName);
|
||||
|
||||
if (_propertyAnimationMode.enumValueIndex == (int)UxrAnimationMode.Speed)
|
||||
{
|
||||
ParameterPropertyField(ContentValueSpeed, _propertyValueSpeed);
|
||||
EditorGUILayout.PropertyField(_propertyValueSpeedDuration, ContentValueSpeedDuration);
|
||||
EditorGUILayout.PropertyField(_propertyUseUnscaledTime, ContentUseUnscaledTime);
|
||||
}
|
||||
else if (_propertyAnimationMode.enumValueIndex == (int)UxrAnimationMode.Interpolate)
|
||||
{
|
||||
ParameterPropertyField(ContentValueStart, _propertyValueStart, true);
|
||||
ParameterPropertyField(ContentValueEnd, _propertyValueEnd, true);
|
||||
ParameterPropertyField(ContentValueDisabled, _propertyValueDisabled, true);
|
||||
EditorGUILayout.PropertyField(_propertyInterpolationSettings, ContentInterpolationSettings, true);
|
||||
}
|
||||
else if (_propertyAnimationMode.enumValueIndex == (int)UxrAnimationMode.Noise)
|
||||
{
|
||||
EditorGUILayout.PropertyField(_propertyValueNoiseTimeStart, ContentValueNoiseTimeStart);
|
||||
EditorGUILayout.PropertyField(_propertyValueNoiseDuration, ContentValueNoiseDuration);
|
||||
ParameterPropertyField(ContentValueNoiseValueStart, _propertyValueNoiseValueStart, true);
|
||||
ParameterPropertyField(ContentValueNoiseValueEnd, _propertyValueNoiseValueEnd, true);
|
||||
ParameterPropertyField(ContentValueNoiseValueMin, _propertyValueNoiseValueMin, true);
|
||||
ParameterPropertyField(ContentValueNoiseValueMax, _propertyValueNoiseValueMax, true);
|
||||
ParameterPropertyField(ContentValueNoiseFrequency, _propertyValueNoiseFrequency);
|
||||
ParameterPropertyField(ContentValueNoiseOffset, _propertyValueNoiseOffset);
|
||||
EditorGUILayout.PropertyField(_propertyUseUnscaledTime, ContentUseUnscaledTime);
|
||||
}
|
||||
|
||||
EditorGUILayout.Space();
|
||||
|
||||
serializedObject.ApplyModifiedProperties();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Private Methods
|
||||
|
||||
/// <summary>
|
||||
/// Draws an inspector property field depending on the material parameter type.
|
||||
/// </summary>
|
||||
/// <param name="guiContent">The label and tooltip to show in the inspector</param>
|
||||
/// <param name="property">The serialized property</param>
|
||||
/// <param name="isParameterValue">
|
||||
/// When using colors, Whether to force to show the field as a vector4 instead of a color
|
||||
/// picker
|
||||
/// </param>
|
||||
private void ParameterPropertyField(GUIContent guiContent, SerializedProperty property, bool isParameterValue = false)
|
||||
{
|
||||
switch (_propertyParameterType.enumValueIndex)
|
||||
{
|
||||
case (int)UxrMaterialParameterType.Int:
|
||||
property.vector4Value = new Vector4(EditorGUILayout.IntField(guiContent, Mathf.RoundToInt(property.vector4Value.x)), 0, 0, 0);
|
||||
break;
|
||||
|
||||
case (int)UxrMaterialParameterType.Float:
|
||||
property.vector4Value = new Vector4(EditorGUILayout.FloatField(guiContent, property.vector4Value.x), 0, 0, 0);
|
||||
break;
|
||||
|
||||
case (int)UxrMaterialParameterType.Vector2:
|
||||
property.vector4Value = EditorGUILayout.Vector2Field(guiContent, new Vector2(property.vector4Value.x, property.vector4Value.y));
|
||||
break;
|
||||
|
||||
case (int)UxrMaterialParameterType.Vector3:
|
||||
property.vector4Value = EditorGUILayout.Vector3Field(guiContent, new Vector3(property.vector4Value.x, property.vector4Value.y, property.vector4Value.z));
|
||||
break;
|
||||
|
||||
case (int)UxrMaterialParameterType.Vector4:
|
||||
property.vector4Value = EditorGUILayout.Vector4Field(guiContent, property.vector4Value);
|
||||
break;
|
||||
|
||||
case (int)UxrMaterialParameterType.Color:
|
||||
|
||||
if (!isParameterValue)
|
||||
{
|
||||
property.vector4Value = EditorGUILayout.Vector4Field(guiContent, property.vector4Value);
|
||||
}
|
||||
else
|
||||
{
|
||||
property.vector4Value = EditorGUILayout.ColorField(guiContent, property.vector4Value);
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Private Types & Data
|
||||
|
||||
private GUIContent ContentAnimationMode { get; } = new GUIContent("Animation Mode");
|
||||
private GUIContent ContentAnimateSelf { get; } = new GUIContent("Animate Self");
|
||||
private GUIContent ContentTargetGameObject { get; } = new GUIContent("Target GameObject");
|
||||
private GUIContent ContentMaterialSlot { get; } = new GUIContent("Material Slot");
|
||||
private GUIContent ContentMaterialMode { get; } = new GUIContent("Material Mode");
|
||||
private GUIContent ContentRestoreWhenFinished { get; } = new GUIContent("Restore When Finished", "Restores the original material when the instance animation finished. Use this for performance since shared materials can save draw calls and render state changes");
|
||||
private GUIContent ContentParameterType { get; } = new GUIContent("Parameter Type");
|
||||
private GUIContent ContentParameterName { get; } = new GUIContent("Parameter Name");
|
||||
private GUIContent ContentValueSpeed { get; } = new GUIContent("Speed");
|
||||
private GUIContent ContentValueSpeedDuration { get; } = new GUIContent("Duration (seconds)");
|
||||
private GUIContent ContentValueStart { get; } = new GUIContent("Start Value");
|
||||
private GUIContent ContentValueEnd { get; } = new GUIContent("End Value");
|
||||
private GUIContent ContentValueDisabled { get; } = new GUIContent("Value When Disabled");
|
||||
private GUIContent ContentInterpolationSettings { get; } = new GUIContent("Interpolation Settings");
|
||||
private GUIContent ContentValueNoiseTimeStart { get; } = new GUIContent("Noise Time Start");
|
||||
private GUIContent ContentValueNoiseDuration { get; } = new GUIContent("Noise Duration");
|
||||
private GUIContent ContentValueNoiseValueStart { get; } = new GUIContent("Value Start");
|
||||
private GUIContent ContentValueNoiseValueEnd { get; } = new GUIContent("Value End");
|
||||
private GUIContent ContentValueNoiseValueMin { get; } = new GUIContent("Noise Value Min");
|
||||
private GUIContent ContentValueNoiseValueMax { get; } = new GUIContent("Noise Value Max");
|
||||
private GUIContent ContentValueNoiseFrequency { get; } = new GUIContent("Noise Frequency");
|
||||
private GUIContent ContentValueNoiseOffset { get; } = new GUIContent("Noise Offset");
|
||||
private GUIContent ContentUseUnscaledTime { get; } = new GUIContent("Use Unscaled Time");
|
||||
|
||||
private SerializedProperty _propertyAnimationMode;
|
||||
private SerializedProperty _propertyAnimateSelf;
|
||||
private SerializedProperty _propertyTargetGameObject;
|
||||
private SerializedProperty _propertyMaterialSlot;
|
||||
private SerializedProperty _propertyMaterialMode;
|
||||
private SerializedProperty _propertyRestoreWhenFinished;
|
||||
private SerializedProperty _propertyParameterType;
|
||||
private SerializedProperty _propertyParameterName;
|
||||
private SerializedProperty _propertyValueSpeed;
|
||||
private SerializedProperty _propertyValueSpeedDuration;
|
||||
private SerializedProperty _propertyValueStart;
|
||||
private SerializedProperty _propertyValueEnd;
|
||||
private SerializedProperty _propertyValueDisabled;
|
||||
private SerializedProperty _propertyInterpolationSettings;
|
||||
private SerializedProperty _propertyValueNoiseTimeStart;
|
||||
private SerializedProperty _propertyValueNoiseDuration;
|
||||
private SerializedProperty _propertyValueNoiseValueStart;
|
||||
private SerializedProperty _propertyValueNoiseValueEnd;
|
||||
private SerializedProperty _propertyValueNoiseValueMin;
|
||||
private SerializedProperty _propertyValueNoiseValueMax;
|
||||
private SerializedProperty _propertyValueNoiseFrequency;
|
||||
private SerializedProperty _propertyValueNoiseOffset;
|
||||
private SerializedProperty _propertyUseUnscaledTime;
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
13
Assets/ThirdParty/UltimateXR/Editor/Animation/Materials/UxrAnimatedMaterialEditor.cs.meta
vendored
Normal file
13
Assets/ThirdParty/UltimateXR/Editor/Animation/Materials/UxrAnimatedMaterialEditor.cs.meta
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0106c1d6d9a8af2468aa8e5f1b3f3510
|
||||
timeCreated: 1511875957
|
||||
licenseType: Pro
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
8
Assets/ThirdParty/UltimateXR/Editor/Animation/Transforms.meta
vendored
Normal file
8
Assets/ThirdParty/UltimateXR/Editor/Animation/Transforms.meta
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e28f7a30a665f264fa80e223355148ee
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
212
Assets/ThirdParty/UltimateXR/Editor/Animation/Transforms/UxrAnimatedTransformEditor.cs
vendored
Normal file
212
Assets/ThirdParty/UltimateXR/Editor/Animation/Transforms/UxrAnimatedTransformEditor.cs
vendored
Normal file
@@ -0,0 +1,212 @@
|
||||
// --------------------------------------------------------------------------------------------------------------------
|
||||
// <copyright file="UxrAnimatedTransformEditor.cs" company="VRMADA">
|
||||
// Copyright (c) VRMADA, All rights reserved.
|
||||
// </copyright>
|
||||
// --------------------------------------------------------------------------------------------------------------------
|
||||
using UltimateXR.Animation;
|
||||
using UltimateXR.Animation.Transforms;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace UltimateXR.Editor.Animation.Transforms
|
||||
{
|
||||
/// <summary>
|
||||
/// Custom inspector for <see cref="UxrAnimatedTransform" />.
|
||||
/// </summary>
|
||||
[CustomEditor(typeof(UxrAnimatedTransform))]
|
||||
public class UxrAnimatedTransformEditor : UnityEditor.Editor
|
||||
{
|
||||
#region Unity
|
||||
|
||||
/// <summary>
|
||||
/// Caches serialized properties.
|
||||
/// </summary>
|
||||
private void OnEnable()
|
||||
{
|
||||
_propertyTranslationMode = serializedObject.FindProperty("_translationMode");
|
||||
_propertyTranslationSpace = serializedObject.FindProperty("_translationSpace");
|
||||
_propertyTranslationSpeed = serializedObject.FindProperty("_translationSpeed");
|
||||
_propertyTranslationStart = serializedObject.FindProperty("_translationStart");
|
||||
_propertyTranslationEnd = serializedObject.FindProperty("_translationEnd");
|
||||
_propertyTranslationUseUnscaledTime = serializedObject.FindProperty("_translationUseUnscaledTime");
|
||||
_propertyTranslationInterpolationSetting = serializedObject.FindProperty("_translationInterpolationSettings");
|
||||
_propertyRotationMode = serializedObject.FindProperty("_rotationMode");
|
||||
_propertyRotationSpace = serializedObject.FindProperty("_rotationSpace");
|
||||
_propertyEulerSpeed = serializedObject.FindProperty("_eulerSpeed");
|
||||
_propertyEulerStart = serializedObject.FindProperty("_eulerStart");
|
||||
_propertyEulerEnd = serializedObject.FindProperty("_eulerEnd");
|
||||
_propertyRotationUseUnscaledTime = serializedObject.FindProperty("_rotationUseUnscaledTime");
|
||||
_propertyRotationInterpolationSettings = serializedObject.FindProperty("_rotationInterpolationSettings");
|
||||
_propertyScalingMode = serializedObject.FindProperty("_scalingMode");
|
||||
_propertyScalingSpeed = serializedObject.FindProperty("_scalingSpeed");
|
||||
_propertyScalingStart = serializedObject.FindProperty("_scalingStart");
|
||||
_propertyScalingEnd = serializedObject.FindProperty("_scalingEnd");
|
||||
_propertyScalingUseUnscaledTime = serializedObject.FindProperty("_scalingUseUnscaledTime");
|
||||
_propertyScalingInterpolationSettings = serializedObject.FindProperty("_scalingInterpolationSettings");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Draws the inspector and handles input.
|
||||
/// </summary>
|
||||
public override void OnInspectorGUI()
|
||||
{
|
||||
serializedObject.Update();
|
||||
|
||||
UxrAnimatedTransform animatedTransform = (UxrAnimatedTransform)serializedObject.targetObject;
|
||||
|
||||
if (animatedTransform == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
EditorGUILayout.Space();
|
||||
|
||||
if (animatedTransform.HasTranslationFinished == false)
|
||||
{
|
||||
EditorGUILayout.PropertyField(_propertyTranslationMode, ContentTranslationMode);
|
||||
}
|
||||
else
|
||||
{
|
||||
EditorGUILayout.LabelField("Translation curve finished");
|
||||
}
|
||||
|
||||
if (_propertyTranslationMode.enumValueIndex == (int)UxrAnimationMode.Speed)
|
||||
{
|
||||
EditorGUI.indentLevel++;
|
||||
EditorGUILayout.PropertyField(_propertyTranslationSpace, ContentTranslationSpace);
|
||||
EditorGUILayout.PropertyField(_propertyTranslationSpeed, ContentTranslationSpeed);
|
||||
EditorGUILayout.PropertyField(_propertyTranslationUseUnscaledTime, ContentTranslationUseUnscaledTime);
|
||||
EditorGUI.indentLevel--;
|
||||
}
|
||||
else if (_propertyTranslationMode.enumValueIndex == (int)UxrAnimationMode.Interpolate)
|
||||
{
|
||||
EditorGUI.indentLevel++;
|
||||
EditorGUILayout.PropertyField(_propertyTranslationSpace, ContentTranslationSpace);
|
||||
EditorGUILayout.PropertyField(_propertyTranslationStart, ContentTranslationStart);
|
||||
EditorGUILayout.PropertyField(_propertyTranslationEnd, ContentTranslationEnd);
|
||||
EditorGUILayout.PropertyField(_propertyTranslationInterpolationSetting, ContentTranslationInterpolationSetting);
|
||||
EditorGUI.indentLevel--;
|
||||
}
|
||||
else if (_propertyTranslationMode.enumValueIndex == (int)UxrAnimationMode.Noise)
|
||||
{
|
||||
EditorGUILayout.LabelField("Unsupported for now");
|
||||
}
|
||||
|
||||
EditorGUILayout.Space();
|
||||
|
||||
if (animatedTransform.HasRotationFinished == false)
|
||||
{
|
||||
EditorGUILayout.PropertyField(_propertyRotationMode, ContentRotationMode);
|
||||
}
|
||||
else
|
||||
{
|
||||
EditorGUILayout.LabelField("Rotation curve finished");
|
||||
}
|
||||
|
||||
if (_propertyRotationMode.enumValueIndex == (int)UxrAnimationMode.Speed)
|
||||
{
|
||||
EditorGUI.indentLevel++;
|
||||
EditorGUILayout.PropertyField(_propertyRotationSpace, ContentRotationSpace);
|
||||
EditorGUILayout.PropertyField(_propertyEulerSpeed, ContentEulerSpeed);
|
||||
EditorGUILayout.PropertyField(_propertyRotationUseUnscaledTime, ContentRotationUseUnscaledTime);
|
||||
EditorGUI.indentLevel--;
|
||||
}
|
||||
else if (_propertyRotationMode.enumValueIndex == (int)UxrAnimationMode.Interpolate)
|
||||
{
|
||||
EditorGUI.indentLevel++;
|
||||
EditorGUILayout.PropertyField(_propertyRotationSpace, ContentRotationSpace);
|
||||
EditorGUILayout.PropertyField(_propertyEulerStart, ContentEulerStart);
|
||||
EditorGUILayout.PropertyField(_propertyEulerEnd, ContentEulerEnd);
|
||||
EditorGUILayout.PropertyField(_propertyRotationInterpolationSettings, ContentRotationInterpolationSettings);
|
||||
EditorGUI.indentLevel--;
|
||||
}
|
||||
else if (_propertyRotationMode.enumValueIndex == (int)UxrAnimationMode.Noise)
|
||||
{
|
||||
EditorGUILayout.LabelField("Unsupported for now");
|
||||
}
|
||||
|
||||
EditorGUILayout.Space();
|
||||
|
||||
if (animatedTransform.HasScalingFinished == false)
|
||||
{
|
||||
EditorGUILayout.PropertyField(_propertyScalingMode, ContentScalingMode);
|
||||
}
|
||||
else
|
||||
{
|
||||
EditorGUILayout.LabelField("Scaling curve finished");
|
||||
}
|
||||
|
||||
if (_propertyScalingMode.enumValueIndex == (int)UxrAnimationMode.Speed)
|
||||
{
|
||||
EditorGUI.indentLevel++;
|
||||
EditorGUILayout.PropertyField(_propertyScalingSpeed, ContentScalingSpeed);
|
||||
EditorGUILayout.PropertyField(_propertyScalingUseUnscaledTime, ContentScalingUseUnscaledTime);
|
||||
EditorGUI.indentLevel--;
|
||||
}
|
||||
else if (_propertyScalingMode.enumValueIndex == (int)UxrAnimationMode.Interpolate)
|
||||
{
|
||||
EditorGUI.indentLevel++;
|
||||
EditorGUILayout.PropertyField(_propertyScalingStart, ContentScalingStart);
|
||||
EditorGUILayout.PropertyField(_propertyScalingEnd, ContentScalingEnd);
|
||||
EditorGUILayout.PropertyField(_propertyScalingInterpolationSettings, ContentScalingInterpolationSettings);
|
||||
EditorGUI.indentLevel--;
|
||||
}
|
||||
else if (_propertyScalingMode.enumValueIndex == (int)UxrAnimationMode.Noise)
|
||||
{
|
||||
EditorGUILayout.LabelField("Unsupported for now");
|
||||
}
|
||||
|
||||
EditorGUILayout.Space();
|
||||
|
||||
serializedObject.ApplyModifiedProperties();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Private Types & Data
|
||||
|
||||
private GUIContent ContentTranslationMode { get; } = new GUIContent("Translation Mode", "Selects the translation mode to use");
|
||||
private GUIContent ContentTranslationSpace { get; } = new GUIContent("Translation Space", "Selects the space in which the translation will be performed");
|
||||
private GUIContent ContentTranslationSpeed { get; } = new GUIContent("Translation Speed", "The number of units per second to move");
|
||||
private GUIContent ContentTranslationStart { get; } = new GUIContent("Start Position", "The start position. In a looped animation, the start position of each loop");
|
||||
private GUIContent ContentTranslationEnd { get; } = new GUIContent("End Position", "The end position. In a looped animation, the end position of each loop");
|
||||
private GUIContent ContentTranslationUseUnscaledTime { get; } = new GUIContent("Use Unscaled Time", "Whether to use unscaled time, which is the timer without considering time scaling for effects such as bullet-time");
|
||||
private GUIContent ContentTranslationInterpolationSetting { get; } = new GUIContent("Interpolation Settings", "The translation interpolation settings");
|
||||
private GUIContent ContentRotationMode { get; } = new GUIContent("Rotation Mode", "Selects the rotation mode to use");
|
||||
private GUIContent ContentRotationSpace { get; } = new GUIContent("Rotation Space", "Selects the space in which the rotation will be performed");
|
||||
private GUIContent ContentEulerSpeed { get; } = new GUIContent("Angular Speed", "The number of degrees per second to rotate");
|
||||
private GUIContent ContentEulerStart { get; } = new GUIContent("Start Angles", "The start Euler angles. In a looped animation, the start Euler angles of each loop");
|
||||
private GUIContent ContentEulerEnd { get; } = new GUIContent("End Angles", "The end Euler angles. In a looped animation, the end Euler angles of each loop");
|
||||
private GUIContent ContentRotationUseUnscaledTime { get; } = new GUIContent("Use Unscaled Time", "Whether to use unscaled time, which is the timer without considering time scaling for effects such as bullet-time");
|
||||
private GUIContent ContentRotationInterpolationSettings { get; } = new GUIContent("Interpolation Settings", "The rotation interpolation settings");
|
||||
private GUIContent ContentScalingMode { get; } = new GUIContent("Scaling Mode", "Selects the scaling mode to use");
|
||||
private GUIContent ContentScalingSpeed { get; } = new GUIContent("Scaling Speed", "The number of units per second to scale");
|
||||
private GUIContent ContentScalingStart { get; } = new GUIContent("Start Scale", "The start scale. In a looped animation, the start scale of each loop");
|
||||
private GUIContent ContentScalingEnd { get; } = new GUIContent("End Scale", "The end scale. In a looped animation, the end scale of each loop");
|
||||
private GUIContent ContentScalingUseUnscaledTime { get; } = new GUIContent("Use Unscaled Time", "Whether to use unscaled time, which is the timer without considering time scaling for effects such as bullet-time");
|
||||
private GUIContent ContentScalingInterpolationSettings { get; } = new GUIContent("Interpolation Settings", "The scale interpolation settings");
|
||||
|
||||
private SerializedProperty _propertyTranslationMode;
|
||||
private SerializedProperty _propertyTranslationSpace;
|
||||
private SerializedProperty _propertyTranslationSpeed;
|
||||
private SerializedProperty _propertyTranslationStart;
|
||||
private SerializedProperty _propertyTranslationEnd;
|
||||
private SerializedProperty _propertyTranslationUseUnscaledTime;
|
||||
private SerializedProperty _propertyTranslationInterpolationSetting;
|
||||
private SerializedProperty _propertyRotationMode;
|
||||
private SerializedProperty _propertyRotationSpace;
|
||||
private SerializedProperty _propertyEulerSpeed;
|
||||
private SerializedProperty _propertyEulerStart;
|
||||
private SerializedProperty _propertyEulerEnd;
|
||||
private SerializedProperty _propertyRotationUseUnscaledTime;
|
||||
private SerializedProperty _propertyRotationInterpolationSettings;
|
||||
private SerializedProperty _propertyScalingMode;
|
||||
private SerializedProperty _propertyScalingSpeed;
|
||||
private SerializedProperty _propertyScalingStart;
|
||||
private SerializedProperty _propertyScalingEnd;
|
||||
private SerializedProperty _propertyScalingUseUnscaledTime;
|
||||
private SerializedProperty _propertyScalingInterpolationSettings;
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
13
Assets/ThirdParty/UltimateXR/Editor/Animation/Transforms/UxrAnimatedTransformEditor.cs.meta
vendored
Normal file
13
Assets/ThirdParty/UltimateXR/Editor/Animation/Transforms/UxrAnimatedTransformEditor.cs.meta
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9d4025aaca37b8142ad37f1a20f663a4
|
||||
timeCreated: 1511875957
|
||||
licenseType: Pro
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
96
Assets/ThirdParty/UltimateXR/Editor/Animation/Transforms/UxrLookAtEditor.cs
vendored
Normal file
96
Assets/ThirdParty/UltimateXR/Editor/Animation/Transforms/UxrLookAtEditor.cs
vendored
Normal file
@@ -0,0 +1,96 @@
|
||||
// --------------------------------------------------------------------------------------------------------------------
|
||||
// <copyright file="UxrLookAtEditor.cs" company="VRMADA">
|
||||
// Copyright (c) VRMADA, All rights reserved.
|
||||
// </copyright>
|
||||
// --------------------------------------------------------------------------------------------------------------------
|
||||
using UltimateXR.Animation.Transforms;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace UltimateXR.Editor.Animation.Transforms
|
||||
{
|
||||
/// <summary>
|
||||
/// Custom inspector for <see cref="UxrLookAt" />.
|
||||
/// </summary>
|
||||
[CustomEditor(typeof(UxrLookAt))]
|
||||
public class UxrLookAtEditor : UnityEditor.Editor
|
||||
{
|
||||
#region Unity
|
||||
|
||||
/// <summary>
|
||||
/// Caches serialized properties.
|
||||
/// </summary>
|
||||
private void OnEnable()
|
||||
{
|
||||
_propertyMode = serializedObject.FindProperty("_mode");
|
||||
_propertyTarget = serializedObject.FindProperty("_target");
|
||||
_propertyLookAxis = serializedObject.FindProperty("_lookAxis");
|
||||
_propertyUpAxis = serializedObject.FindProperty("_upAxis");
|
||||
_propertyMatchDirection = serializedObject.FindProperty("_matchDirection");
|
||||
_propertyAllowRotateAroundUp = serializedObject.FindProperty("_allowRotateAroundUp");
|
||||
_propertyAllowRotateAroundRight = serializedObject.FindProperty("_allowRotateAroundRight");
|
||||
_propertyInvertedLookAxis = serializedObject.FindProperty("_invertedLookAxis");
|
||||
_propertyOnlyOnce = serializedObject.FindProperty("_onlyOnce");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Draws the inspector and handles input.
|
||||
/// </summary>
|
||||
public override void OnInspectorGUI()
|
||||
{
|
||||
serializedObject.Update();
|
||||
|
||||
EditorGUILayout.PropertyField(_propertyMode, ContentMode);
|
||||
|
||||
if (_propertyMode.enumValueIndex == (int)UxrLookAtMode.Target || _propertyMode.enumValueIndex == (int)UxrLookAtMode.MatchTargetDirection)
|
||||
{
|
||||
EditorGUILayout.PropertyField(_propertyTarget, ContentTarget);
|
||||
}
|
||||
|
||||
EditorGUILayout.PropertyField(_propertyLookAxis, ContentLookAxis);
|
||||
EditorGUILayout.PropertyField(_propertyUpAxis, ContentUpAxis);
|
||||
|
||||
if (_propertyMode.enumValueIndex == (int)UxrLookAtMode.MatchWorldDirection || _propertyMode.enumValueIndex == (int)UxrLookAtMode.MatchTargetDirection)
|
||||
{
|
||||
EditorGUILayout.PropertyField(_propertyMatchDirection, ContentMatchDirection);
|
||||
}
|
||||
|
||||
if (_propertyMode.enumValueIndex == (int)UxrLookAtMode.Target)
|
||||
{
|
||||
EditorGUILayout.PropertyField(_propertyAllowRotateAroundUp, ContentAllowRotateAroundUp);
|
||||
EditorGUILayout.PropertyField(_propertyAllowRotateAroundRight, ContentAllowRotateAroundRight);
|
||||
EditorGUILayout.PropertyField(_propertyInvertedLookAxis, ContentInvertedLookAxis);
|
||||
}
|
||||
|
||||
EditorGUILayout.PropertyField(_propertyOnlyOnce, ContentOnlyOnce);
|
||||
|
||||
serializedObject.ApplyModifiedProperties();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Private Types & Data
|
||||
|
||||
private GUIContent ContentMode { get; } = new GUIContent("Look-at Mode", "Selects which look-at mode to use");
|
||||
private GUIContent ContentTarget { get; } = new GUIContent("Target", "Selects the object the object will look at");
|
||||
private GUIContent ContentLookAxis { get; } = new GUIContent("Look Axis", "Selects the object axis that will point towards the target");
|
||||
private GUIContent ContentUpAxis { get; } = new GUIContent("Up Axis", "Selects the object axis that points \"up\"");
|
||||
private GUIContent ContentMatchDirection { get; } = new GUIContent("Direction To Match", "Selects the direction to match \"up\"");
|
||||
private GUIContent ContentAllowRotateAroundUp { get; } = new GUIContent("Allow Rotation Around \"up\"", "Whether the look-at can rotate the object around the up axis");
|
||||
private GUIContent ContentAllowRotateAroundRight { get; } = new GUIContent("Allow Rotation Around \"right\"", "Whether the look-at can rotate the object around the right axis");
|
||||
private GUIContent ContentInvertedLookAxis { get; } = new GUIContent("Inverted Look", "Whether to invert the look-at");
|
||||
private GUIContent ContentOnlyOnce { get; } = new GUIContent("Only Once", "Whether to execute the look-at only the first frame");
|
||||
|
||||
private SerializedProperty _propertyMode;
|
||||
private SerializedProperty _propertyTarget;
|
||||
private SerializedProperty _propertyLookAxis;
|
||||
private SerializedProperty _propertyUpAxis;
|
||||
private SerializedProperty _propertyMatchDirection;
|
||||
private SerializedProperty _propertyAllowRotateAroundUp;
|
||||
private SerializedProperty _propertyAllowRotateAroundRight;
|
||||
private SerializedProperty _propertyInvertedLookAxis;
|
||||
private SerializedProperty _propertyOnlyOnce;
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
11
Assets/ThirdParty/UltimateXR/Editor/Animation/Transforms/UxrLookAtEditor.cs.meta
vendored
Normal file
11
Assets/ThirdParty/UltimateXR/Editor/Animation/Transforms/UxrLookAtEditor.cs.meta
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a4316bec080e7be4d9111763803595f1
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in New Issue
Block a user