改,加,TrackGlobalColorChange

Signed-off-by: TRAfoer <lhf190@outlook.com>
This commit is contained in:
2025-10-01 20:41:06 +08:00
parent 25a458dd8c
commit b29654e423
37 changed files with 630986 additions and 21442 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,140 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &-513390802342029129
MonoBehaviour:
m_ObjectHideFlags: 11
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
m_Name:
m_EditorClassIdentifier:
version: 7
--- !u!21 &2100000
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: OutlineOnly
m_Shader: {fileID: 4800000, guid: 38ac935dd3d70c04c9b8eb4d1b8b034b, type: 3}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords: []
m_InvalidKeywords: []
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _BaseMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _BumpMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _ClipTexture:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailAlbedoMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailMask:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailNormalMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _EmissionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MetallicGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _OcclusionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _ParallaxMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _SpecGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_Lightmaps:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_LightmapsInd:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_ShadowMasks:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _AlphaClip: 0
- _AlphaToMask: 0
- _Blend: 0
- _BlendModePreserveSpecular: 1
- _BumpScale: 1
- _ClearCoatMask: 0
- _ClearCoatSmoothness: 0
- _Cull: 2
- _Cutoff: 0.5
- _DetailAlbedoMapScale: 1
- _DetailNormalMapScale: 1
- _DstBlend: 0
- _DstBlendAlpha: 0
- _EnvironmentReflections: 1
- _GlossMapScale: 0
- _Glossiness: 0
- _GlossyReflections: 0
- _Metallic: 0
- _OcclusionStrength: 1
- _OutlineFactor: 1.05
- _Parallax: 0.005
- _Progress: 0
- _ProgressA: 0
- _QueueOffset: 0
- _ReceiveShadows: 1
- _Smoothness: 0.5
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _SrcBlendAlpha: 1
- _Surface: 0
- _WorkflowMode: 1
- _ZWrite: 1
m_Colors:
- _BaseColor: {r: 1, g: 1, b: 1, a: 1}
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
- _OutlineCol: {r: 0, g: 0, b: 0, a: 1}
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
m_BuildTextureStacks: []

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: fea416d728e272045b75d7ad31dd623f
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:

File diff suppressed because one or more lines are too long

View File

@@ -106,6 +106,8 @@ MonoBehaviour:
type: 3}
inspectorSecondaryWindow: {fileID: 6108546402767822149, guid: 936c6eaae41114513a3b35c89084692f,
type: 3}
outlineShaderMaterial: {fileID: 2100000, guid: fea416d728e272045b75d7ad31dd623f,
type: 2}
dynamicUIContainer: {fileID: 641240999616330488, guid: 6868f1f1eb20a43eea8d90883b83de2c,
type: 3}
dynamicUISubcontainer: {fileID: 5517159431924024882, guid: f3be65e0ba670014d9aadb8a7d5018e6,

View File

@@ -112,6 +112,7 @@ MonoBehaviour:
isSwitchingReturnType: 0
lastReturnType: 0
returnType: 0
linked: 0
--- !u!114 &2679927635074191165
MonoBehaviour:
m_ObjectHideFlags: 0
@@ -154,9 +155,9 @@ RectTransform:
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 3373003148740844145}
- {fileID: 4199589956708916280}
- {fileID: 8575234652331120996}
- {fileID: 3373003148740844145}
m_Father: {fileID: 7110848561363056186}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.14285715, y: 0.5}

File diff suppressed because one or more lines are too long

View File

