當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。