class ์์ ์์class.ํ์class[] (๋ณ์) ์์ฑํด์ ํ๋ฉด ๋๋ ๋ฌธ์ ์์ ใ
ใ
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class spawnmanager : MonoBehaviour
{
[System.Serializable]
public class Enemy
{
public string Enemy_name;
public class enemies
{
public GameObject prefab;
public Transform spawnspot;
public int count;
public float delay;
}
}
public Enemy[] enemy;
}
๋ด ์ฝ๋์ธ๋ฐ
๊ฒฐ๊ณผ๊ฐ string ์
๋ ฅ ์นธ๋ง ๋์ค๋๋ผ๊ณ ๋ด ์๋๋ ๋ด๋ถ class๋ ์ ์ธํ ์ ์๊ฒ ํ๊ณ ์ถ์
์ด๋ป๊ฒ ํด์ผ๋ ๊น?
์คํธ๋ง ์นธ๋ง ๋์ค๊ฒ์๊ฒผ๋ค. enemiesํด๋์ค ๋ณ์๋ ํ๋๋ ์ ์ธ ์ํ์์
public class enemies ์์๋ [System.Serializable]
๊ทธ๋ฆฌ๊ณ ๊ทธ๊ฑธ๋ก ๋ณ์๋ ํ๋ ๋ง๋ค๊ณ
public Enemy.enemies[] (๋ณ์) ๋ง์ ํ์๋๊ฑด๊ฐ์ ?