Serializable 사용해 inspector 정리
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
public struct stTest
{
public string monsterName;
// 필요한 컴포넌트
[SerializeField] Animator anim;
[SerializeField] Rigidbody rigid;
[SerializeField] BoxCollider boxCol;
[SerializeField] AudioClip[] sound_Normal;
[SerializeField] AudioClip sound_Hurt;
[SerializeField] AudioClip sound_Dead;
}
public class Test2 : MonoBehaviour
{
[SerializeField]
protected stTest 몬스터기본스텟;
}