当前位置: 首页>>代码示例>>C#>>正文


C# UnityEditor.EditorCurveBinding类代码示例

本文整理汇总了C#中UnityEditor.EditorCurveBinding的典型用法代码示例。如果您正苦于以下问题:C# EditorCurveBinding类的具体用法?C# EditorCurveBinding怎么用?C# EditorCurveBinding使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


EditorCurveBinding类属于UnityEditor命名空间,在下文中一共展示了EditorCurveBinding类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: KeyIdentifier

 public KeyIdentifier(CurveRenderer _renderer, int _curveId, int _keyIndex, EditorCurveBinding _binding)
 {
     this.renderer = _renderer;
     this.curveId = _curveId;
     this.key = _keyIndex;
     this.binding = _binding;
 }
开发者ID:randomize,项目名称:VimConfig,代码行数:7,代码来源:KeyIdentifier.cs

示例2: PrepareHierarchy

 private static void PrepareHierarchy(EditorCurveBinding curveBinding)
 {
   GameObject orGetGameObject = CurveBindingUtility.CreateOrGetGameObject(curveBinding.path);
   if (!((UnityEngine.Object) orGetGameObject.GetComponent(curveBinding.type) == (UnityEngine.Object) null))
     return;
   orGetGameObject.AddComponent(curveBinding.type);
 }
开发者ID:BlakeTriana,项目名称:unity-decompiled,代码行数:7,代码来源:CurveBindingUtility.cs

示例3: AddAnimatableObjectToHierarchy

 private TreeViewItem AddAnimatableObjectToHierarchy(GameObject root, EditorCurveBinding[] curveBindings, TreeViewItem parentNode, string path)
 {
     TreeViewItem item = new AddCurvesPopupObjectNode(parentNode, path, GetClassName(root, curveBindings[0])) {
         icon = AssetPreview.GetMiniThumbnail(AnimationUtility.GetAnimatedObject(root, curveBindings[0]))
     };
     List<TreeViewItem> visibleItems = new List<TreeViewItem>();
     List<EditorCurveBinding> list2 = new List<EditorCurveBinding>();
     for (int i = 0; i < curveBindings.Length; i++)
     {
         EditorCurveBinding binding = curveBindings[i];
         list2.Add(binding);
         if ((i == (curveBindings.Length - 1)) || (AnimationWindowUtility.GetPropertyGroupName(curveBindings[i + 1].propertyName) != AnimationWindowUtility.GetPropertyGroupName(binding.propertyName)))
         {
             TreeViewItem item2 = this.CreateNode(list2.ToArray(), item);
             if (item2 != null)
             {
                 visibleItems.Add(item2);
             }
             list2.Clear();
         }
     }
     visibleItems.Sort();
     TreeViewUtility.SetChildParentReferences(visibleItems, item);
     return item;
 }
开发者ID:demelev,项目名称:projectHL,代码行数:25,代码来源:AddCurvesPopupHierarchyDataSource.cs

示例4: KeyIdentifier

 public KeyIdentifier(AnimationCurve _curve, int _curveId, int _keyIndex, EditorCurveBinding _binding)
 {
     this.curve = _curve;
     this.curveId = _curveId;
     this.key = _keyIndex;
     this.binding = _binding;
 }
开发者ID:CarlosHBC,项目名称:UnityDecompiled,代码行数:7,代码来源:KeyIdentifier.cs

示例5: GetCurveState

		public static RotationCurveInterpolation.State GetCurveState(AnimationClip clip, EditorCurveBinding[] selection)
		{
			RotationCurveInterpolation.State result;
			result.allAreNonBaked = true;
			result.allAreBaked = false;
			result.allAreRotations = false;
			for (int i = 0; i < selection.Length; i++)
			{
				EditorCurveBinding data = selection[i];
				RotationCurveInterpolation.Mode modeFromCurveData = RotationCurveInterpolation.GetModeFromCurveData(data);
				if (modeFromCurveData == RotationCurveInterpolation.Mode.NonBaked)
				{
					result.allAreNonBaked = false;
				}
				else
				{
					if (modeFromCurveData == RotationCurveInterpolation.Mode.Baked)
					{
						result.allAreBaked = false;
					}
					else
					{
						result.allAreRotations = false;
					}
				}
			}
			return result;
		}
开发者ID:guozanhua,项目名称:UnityDecompiled,代码行数:28,代码来源:RotationCurveInterpolation.cs

示例6: GetCurveState

        public static State GetCurveState(AnimationClip clip, EditorCurveBinding[] selection)
        {
            State state;
            state.allAreNonBaked = true;
            state.allAreBaked = false;
            state.allAreRotations = false;
            foreach (EditorCurveBinding binding in selection)
            {
                switch (GetModeFromCurveData(binding))
                {
                    case Mode.NonBaked:
                        state.allAreNonBaked = false;
                        break;

                    case Mode.Baked:
                        state.allAreBaked = false;
                        break;

                    default:
                        state.allAreRotations = false;
                        break;
                }
            }
            return state;
        }
开发者ID:randomize,项目名称:VimConfig,代码行数:25,代码来源:RotationCurveInterpolation.cs

