mirror of
https://github.com/RHeavenStudio/HeavenStudio.git
synced 2025-06-12 21:37:40 +02:00
Fix event property dropdown
This commit is contained in:
@ -21,6 +21,8 @@ namespace RhythmHeavenMania.Editor
|
||||
|
||||
private bool active;
|
||||
|
||||
private int childCountAtStart;
|
||||
|
||||
public static EventParameterManager instance { get; set; }
|
||||
|
||||
private void Awake()
|
||||
@ -28,6 +30,11 @@ namespace RhythmHeavenMania.Editor
|
||||
instance = this;
|
||||
}
|
||||
|
||||
private void Start()
|
||||
{
|
||||
childCountAtStart = transform.childCount;
|
||||
}
|
||||
|
||||
private void Update()
|
||||
{
|
||||
if (Input.GetMouseButtonDown(0))
|
||||
@ -113,7 +120,7 @@ namespace RhythmHeavenMania.Editor
|
||||
private void DestroyParams()
|
||||
{
|
||||
active = false;
|
||||
for (int i = 2; i < transform.childCount; i++)
|
||||
for (int i = childCountAtStart; i < transform.childCount; i++)
|
||||
{
|
||||
Destroy(transform.GetChild(i).gameObject);
|
||||
}
|
||||
|
Reference in New Issue
Block a user