BITFALL/Assets/Artists/Scripts/Entities/Character/EntityReplaceComponent.cs

27 lines
642 B
C#
Raw Normal View History

2024-08-11 12:46:15 +08:00
using System.Collections;
using System.Collections.Generic;
using AYellowpaper.SerializedCollections;
using BITKit;
using UnityEngine;
namespace BITFALL.Entities
{
public class EntityReplaceComponent : MonoBehaviour
{
public SerializedDictionary<string, Transform> Dictionary;
[BIT]
private void Setup()
{
foreach (var variable in transform.GetComponentsInChildren<Transform>())
{
Dictionary.TryAdd(variable.name, variable);
}
#if UNITY_EDITOR
UnityEditor.EditorUtility.SetDirty(this);
#endif
}
}
}