示例7: GetEditorCurveValueType

 public static System.Type GetEditorCurveValueType(GameObject rootGameObject, EditorCurveBinding curveBinding)
 {
     if (rootGameObject != null)
     {
         return AnimationUtility.GetEditorCurveValueType(rootGameObject, curveBinding);
     }
     return GetEditorCurveValueType(curveBinding);
 }
开发者ID:demelev,项目名称:projectHL,代码行数:8,代码来源:CurveBindingUtility.cs

示例8: GetCurrentValue

 public static object GetCurrentValue(GameObject rootGameObject, EditorCurveBinding curveBinding)
 {
     if (rootGameObject != null)
     {
         return AnimationWindowUtility.GetCurrentValue(rootGameObject, curveBinding);
     }
     return GetCurrentValue(curveBinding);
 }
开发者ID:demelev,项目名称:projectHL,代码行数:8,代码来源:CurveBindingUtility.cs

示例9: CreateDefaultCurves

 public static void CreateDefaultCurves(AnimationWindowState state, EditorCurveBinding[] properties)
 {
   AnimationClip activeAnimationClip = state.activeAnimationClip;
   GameObject activeRootGameObject = state.activeRootGameObject;
   properties = RotationCurveInterpolation.ConvertRotationPropertiesToDefaultInterpolation(state.activeAnimationClip, properties);
   foreach (EditorCurveBinding property in properties)
     state.SaveCurve(AnimationWindowUtility.CreateDefaultCurve(activeAnimationClip, activeRootGameObject, property));
 }
开发者ID:BlakeTriana,项目名称:unity-decompiled,代码行数:8,代码来源:AnimationWindowUtility.cs

示例10: SetEditorCurve

		public static void SetEditorCurve(AnimationClip clip, EditorCurveBinding binding, AnimationCurve curve)
		{
			AnimationUtility.Internal_SetEditorCurve(clip, binding, curve);
			if (AnimationUtility.onCurveWasModified != null)
			{
				AnimationUtility.onCurveWasModified(clip, binding, (curve == null) ? AnimationUtility.CurveModifiedType.CurveDeleted : AnimationUtility.CurveModifiedType.CurveModified);
			}
		}
开发者ID:guozanhua,项目名称:UnityDecompiled,代码行数:8,代码来源:AnimationUtility.cs

示例11: SetObjectReferenceCurve

		public static void SetObjectReferenceCurve(AnimationClip clip, EditorCurveBinding binding, ObjectReferenceKeyframe[] keyframes)
		{
			AnimationUtility.Internal_SetObjectReferenceCurve(clip, binding, keyframes);
			if (AnimationUtility.onCurveWasModified != null)
			{
				AnimationUtility.onCurveWasModified(clip, binding, (keyframes == null) ? AnimationUtility.CurveModifiedType.CurveDeleted : AnimationUtility.CurveModifiedType.CurveModified);
			}
		}
开发者ID:guozanhua,项目名称:UnityDecompiled,代码行数:8,代码来源:AnimationUtility.cs

示例12: GetCurveGroupID

 public static int GetCurveGroupID(AnimationClip clip, EditorCurveBinding curveData)
 {
   if (curveData.type != typeof (Transform))
     return -1;
   int num = !((UnityEngine.Object) clip == (UnityEngine.Object) null) ? clip.GetInstanceID() : 0;
   string str = curveData.propertyName.Substring(0, curveData.propertyName.Length - 1);
   return num * 19603 ^ curveData.path.GetHashCode() * 729 ^ curveData.type.GetHashCode() * 27 ^ str.GetHashCode();
 }
开发者ID:BlakeTriana,项目名称:unity-decompiled,代码行数:8,代码来源:CurveUtility.cs

示例13: AddRotationPropertyModification

 private static void AddRotationPropertyModification(IAnimationRecordingState state, EditorCurveBinding baseBinding, UndoPropertyModification modification)
 {
     if (modification.previousValue != null)
     {
         EditorCurveBinding binding = baseBinding;
         binding.propertyName = modification.previousValue.propertyPath;
         AnimationMode.AddPropertyModification(binding, modification.previousValue, modification.keepPrefabOverride);
     }
 }
开发者ID:CarlosHBC,项目名称:UnityDecompiled,代码行数:9,代码来源:AnimationRecording.cs

示例14: GenerateTransformCurveBindingArray

 private static EditorCurveBinding[] GenerateTransformCurveBindingArray(string path, string property, System.Type type, int count)
 {
     EditorCurveBinding[] bindingArray = new EditorCurveBinding[count];
     for (int i = 0; i < count; i++)
     {
         bindingArray[i] = EditorCurveBinding.FloatCurve(path, type, property + kPostFix[i]);
     }
     return bindingArray;
 }
开发者ID:randomize,项目名称:VimConfig,代码行数:9,代码来源:RotationCurveInterpolation.cs

示例15: AnimationClipCurveData

 public AnimationClipCurveData(EditorCurveBinding binding)
 {
   this.path = binding.path;
   this.type = binding.type;
   this.propertyName = binding.propertyName;
   this.curve = (AnimationCurve) null;
   this.classID = binding.m_ClassID;
   this.scriptInstanceID = binding.m_ScriptInstanceID;
 }
开发者ID:BlakeTriana,项目名称:unity-decompiled,代码行数:9,代码来源:AnimationClipCurveData.cs


注:本文中的UnityEditor.EditorCurveBinding类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。