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,8 @@
fileFormatVersion: 2
guid: fb57a98b7c4419d45943d31b64b932f1
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

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:

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 83430cc573152864a92d67919239dc41
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,34 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class KeyFrame : MonoBehaviour
{
public int index;
public Transform[] points;
public Transform viewPoint;
// Start is called before the first frame update
void Start()
{
//clip.
}
// Update is called once per frame
void Update()
{
}
private void OnDrawGizmos()
{
if(points.Length > 0)
{
for(int i = 0; i < points.Length - 1; ++i)
{
Gizmos.color = Color.red;
Gizmos.DrawLine(points[i].position, points[i + 1].position);
}
}
}
}

View File

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