@@ -617,6 +617,51 @@ namespace Ichni.Editor
pathnode.Refresh();
}
}
public static void FloorAnim()
{
if (inspector.connectedGameElement == null)
{
LogWindow.Log("Please select a Element first!");
return;
}
List<AnimationBase> elements = inspector.connectedGameElement.GetAllGameElementsFromThis().OfType<AnimationBase>().ToList();
// 预先缓存属性信息(如果在循环外部知道具体类型)
var propertiesToCheck = typeof(GameElement).GetProperties()
.Where(p => p.PropertyType == typeof(FlexibleFloat))
.ToArray();
foreach (var element in elements)
{
bool needsRefresh = false;
foreach (var prop in propertiesToCheck)
{
var ff = prop.GetValue(element) as FlexibleFloat;
if (ff?.animations?.Count > 0 && ff.animations[0] != null)
{
var firstAnimation = ff.animations[0];
if (firstAnimation.startTime > 0)
{
ff.animations.Insert(0, new AnimatedFloat(
0,
Math.Min(firstAnimation.startTime, 1),
firstAnimation.startValue,
firstAnimation.startValue,
AnimationCurveType.Linear
));
needsRefresh = true;
Debug.Log($"Added 0 keyframe to {element.elementName}'s {prop.Name}");
}
}
}
if (needsRefresh)
{
element.Refresh();
element.animatedObject?.Refresh(); // 使用空条件运算符
}
}
}
}
}

View File

