diff --git a/.idea/.idea.IchniCreatorStudio/.idea/vcs.xml b/.idea/.idea.IchniCreatorStudio/.idea/vcs.xml
index 35eb1ddf..5c7b38d8 100644
--- a/.idea/.idea.IchniCreatorStudio/.idea/vcs.xml
+++ b/.idea/.idea.IchniCreatorStudio/.idea/vcs.xml
@@ -2,5 +2,8 @@
+
+
+
\ No newline at end of file
diff --git a/Assets/Prefabs/BasePrefabsCollection.asset b/Assets/Prefabs/BasePrefabsCollection.asset
index df819377..9bc557fe 100644
--- a/Assets/Prefabs/BasePrefabsCollection.asset
+++ b/Assets/Prefabs/BasePrefabsCollection.asset
@@ -69,6 +69,8 @@ MonoBehaviour:
type: 2}
particleTracker: {fileID: 7924065371675278968, guid: 0b3b8df64bc2b4a4fabd753f7e9189e7,
type: 3}
+ objectTracker: {fileID: 4179914404395760092, guid: f0debcd3b25df1546b976a04672d2e6f,
+ type: 3}
sampler: {fileID: 8976586735561836907, guid: 6191c60211a05c04ea9265f89896f4d0, type: 3}
trail: {fileID: 4801226466239889825, guid: a21d9cdd0e3454527bec5f2b0e9a9cae, type: 3}
defaultTrailMaterial: {fileID: 2100000, guid: 8af6dd7f0725540388b84a4697118bb9,
diff --git a/Assets/Prefabs/GameElements/Track/ObjectTracker.prefab b/Assets/Prefabs/GameElements/Track/ObjectTracker.prefab
new file mode 100644
index 00000000..85e219f0
--- /dev/null
+++ b/Assets/Prefabs/GameElements/Track/ObjectTracker.prefab
@@ -0,0 +1,184 @@
+%YAML 1.1
+%TAG !u! tag:unity3d.com,2011:
+--- !u!1 &4179914404395760092
+GameObject:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ serializedVersion: 6
+ m_Component:
+ - component: {fileID: 4793278966605267409}
+ - component: {fileID: 3144517396823347096}
+ - component: {fileID: 1220781714347628550}
+ m_Layer: 0
+ m_Name: ObjectTracker
+ m_TagString: Untagged
+ m_Icon: {fileID: 0}
+ m_NavMeshLayer: 0
+ m_StaticEditorFlags: 0
+ m_IsActive: 1
+--- !u!4 &4793278966605267409
+Transform:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 4179914404395760092}
+ serializedVersion: 2
+ m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
+ m_LocalPosition: {x: 0, y: 0, z: 0}
+ m_LocalScale: {x: 1, y: 1, z: 1}
+ m_ConstrainProportionsScale: 0
+ m_Children: []
+ m_Father: {fileID: 0}
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
+--- !u!114 &3144517396823347096
+MonoBehaviour:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 4179914404395760092}
+ m_Enabled: 1
+ m_EditorHideFlags: 0
+ m_Script: {fileID: 11500000, guid: acb0592a986cebb4287d41702ab6ea22, type: 3}
+ m_Name:
+ m_EditorClassIdentifier:
+ updateMethod: 0
+ _spline: {fileID: 0}
+ _autoUpdate: 1
+ _rotationModifier:
+ blend: 1
+ useClippedPercent: 0
+ keys: []
+ _offsetModifier:
+ blend: 1
+ useClippedPercent: 0
+ keys: []
+ _colorModifier:
+ blend: 1
+ useClippedPercent: 0
+ keys: []
+ _sizeModifier:
+ blend: 1
+ useClippedPercent: 0
+ keys: []
+ _clipFromSample:
+ position: {x: 0, y: 0, z: 0}
+ up: {x: 0, y: 0, z: 0}
+ forward: {x: 0, y: 0, z: 0}
+ color: {r: 0, g: 0, b: 0, a: 0}
+ size: 0
+ percent: 0
+ _clipToSample:
+ position: {x: 0, y: 0, z: 0}
+ up: {x: 0, y: 0, z: 0}
+ forward: {x: 0, y: 0, z: 0}
+ color: {r: 0, g: 0, b: 0, a: 0}
+ size: 0
+ percent: 0
+ _loopSamples: 0
+ _clipFrom: 0
+ _clipTo: 1
+ animClipFrom: 0
+ animClipTo: 1
+ multithreaded: 0
+ buildOnAwake: 1
+ buildOnEnable: 0
+ objects: []
+ _evaluateOffset: 0
+ _spawnMethod: 0
+ _spawnCount: 0
+ _retainPrefabInstancesInEditor: 1
+ _objectPositioning: 0
+ _iteration: 0
+ _randomSeed: 1
+ _minOffset: {x: 0, y: 0, z: 0}
+ _maxOffset: {x: 0, y: 0, z: 0}
+ _offsetUseWorldCoords: 0
+ _minRotation: {x: 0, y: 0, z: 0}
+ _maxRotation: {x: 0, y: 0, z: 0}
+ _uniformScaleLerp: 1
+ _minScaleMultiplier: {x: 1, y: 1, z: 1}
+ _maxScaleMultiplier: {x: 1, y: 1, z: 1}
+ _shellOffset: 0
+ _applyRotation: 0
+ _rotateByOffset: 0
+ _applyScale: 0
+ _objectMethod: 0
+ delayedSpawn: 0
+ spawnDelay: 0.1
+ lastChildCount: 0
+ lastPointCount: 0
+ spawned: []
+ _useCustomObjectDistance: 0
+ _minObjectDistance: 0
+ _maxObjectDistance: 0
+ _customOffsetRule: {fileID: 0}
+ _customRotationRule: {fileID: 0}
+ _customScaleRule: {fileID: 0}
+--- !u!114 &1220781714347628550
+MonoBehaviour:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 4179914404395760092}
+ m_Enabled: 1
+ m_EditorHideFlags: 0
+ m_Script: {fileID: 11500000, guid: 8dd005989b661ca4484a9998fa134782, type: 3}
+ m_Name:
+ m_EditorClassIdentifier:
+ serializationData:
+ SerializedFormat: 2
+ SerializedBytes:
+ ReferencedUnityObjects: []
+ SerializedBytesString:
+ Prefab: {fileID: 0}
+ PrefabModificationsReferencedUnityObjects: []
+ PrefabModifications: []
+ SerializationNodes:
+ - Name: elementGuid
+ Entry: 2
+ Data: 00000000000000000000000000000000
+ - Name: submoduleList
+ Entry: 7
+ Data: 0|System.Collections.Generic.List`1[[Ichni.RhythmGame.SubmoduleBase,
+ Assembly-CSharp]], mscorlib
+ - Name:
+ Entry: 12
+ Data: 0
+ - Name:
+ Entry: 13
+ Data:
+ - Name:
+ Entry: 8
+ Data:
+ - Name: enableTypes
+ Entry: 6
+ Data:
+ elementName:
+ tags: []
+ parentElement: {fileID: 0}
+ connectedTab: {fileID: 0}
+ childElementList: []
+ track: {fileID: 0}
+ objectController: {fileID: 3144517396823347096}
+ objectPrefab: {fileID: 0}
+ themeBundleName:
+ objectName:
+ playTime: 0
+ stopTime: 0
+ spawnCount: 0
+ positionOffsetMin: {x: 0, y: 0}
+ positionOffsetMax: {x: 0, y: 0}
+ customPositionRuleName:
+ applyRotationOffset: 0
+ rotationOffsetMin: {x: 0, y: 0, z: 0}
+ rotationOffsetMax: {x: 0, y: 0, z: 0}
+ customRotationRuleName:
+ applyScaleOffset: 0
+ scaleOffsetMin: {x: 1, y: 1, z: 1}
+ scaleOffsetMax: {x: 1, y: 1, z: 1}
+ customScaleRuleName:
diff --git a/Assets/Prefabs/GameElements/Track/ObjectTracker.prefab.meta b/Assets/Prefabs/GameElements/Track/ObjectTracker.prefab.meta
new file mode 100644
index 00000000..b1315132
--- /dev/null
+++ b/Assets/Prefabs/GameElements/Track/ObjectTracker.prefab.meta
@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: f0debcd3b25df1546b976a04672d2e6f
+PrefabImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Scenes/StartMenu.unity b/Assets/Scenes/StartMenu.unity
index 411ee812..0db6903f 100644
--- a/Assets/Scenes/StartMenu.unity
+++ b/Assets/Scenes/StartMenu.unity
@@ -5685,6 +5685,7 @@ MonoBehaviour:
Data:
isLoadedProject: 0
loadedProjectName:
+ isRecovery: 0
--- !u!4 &1050672441
Transform:
m_ObjectHideFlags: 0
@@ -17607,7 +17608,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
- m_AnchoredPosition: {x: 20, y: -0.00015258789}
+ m_AnchoredPosition: {x: 20, y: -0.00012207031}
m_SizeDelta: {x: 40, y: 0}
m_Pivot: {x: 0.5, y: 1}
--- !u!1 &4337614255290428457
diff --git a/Assets/Scripts/EditorGame/GameElements/Track/Track.cs b/Assets/Scripts/EditorGame/GameElements/Track/Track.cs
index 6d20fc86..71be8d66 100644
--- a/Assets/Scripts/EditorGame/GameElements/Track/Track.cs
+++ b/Assets/Scripts/EditorGame/GameElements/Track/Track.cs
@@ -187,6 +187,15 @@ namespace Ichni.RhythmGame
string.Empty, string.Empty, false, 0, 1, false, 10, Vector3.right, 10, 5, true, Vector3.zero);
}); //Particle Tracker
+ var objectTrackerButton = inspector.GenerateButton(this, particleSubcontainer, "Object Tracker",
+ () =>
+ {
+ ObjectTracker.GenerateElement("New Object Tracker", Guid.NewGuid(), new List(), true, this,
+ string.Empty, string.Empty, 10, Vector2.zero, Vector2.zero, string.Empty,
+ false, Vector3.zero,Vector3.zero, string.Empty,
+ false, Vector3.zero, Vector3.zero, string.Empty);
+ }); //Object 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(), true, this, new FlexibleFloat(true), new FlexibleFloat(true), new FlexibleFloat(true), new FlexibleFloat(true)); }); //变量容器
diff --git a/Assets/Scripts/EditorGame/GameElements/Track/ParticleTracker.meta b/Assets/Scripts/EditorGame/GameElements/Track/Trackers.meta
similarity index 100%
rename from Assets/Scripts/EditorGame/GameElements/Track/ParticleTracker.meta
rename to Assets/Scripts/EditorGame/GameElements/Track/Trackers.meta
diff --git a/Assets/Scripts/EditorGame/GameElements/Track/Trackers/ObjectTracker.cs b/Assets/Scripts/EditorGame/GameElements/Track/Trackers/ObjectTracker.cs
new file mode 100644
index 00000000..d4e7b073
--- /dev/null
+++ b/Assets/Scripts/EditorGame/GameElements/Track/Trackers/ObjectTracker.cs
@@ -0,0 +1,284 @@
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using Dreamteck.Splines;
+using Ichni.Editor;
+using Ichni.RhythmGame.Beatmap;
+using UnityEngine;
+
+namespace Ichni.RhythmGame
+{
+ public partial class ObjectTracker : GameElement
+ {
+ public Track track;
+ public ObjectController objectController;
+ public GameObject objectPrefab;
+ private List themeBundleList;
+ private List objectNameList;
+ public string themeBundleName;
+ public string objectName;
+
+ public float playTime;
+ public float stopTime;
+
+ public int spawnCount;
+ public Vector2 positionOffsetMin = Vector2.zero;
+ public Vector2 positionOffsetMax = Vector2.zero;
+ public string customPositionRuleName;
+
+ public bool applyRotationOffset = false;
+ public Vector3 rotationOffsetMin = Vector3.zero;
+ public Vector3 rotationOffsetMax = Vector3.zero;
+ public string customRotationRuleName;
+
+ public bool applyScaleOffset = false;
+ public Vector3 scaleOffsetMin = Vector3.one;
+ public Vector3 scaleOffsetMax = Vector3.one;
+ public string customScaleRuleName;
+
+ public static ObjectTracker GenerateElement(string elementName, Guid id, List tags,
+ bool isFirstGenerated, Track track, string themeBundleName, string objectName, int spawnCount,
+ Vector2 positionOffsetMin, Vector2 positionOffsetMax, string customPositionRuleName,
+ bool applyRotationOffset, Vector3 rotationOffsetMin, Vector3 rotationOffsetMax, string customRotationRuleName,
+ bool applyScaleOffset, Vector3 scaleOffsetMin, Vector3 scaleOffsetMax, string customScaleRuleName)
+ {
+ ObjectTracker objectTracker = Instantiate(EditorManager.instance.basePrefabs.objectTracker, track.transform).GetComponent();
+ objectTracker.objectPrefab = ThemeBundleManager.instance.GetObject(themeBundleName, objectName);
+
+ objectTracker.objectController.objects = new[] { objectTracker.objectPrefab };
+ objectTracker.Initialize(elementName, id, tags, isFirstGenerated, track);
+ objectTracker.track = track;
+ objectTracker.objectController.spline = track.trackPathSubmodule.path;
+ objectTracker.themeBundleList = ThemeBundleManager.instance.loadedThemeBundleList.ConvertAll(x => x.themeBundleName);
+ objectTracker.objectNameList = new List();
+ objectTracker.themeBundleName = themeBundleName;
+ objectTracker.objectName = objectName;
+ objectTracker.SetSpawnSettings(spawnCount,
+ positionOffsetMin, positionOffsetMax, customPositionRuleName,
+ applyRotationOffset, rotationOffsetMin, rotationOffsetMax, customRotationRuleName,
+ applyScaleOffset, scaleOffsetMin, scaleOffsetMax, customScaleRuleName);
+ return objectTracker;
+ }
+
+ private void Update()
+ {
+ float songTime = EditorManager.instance.songInformation.songTime;
+ if (playTime > songTime || stopTime < songTime)
+ {
+ if (objectController.enabled)
+ {
+ objectController.enabled = false;
+ }
+ }
+ else
+ {
+ if (!objectController.enabled)
+ {
+ objectController.enabled = true;
+ objectController.Spawn();
+ }
+ }
+ }
+
+ public override void SetUpInspector()
+ {
+ base.SetUpInspector();
+
+ IHaveInspection inspector = EditorManager.instance.uiManager.inspector;
+ Inspector inspectorMain = EditorManager.instance.uiManager.inspector;
+ var container = inspector.GenerateContainer("Object Tracker");
+ var generate = container.GenerateSubcontainer(3);
+ var themeBundleDropdown =
+ inspector.GenerateDropdown(this, generate, "Theme Bundle", themeBundleList, nameof(themeBundleName))
+ .AddListenerFunction(() => inspectorMain.SetInspector(this));
+ if (themeBundleName != String.Empty && ThemeBundleManager.instance.TryGetThemeBundle(themeBundleName, out ThemeBundle themeBundle))
+ {
+ objectNameList = themeBundle.assetList_GameObject.ConvertAll(x => x.name);
+ var objectNameDropdown =
+ inspector.GenerateDropdown(this, generate, "Object Name", objectNameList, nameof(objectName))
+ .AddListenerFunction(() => inspectorMain.SetInspector(this));
+ }
+ else
+ {
+ var objectNameDropdown =
+ inspector.GenerateDropdown(this, generate, "Object Name", new List(), nameof(objectName));
+ objectNameDropdown.dropdown.interactable = false;
+ } // 如果没有选择主题包,则物体名称下拉框不可用
+
+ var setButton = inspector.GenerateButton(this, generate, "Generate", () =>
+ {
+ this.objectPrefab = ThemeBundleManager.instance.GetObject(themeBundleName, objectName);
+ this.objectController.objects = new[] { this.objectPrefab };
+ this.objectController.Spawn();
+ });
+
+ if (themeBundleName == String.Empty || objectName == String.Empty)
+ {
+ setButton.button.interactable = false;
+ }
+
+ var spawnSettings = container.GenerateSubcontainer(3);
+ inspector.GenerateInputField(this, spawnSettings, "Spawn Count", nameof(spawnCount))
+ .AddListenerFunction(()=> objectController.spawnCount = spawnCount);
+ inspector.GenerateInputField(this, spawnSettings, "Play Time", nameof(playTime));
+ inspector.GenerateInputField(this, spawnSettings, "Stop Time", nameof(stopTime));
+ var posSettings = container.GenerateSubcontainer(1);
+ inspector.GenerateVector2InputField(this, posSettings, "Position Offset Min", nameof(positionOffsetMin))
+ .AddListenerFunction(()=> objectController.minOffset = positionOffsetMin);
+ inspector.GenerateVector2InputField(this, posSettings, "Position Offset Max", nameof(positionOffsetMax))
+ .AddListenerFunction(()=> objectController.maxOffset = positionOffsetMax);
+ //inspector.GenerateInputField(this, posSettings, "Custom Position Rule Name", nameof(customPositionRuleName));
+ var rotSettings = container.GenerateSubcontainer(1);
+ inspector.GenerateToggle(this, rotSettings, "Apply Rotation Offset", nameof(applyRotationOffset))
+ .AddListenerFunction(()=> objectController.applyRotation = applyRotationOffset);
+ inspector.GenerateVector3InputField(this, rotSettings, "Rotation Offset Min", nameof(rotationOffsetMin))
+ .AddListenerFunction(()=> objectController.minRotation = rotationOffsetMin);
+ inspector.GenerateVector3InputField(this, rotSettings, "Rotation Offset Max", nameof(rotationOffsetMax))
+ .AddListenerFunction(()=> objectController.maxRotation = rotationOffsetMax);
+ //inspector.GenerateInputField(this, rotSettings, "Custom Rotation Rule Name", nameof(customRotationRuleName));
+ var scaleSettings = container.GenerateSubcontainer(1);
+ inspector.GenerateToggle(this, scaleSettings, "Apply Scale Offset", nameof(applyScaleOffset))
+ .AddListenerFunction(()=> objectController.applyScale = applyScaleOffset);
+ inspector.GenerateVector3InputField(this, scaleSettings, "Scale Offset Min", nameof(scaleOffsetMin))
+ .AddListenerFunction(()=> objectController.minScaleMultiplier = scaleOffsetMin);
+ inspector.GenerateVector3InputField(this, scaleSettings, "Scale Offset Max", nameof(scaleOffsetMax))
+ .AddListenerFunction(()=> objectController.maxScaleMultiplier = scaleOffsetMax);
+ //inspector.GenerateInputField(this, scaleSettings, "Custom Scale Rule Name", nameof(customScaleRuleName));
+ }
+
+ public override void SaveBM()
+ {
+ matchedBM = new Beatmap.ObjectTracker_BM(elementName, elementGuid, tags,
+ parentElement.matchedBM as GameElement_BM,
+ themeBundleName, objectName,
+ playTime, stopTime,
+ spawnCount,
+ positionOffsetMin, positionOffsetMax, customPositionRuleName,
+ applyRotationOffset, rotationOffsetMin, rotationOffsetMax, customRotationRuleName,
+ applyScaleOffset, scaleOffsetMin, scaleOffsetMax, customScaleRuleName);
+ }
+ }
+
+ public partial class ObjectTracker
+ {
+ public void SetSpawnSettings(int spawnCount,
+ Vector2 positionOffsetMin, Vector2 positionOffsetMax, string customPositionRuleName,
+ bool applyRotationOffset, Vector3 rotationOffsetMin, Vector3 rotationOffsetMax, string customRotationRuleName,
+ bool applyScaleOffset, Vector3 scaleOffsetMin, Vector3 scaleOffsetMax, string customScaleRuleName)
+ {
+ this.spawnCount = spawnCount;
+ this.positionOffsetMin = positionOffsetMin;
+ this.positionOffsetMax = positionOffsetMax;
+ this.customPositionRuleName = customPositionRuleName;
+ this.applyRotationOffset = applyRotationOffset;
+ this.rotationOffsetMin = rotationOffsetMin;
+ this.rotationOffsetMax = rotationOffsetMax;
+ this.customRotationRuleName = customRotationRuleName;
+ this.applyScaleOffset = applyScaleOffset;
+ this.scaleOffsetMin = scaleOffsetMin;
+ this.scaleOffsetMax = scaleOffsetMax;
+ this.customScaleRuleName = customScaleRuleName;
+
+ objectController.spawnCount = spawnCount;
+ objectController.minOffset = positionOffsetMin;
+ objectController.maxOffset = positionOffsetMax;
+
+ objectController.applyRotation = applyRotationOffset;
+ objectController.minRotation = rotationOffsetMin;
+ objectController.maxRotation = rotationOffsetMax;
+
+ objectController.applyScale = applyScaleOffset;
+ objectController.minScaleMultiplier = scaleOffsetMin;
+ objectController.maxScaleMultiplier = scaleOffsetMax;
+
+ objectController.Spawn();
+ }
+ }
+
+ namespace Beatmap
+ {
+ public class ObjectTracker_BM : GameElement_BM
+ {
+ public string themeBundleName;
+ public string objectName;
+
+ public float playTime;
+ public float stopTime;
+
+ public int spawnCount;
+ public Vector2 positionOffsetMin;
+ public Vector2 positionOffsetMax;
+ public string customPositionRuleName;
+
+ public bool applyRotationOffset;
+ public Vector3 rotationOffsetMin;
+ public Vector3 rotationOffsetMax;
+ public string customRotationRuleName;
+
+ public bool applyScaleOffset;
+ public Vector3 scaleOffsetMin;
+ public Vector3 scaleOffsetMax;
+ public string customScaleRuleName;
+
+ public ObjectTracker_BM()
+ {
+
+ }
+
+ public ObjectTracker_BM(string elementName, Guid elementGuid, List tags, GameElement_BM attachedElement,
+ string themeBundleName, string objectName,
+ float playTime, float stopTime,
+ int spawnCount,
+ Vector2 positionOffsetMin, Vector2 positionOffsetMax, string customPositionRuleName,
+ bool applyRotationOffset, Vector3 rotationOffsetMin, Vector3 rotationOffsetMax, string customRotationRuleName,
+ bool applyScaleOffset, Vector3 scaleOffsetMin, Vector3 scaleOffsetMax, string customScaleRuleName)
+ : base(elementName, elementGuid, tags, attachedElement)
+ {
+ this.themeBundleName = themeBundleName;
+ this.objectName = objectName;
+
+ this.playTime = playTime;
+ this.stopTime = stopTime;
+
+ this.spawnCount = spawnCount;
+ this.positionOffsetMin = positionOffsetMin;
+ this.positionOffsetMax = positionOffsetMax;
+ this.customPositionRuleName = customPositionRuleName;
+
+ this.applyRotationOffset = applyRotationOffset;
+ this.rotationOffsetMin = rotationOffsetMin;
+ this.rotationOffsetMax = rotationOffsetMax;
+ this.customRotationRuleName = customRotationRuleName;
+
+ this.applyScaleOffset = applyScaleOffset;
+ this.scaleOffsetMin = scaleOffsetMin;
+ this.scaleOffsetMax = scaleOffsetMax;
+ this.customScaleRuleName = customScaleRuleName;
+ }
+
+ public override void ExecuteBM()
+ {
+ matchedElement = ObjectTracker.GenerateElement(
+ elementName, elementGuid, tags, false,
+ GetElement(attachedElementGuid) as Track,
+ themeBundleName, objectName,
+ spawnCount,
+ positionOffsetMin, positionOffsetMax, customPositionRuleName,
+ applyRotationOffset, rotationOffsetMin, rotationOffsetMax, customRotationRuleName,
+ applyScaleOffset, scaleOffsetMin, scaleOffsetMax, customScaleRuleName);
+ }
+
+ public override GameElement DuplicateBM(GameElement attached)
+ {
+ return ObjectTracker.GenerateElement(
+ elementName, Guid.NewGuid(), new List(tags), false,
+ attached as Track,
+ themeBundleName, objectName,
+ spawnCount,
+ positionOffsetMin, positionOffsetMax, customPositionRuleName,
+ applyRotationOffset, rotationOffsetMin, rotationOffsetMax, customRotationRuleName,
+ applyScaleOffset, scaleOffsetMin, scaleOffsetMax, customScaleRuleName);
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/Assets/Scripts/EditorGame/GameElements/Track/Trackers/ObjectTracker.cs.meta b/Assets/Scripts/EditorGame/GameElements/Track/Trackers/ObjectTracker.cs.meta
new file mode 100644
index 00000000..3d57b8f8
--- /dev/null
+++ b/Assets/Scripts/EditorGame/GameElements/Track/Trackers/ObjectTracker.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 8dd005989b661ca4484a9998fa134782
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Scripts/EditorGame/GameElements/Track/ParticleTracker/ParticleTracker.cs b/Assets/Scripts/EditorGame/GameElements/Track/Trackers/ParticleTracker.cs
similarity index 100%
rename from Assets/Scripts/EditorGame/GameElements/Track/ParticleTracker/ParticleTracker.cs
rename to Assets/Scripts/EditorGame/GameElements/Track/Trackers/ParticleTracker.cs
diff --git a/Assets/Scripts/EditorGame/GameElements/Track/ParticleTracker/ParticleTracker.cs.meta b/Assets/Scripts/EditorGame/GameElements/Track/Trackers/ParticleTracker.cs.meta
similarity index 100%
rename from Assets/Scripts/EditorGame/GameElements/Track/ParticleTracker/ParticleTracker.cs.meta
rename to Assets/Scripts/EditorGame/GameElements/Track/Trackers/ParticleTracker.cs.meta
diff --git a/Assets/Scripts/Manager/BasePrefabsCollection.cs b/Assets/Scripts/Manager/BasePrefabsCollection.cs
index 6778d911..9af490db 100644
--- a/Assets/Scripts/Manager/BasePrefabsCollection.cs
+++ b/Assets/Scripts/Manager/BasePrefabsCollection.cs
@@ -20,6 +20,7 @@ namespace Ichni.RhythmGame
public GameObject pathNode;
public Material defaultTrackMaterial;
public GameObject particleTracker;
+ public GameObject objectTracker;
public GameObject sampler;
[Title("Trail相关")] public GameObject trail;
diff --git a/Assets/StreamingAssets/Projects/chaoszone/Beatmap.json b/Assets/StreamingAssets/Projects/chaoszone/Beatmap.json
index 084a9305..7fe27f27 100644
--- a/Assets/StreamingAssets/Projects/chaoszone/Beatmap.json
+++ b/Assets/StreamingAssets/Projects/chaoszone/Beatmap.json
@@ -64,7 +64,7 @@
]
},
"trackPercent" : {
- "value" : 0,
+ "value" : 0.077866666,
"currentAnimationIndex" : 0,
"animations" : [
{
@@ -61198,6 +61198,72 @@
"attachedElementGuid" : {
"value" : "edeb96f4-7a07-451b-b26e-5a1c8419ad00"
}
+ },{
+ "__type" : "Ichni.RhythmGame.Beatmap.ObjectTracker_BM,Assembly-CSharp",
+ "themeBundleName" : "departure_to_multiverse",
+ "objectName" : "Constellation",
+ "playTime" : 0,
+ "stopTime" : 5,
+ "spawnCount" : 10,
+ "positionOffsetMin" : {
+ "x" : -10,
+ "y" : 0
+ },
+ "positionOffsetMax" : {
+ "x" : 10,
+ "y" : 10
+ },
+ "customPositionRuleName" : "",
+ "applyRotationOffset" : false,
+ "rotationOffsetMin" : {
+ "x" : 0,
+ "y" : 0,
+ "z" : 0
+ },
+ "rotationOffsetMax" : {
+ "x" : 0,
+ "y" : 0,
+ "z" : 0
+ },
+ "customRotationRuleName" : "",
+ "applyScaleOffset" : false,
+ "scaleOffsetMin" : {
+ "x" : 0,
+ "y" : 0,
+ "z" : 0
+ },
+ "scaleOffsetMax" : {
+ "x" : 0,
+ "y" : 0,
+ "z" : 0
+ },
+ "customScaleRuleName" : "",
+ "elementName" : "New Object Tracker",
+ "tags" : [
+
+ ],
+ "elementGuid" : {
+ "value" : "7c65495d-73a6-4e7f-9b26-16d4a9225cc1"
+ },
+ "attachedElementGuid" : {
+ "value" : "86e95b79-c349-4861-b526-d8ec31cbb04f"
+ }
+ },{
+ "__type" : "Ichni.RhythmGame.Beatmap.BackgroundSetter_BM,Assembly-CSharp",
+ "useSkybox" : true,
+ "skyboxThemeBundleName" : "departure_to_multiverse",
+ "skyboxMaterialName" : "DTM_Skybox_StarryIndigo",
+ "backgroundSpriteName" : "Background",
+ "elementName" : "Background Setter",
+ "tags" : [
+
+ ],
+ "elementGuid" : {
+ "value" : "9f8b13f6-309b-4b2c-8c77-cb327a021632"
+ },
+ "attachedElementGuid" : {
+ "value" : "00000000-0000-0000-0000-000000000000"
+ }
}
],
"attachedElementGuid" : {
diff --git a/Assets/ThemeBundles/DepartureToMultiverse/Prefabs/Decorations/Constellation.prefab.meta b/Assets/ThemeBundles/DepartureToMultiverse/Prefabs/Decorations/Constellation.prefab.meta
index 998520e3..82e1a8bb 100644
--- a/Assets/ThemeBundles/DepartureToMultiverse/Prefabs/Decorations/Constellation.prefab.meta
+++ b/Assets/ThemeBundles/DepartureToMultiverse/Prefabs/Decorations/Constellation.prefab.meta
@@ -3,5 +3,5 @@ guid: 92e2ddcb3cdd78544bef993272068d31
PrefabImporter:
externalObjects: {}
userData:
- assetBundleName:
+ assetBundleName: departure_to_multiverse
assetBundleVariant: