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

27 lines
642 B
C#

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
}
}
}