@@ -0,0 +1,179 @@
using System;
using System.Collections;
using System.Collections.Generic;
using Ichni.Editor;
using Ichni.RhythmGame;
using Ichni.RhythmGame.Beatmap;
using UnityEngine;
namespace Ichni.RhythmGame
{
public class TrackGlobalColorChange : AnimationBase
{
public FlexibleFloat colorR, colorG, colorB, colorA;
public static TrackGlobalColorChange GenerateElement(string elementName, System.Guid id,
List<string> tags, bool isFirstGenerated, GameElement animatedObject,
FlexibleFloat colorR, FlexibleFloat colorG, FlexibleFloat colorB, FlexibleFloat colorA)
{
if (animatedObject is not Track)
{
Debug.LogError("Animated Object is Not Track");
throw new System.ArgumentException("Animated Object is Not Track");
}
TrackGlobalColorChange trackGlobalColorChange = Instantiate(EditorManager.instance.basePrefabs.emptyObject)
.AddComponent<TrackGlobalColorChange>();
trackGlobalColorChange.Initialize(elementName, id, tags, isFirstGenerated, animatedObject);
trackGlobalColorChange.animatedObject = animatedObject;
trackGlobalColorChange.colorR = colorR;
trackGlobalColorChange.colorG = colorG;
trackGlobalColorChange.colorB = colorB;
trackGlobalColorChange.colorA = colorA;
trackGlobalColorChange.animationReturnType = FlexibleReturnType.Before;
//trackGlobalColorChange.timeDurationSubmodule.SetDuration(colorR, colorG, colorB, colorA);
return trackGlobalColorChange;
}
public override void SetDefaultSubmodules()
{
timeDurationSubmodule = new TimeDurationSubmodule(this);
}
protected override void UpdateAnimation(float songTime)
{
colorR.UpdateFlexibleFloat(songTime);
colorG.UpdateFlexibleFloat(songTime);
colorB.UpdateFlexibleFloat(songTime);
colorA.UpdateFlexibleFloat(songTime);
if (colorR.returnType is FlexibleReturnType.MiddleExecuting ||
colorG.returnType is FlexibleReturnType.MiddleExecuting ||
colorB.returnType is FlexibleReturnType.MiddleExecuting ||
colorA.returnType is FlexibleReturnType.MiddleExecuting)
{
animationReturnType = FlexibleReturnType.MiddleExecuting;
Color color = new Color(colorR.value, colorG.value, colorB.value, colorA.value);
((Track)animatedObject).trackRendererSubmodule.meshGenerator.color = color;
}
else if (colorR.isSwitchingReturnType || colorG.isSwitchingReturnType || colorB.isSwitchingReturnType || colorA.isSwitchingReturnType)
{
animationReturnType = FlexibleReturnType.MiddleExecuting;
Color color = new Color(colorR.value, colorG.value, colorB.value, colorA.value);
((Track)animatedObject).trackRendererSubmodule.meshGenerator.color = color;
}
else
{
if (!EditorManager.instance.musicPlayer.isPlaying && animationReturnType != FlexibleReturnType.MiddleInterval)
{
Color color = new Color(colorR.value, colorG.value, colorB.value, colorA.value);
((Track)animatedObject).trackRendererSubmodule.meshGenerator.color = color;
animationReturnType = FlexibleReturnType.After;
}
else
{
animationReturnType = FlexibleReturnType.Before;
}
}
}
public override void ApplyTimeOffset(float offset)
{
base.ApplyTimeOffset(offset);
foreach (var item in colorR.animations) item.ApplyTimeOffset(offset);
foreach (var item in colorG.animations) item.ApplyTimeOffset(offset);
foreach (var item in colorB.animations) item.ApplyTimeOffset(offset);
foreach (var item in colorA.animations) item.ApplyTimeOffset(offset);
}
public override Vector3 getValue(float time)
{
float r = colorR.GetValue(time);
float g = colorG.GetValue(time);
float b = colorB.GetValue(time);
float a = colorA.GetValue(time);
return new Vector3(r, g, b);
}
public override void Refresh()
{
base.Refresh();
if (colorR.animations.Count == 0 && colorG.animations.Count == 0 && colorB.animations.Count == 0 && colorA.animations.Count == 0)
{
((Track)animatedObject).trackRendererSubmodule.meshGenerator.color = Color.white;
}
else
{
UpdateAnimation(EditorManager.instance.songInformation.songTime);
}
}
public override void SetUpInspector()
{
IHaveInspection inspector = EditorManager.instance.uiManager.inspector;
base.SetUpInspector();
var container = inspector.GenerateContainer("Track Global Color Change");
var subcontainer = container.GenerateSubcontainer(3);
var colorRButton = inspector.GenerateButton(this, subcontainer, "Color R", () =>
{
inspector.GenerateCompositeParameterWindow(this, "Color R", nameof(colorR)).SetAsFlexibleFloat();
});
var colorGButton = inspector.GenerateButton(this, subcontainer, "Color G", () =>
{
inspector.GenerateCompositeParameterWindow(this, "Color G", nameof(colorG)).SetAsFlexibleFloat();
});
var colorBButton = inspector.GenerateButton(this, subcontainer, "Color B", () =>
{
inspector.GenerateCompositeParameterWindow(this, "Color B", nameof(colorB)).SetAsFlexibleFloat();
});
var colorAButton = inspector.GenerateButton(this, subcontainer, "Color A", () =>
{
inspector.GenerateCompositeParameterWindow(this, "Color A", nameof(colorA)).SetAsFlexibleFloat();
});
var graphicEditor = inspector.GenerateButton(this, subcontainer, "GraphicEditor", () =>
{
inspector.GenerateGraphicalFlexibleFloatWindow(this, "Track Global Color Change",
new FlexibleFloat[] { colorR, colorG, colorB, colorA }, new string[] { "ColorR", "ColorG", "ColorB", "ColorA" });
});
}
public override void SaveBM()
{
matchedBM = new Beatmap.TrackGlobalColorChange_BM(elementName, elementGuid, tags, parentElement.matchedBM as GameElement_BM,
colorR.ConvertToBM(), colorG.ConvertToBM(), colorB.ConvertToBM(), colorA.ConvertToBM());
}
}
}
namespace Ichni.RhythmGame.Beatmap
{
public class TrackGlobalColorChange_BM : AnimationBase_BM
{
public FlexibleFloat_BM colorR, colorG, colorB, colorA;
public TrackGlobalColorChange_BM()
{
}
public TrackGlobalColorChange_BM(string elementName, Guid elementGuid, List<string> tags,
GameElement_BM attachedElement, FlexibleFloat_BM colorR, FlexibleFloat_BM colorG, FlexibleFloat_BM colorB, FlexibleFloat_BM colorA)
: base(elementName, elementGuid, tags, attachedElement)
{
this.colorR = colorR;
this.colorG = colorG;
this.colorB = colorB;
this.colorA = colorA;
}
public override GameElement DuplicateBM(GameElement attached)
{
return TrackGlobalColorChange.GenerateElement(elementName, Guid.NewGuid(), tags, true, attached,
colorR.ConvertToGameType(), colorG.ConvertToGameType(), colorB.ConvertToGameType(), colorA.ConvertToGameType());
}
public override void ExecuteBM()
{
matchedElement = TrackGlobalColorChange.GenerateElement(elementName, elementGuid, tags, false, GetElement(attachedElementGuid),
colorR.ConvertToGameType(), colorG.ConvertToGameType(), colorB.ConvertToGameType(), colorA.ConvertToGameType());
}
}
}

