This commit is contained in:
2025-11-14 18:44:06 +08:00
parent 10156da245
commit 22e867d077
7013 changed files with 2572882 additions and 1804 deletions

View File

@@ -0,0 +1,49 @@
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using UnityEditor;
using UnityEngine;
[CustomEditor(typeof(KeyFrame))]
public class KeyFrameEditor : Editor
{
KeyFrame inst;
private void OnEnable()
{
inst = target as KeyFrame;
}
public override void OnInspectorGUI()
{
base.OnInspectorGUI();
//
if (GUILayout.Button("AddPoint", GUILayout.Height(50)))
{
Transform point = Instantiate(inst.points[inst.points.Length - 1], inst.points[inst.points.Length - 1].position, Quaternion.identity, inst.points[inst.points.Length - 1].parent).transform;
List<Transform> listTemp = inst.points.ToList();
listTemp.Add(point);
inst.points = listTemp.ToArray();
}
GUILayout.Space(10);
if (GUILayout.Button("SetKey", GUILayout.Height(50)))
{
if(inst.index < inst.points.Length - 1)
{
++inst.index;
}
else
{
inst.index = 0;
}
//
inst.viewPoint.position = inst.points[inst.index].position;
Debug.Log("N");
}
}
}

View File

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