View File

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

View File

@@ -188,6 +188,9 @@ namespace Ichni.RhythmGame
}); //Particle Tracker
StandardInspectionElement.GenerateForTransform(this, generateContainer); //关于有Transform的元素
inspector.GenerateButton(this, particleSubcontainer, "Track Global Color Change",
() => { TrackGlobalColorChange.GenerateElement("New Track Global Color Change", Guid.NewGuid(), new List<string>(), true, this, new FlexibleFloat(), new FlexibleFloat(), new FlexibleFloat(), new FlexibleFloat()); }); //变量容器
// var animationSubcontainer = generateContainer.GenerateSubcontainer(3);
// var displacementButton = inspector.GenerateButton(this, animationSubcontainer, "Displacement", () =>
// {

View File

@@ -136,8 +136,6 @@ public partial class EventPoint : MonoBehaviour
FatherTab.FatherWindow.VisibleArea.SetActive(true);
FatherTab.FatherWindow.animationCurveTypeDropdown.AddOptions(enumNameList);
FatherTab.FatherWindow.animationCurveTypeDropdown.value = (int)animatedFloat.animationCurveType;
// 更新文本
FatherTab.FatherWindow.StartText.text = animatedFloat.startTime.ToString();
FatherTab.FatherWindow.EndText.text = animatedFloat.endTime.ToString();

View File

@@ -43,11 +43,11 @@ public class NotefabContoler : MonoBehaviour
}
public void Update()
{
if (sampleWindow.isExpand && RectTransformUtility.RectangleContainsScreenPoint(this.GetComponent<RectTransform>(), Mouse.current.position.ReadValue()))
if (RectTransformUtility.RectangleContainsScreenPoint(this.GetComponent<RectTransform>(), Mouse.current.position.ReadValue()))
{
if (Mouse.current.leftButton.wasPressedThisFrame)
{
StartCoroutine(Moving());
if (sampleWindow.isExpand) StartCoroutine(Moving());
if (EditorManager.instance.uiManager.inspector.connectedGameElement != noteBase) EditorManager.instance.uiManager.hierarchy.FindTab(noteBase);
}
}

View File

@@ -45,7 +45,7 @@ namespace Ichni.RhythmGame
public GameObject highPassFilterEffect;
[Title("Inspector相关")] public GameObject inspectorSecondaryWindow;
[Title("编辑器描边Material")] public Material outlineShaderMaterial;
[Title("DynamicUI相关-Simple")] public GameObject dynamicUIContainer;
public GameObject dynamicUISubcontainer;
public GameObject inputField;

View File

@@ -100,6 +100,7 @@ namespace Ichni
}
public float CurrentFrameRate;
public TMP_Text FPStext;
public TMP_Text UIText;
private IEnumerator StartFrameRate()
{
int frameCount = 0;
@@ -115,6 +116,7 @@ namespace Ichni
yield return null;
}
}
private void Update()
{
if (isLoaded) projectManager.autoSaveManager.UpdateAutoSave();
@@ -131,7 +133,7 @@ namespace Ichni
{
projectManager.loadManager.LoadExport(projectName);
}
musicPlayer.audioSource.clip = songInformation.song;
beatmapContainer.gameElementList.ForEach(gameElement =>
{

View File

@@ -23,11 +23,11 @@ namespace Ichni.Editor
private List<SelectionConnector> lastHitConnectors = new List<SelectionConnector>();
private int currentSelectIndex = 0;
private Vector2 lastMousePosition;
private bool cachedIsPointerOverUI;
private GameObject cachedHoveredUI;
private int uiCheckFrameInterval = 3; // 每3帧检查一次
private int frameCount;
private int frameCount = 0;
private const int uiCheckFrameInterval = 5; // 每隔多少帧强制检查一次UI
private void Awake()
{
@@ -46,17 +46,9 @@ namespace Ichni.Editor
Vector2 currentMousePosition = Mouse.current.position.ReadValue();
if (currentMousePosition != lastMousePosition || frameCount % uiCheckFrameInterval == 0)
{
isPointerOverUI = IsPointerOverUI(out hoveredUI);
lastMousePosition = currentMousePosition;
cachedIsPointerOverUI = isPointerOverUI;
cachedHoveredUI = hoveredUI;
isPointerOverUI = IsPointerOverUI(out hoveredUI);
}
else
{
isPointerOverUI = cachedIsPointerOverUI;
hoveredUI = cachedHoveredUI;
}
SceneCameraOperation();
MusicPlayerOperation();
TracksOperation();
@@ -314,17 +306,13 @@ namespace Ichni.Editor
public partial class InputListener
{
private TMP_Text UIText => EditorManager.instance.UIText;
public bool IsPointerOverUI(out GameObject hoveredUI)
{
hoveredUI = null;
// 快速检查 - 使用Unity内置方法
if (!EventSystem.current.IsPointerOverGameObject())
return false;
// 详细检查 - 只有当快速检查通过时才执行
if (eventSystem == null || graphicRaycasters.Count == 0)
return false;
if (Mouse.current == null) return false;
pointerEventData = new PointerEventData(eventSystem)
{
@@ -333,21 +321,55 @@ namespace Ichni.Editor
List<RaycastResult> allResults = new List<RaycastResult>();
// 只对最上层的Canvas进行检测
foreach (var raycaster in graphicRaycasters.Where(r => r.gameObject.activeInHierarchy))
// 使用EventSystem的RaycastAll来确保检测所有UI
EventSystem.current.RaycastAll(pointerEventData, allResults);
// 或者手动检测所有GraphicRaycaster
foreach (var raycaster in FindObjectsOfType<GraphicRaycaster>())
{
if (!raycaster.enabled || !raycaster.gameObject.activeInHierarchy)
continue;
List<RaycastResult> results = new List<RaycastResult>();
raycaster.Raycast(pointerEventData, results);
if (results.Count > 0)
{
// 找到最前面的结果后立即返回
results.Sort((a, b) => b.sortingOrder.CompareTo(a.sortingOrder));
hoveredUI = results[0].gameObject;
return true;
}
allResults.AddRange(results);
}
// 移除无效结果
allResults.RemoveAll(r =>
r.gameObject == null ||
!r.gameObject.activeInHierarchy ||
!r.gameObject.GetComponent<RectTransform>());
if (allResults.Count > 0)
{
// 完整排序
allResults.Sort((a, b) =>
{
// 先按sorting layer
int layerCompare = SortingLayer.GetLayerValueFromID(b.sortingLayer)
.CompareTo(SortingLayer.GetLayerValueFromID(a.sortingLayer));
if (layerCompare != 0) return layerCompare;
// 再按sorting order
int orderCompare = b.sortingOrder.CompareTo(a.sortingOrder);
if (orderCompare != 0) return orderCompare;
// 最后按depth
return b.depth.CompareTo(a.depth);
});
hoveredUI = allResults[0].gameObject;
string text = $"UI: {hoveredUI.name}, Layer: {SortingLayer.IDToName(allResults[0].sortingLayer)}, Order: {allResults[0].sortingOrder}";
if (UIText.text != text)
{
UIText.text = text;
}
return true;
}
UIText.text = "No UI";
return false;
}
}

View File

@@ -11,7 +11,7 @@ namespace Ichni.Editor
public class OperationManager
{
public List<GameElement> currentSelectedElements { get; private set; }
public TempOutlineModule TempOutlineModule = new TempOutlineModule();
public CopyPasteDeleteModule CopyPasteDeleteModule;
public FindingModule FindingModule;
@@ -59,7 +59,30 @@ namespace Ichni.Editor
currentSelectedElements.Clear();
}
}
public class TempOutlineModule
{
public List<GameElement> outlinedElements;
public Material outlineMaterial => EditorManager.instance.basePrefabs.outlineShaderMaterial;
public TempOutlineModule()
{
outlinedElements = new List<GameElement>();
}
public void AddOutline(GameElement gameElement)
{
outlinedElements.Add(gameElement);
}
public void RemoveOutline(GameElement gameElement)
{
outlinedElements.Remove(gameElement);
}
public void ClearOutline()
{
outlinedElements.Clear();
}
}
public class FindingModule
{
public GameElement FindGameElementByName(string elementName)

View File

@@ -0,0 +1,56 @@
Shader "Custom/OutlineOnly"
{
Properties
{
_ClipTexture ("Clip", 2D) = "white" {}
_OutlineCol ("Outline Color", Color) = (0,0,0,1)
_OutlineFactor ("Outline Factor", Range(0.0, 1.0)) = 1.05
_Progress("Thick Progress", Range(0,1)) = 0
_ProgressA("Alpha Progress", Range(0,1)) = 0
}
SubShader
{
Tags { "Queue" = "Transparent" "RenderType" = "Opaque" }
Pass
{
Cull Front
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#include "UnityCG.cginc"
fixed4 _OutlineCol;
float _OutlineFactor;
float _Progress;
float _ProgressA;
sampler2D _ClipTexture;
struct v2f
{
float4 pos : SV_POSITION;
float2 uv : TEXCOORD0;
};
v2f vert(appdata_full v)
{
v2f o;
fixed3 outlinePos = v.vertex.xyz * ((_OutlineFactor * _Progress) + 1.0);
o.pos = UnityObjectToClipPos(outlinePos);
o.uv = v.texcoord;
return o;
}
fixed4 frag(v2f i) : SV_Target
{
// 用模型UV采样clip贴图
clip(tex2D(_ClipTexture, i.uv).r - (_ProgressA*1.2));
return _OutlineCol;
}
ENDCG
}
}
}

View File

@@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 38ac935dd3d70c04c9b8eb4d1b8b034b
ShaderImporter:
externalObjects: {}
defaultTextures: []
nonModifiableTextures: []
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

View File

@@ -0,0 +1,127 @@
fileFormatVersion: 2
guid: 903f49d84823baf4ebbc37b32ddd3f4a
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 13
mipmaps:
mipMapMode: 0
enableMipMap: 1
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
flipGreenChannel: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMipmapLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 0
wrapV: 0
wrapW: 0
nPOTScale: 1
lightmap: 0
compressionQuality: 50
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 0
spriteTessellationDetail: -1
textureType: 0
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
swizzle: 50462976
cookieLightType: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Android
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID:
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
nameFileIdTable: {}
mipmapLimitGroupName:
pSDRemoveMatte: 0
userData:
assetBundleName:
assetBundleVariant:

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

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

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: d6c64dfb599c1bb4bb19b2cb7bfe2770
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: dc3ad3b5b147a7440b862064f1eadd82
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 145f48c89952db94e9e3cffbb63836d8
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

File diff suppressed because it is too large Load Diff

View File

@@ -5,7 +5,7 @@
"songName" : "Drowning in a Momentichni Original.wav",
"bpm" : 200,
"delay" : 0,
"offset" : 0,
"offset" : -0.015,
"attachedElementGuid" : {
"value" : "00000000-0000-0000-0000-000000000000"
}

File diff suppressed because it is too large Load Diff

Binary file not shown.

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: aab0a1e1bbcfaa94593d0ecd80273516
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

File diff suppressed because one or more lines are too long