반응형
이렇게 만들면 맵 위에 올려도 클릭도 안되고 조작도 안됨.
단지 Object를 하나 만드는 역할만 하는 듯 하다. -> [추가] GameManager에서 Faction 설정을 해줘야함
UnitSpawner라는 컴포넌트가 있는데, 이것을 이용해서 유닛을 Spawn해줘야 게임 시스템안에 녹아든다.
- Units: Drag and drop the unit prefabs (that have the main Unit component). Each time, one random unit will be chosen from this list to be spawned next.
- Player Faction: Check this field if you want to spawn the units for the player’s faction.
- Faction ID: If the above field is left unchecked, then the spawned units will be assigned to the faction whose ID is the value of this field.
- Free Units: Check this field if you want the spawned units to be free (not belong to any faction in the game).
- Update Population: The spawned units will occupy slots in their faction’s population, if this field is enabled.
- Spawn Positions: An array of Transform components placed in the map’s scene that represent the potential spawn positions of each unit. Each time a unit is spawned, a random element of this array is selected to spawn the units at.
- Destination: When assigned, unit that spawn will proceed to move towards the position represented by the Transform component.
- Amount Range: The minimum and maximum amount of instances of the units to spawn. A random value will be chosen at the beginning inside the assigned range.
- Spawn Reload Range: How long does it to spawn two consecutive units? Each time a unit spawns, the spawn reload value is chosen as a random value inside the assigned range.
- Game Manager: Since this component is not directly initialized by the Game Manager component, it has to be manually assigned through this field.
http://soumidelrio.com/docs/unity-rts-engine/units/unit-spawner/
반응형
'Unity > Asset 분석' 카테고리의 다른 글
[Dynamic Water Physics] Quick Start (0) | 2021.05.30 |
---|---|
[Lux Water] Quick Start (0) | 2021.05.29 |
[Lux Water] 두둥실 모션 & 물표면 반사 (0) | 2021.05.29 |
[RTS Engine] Android 터치 커스터마이징 & Unity에서의 마우스 입력 (0) | 2021.05.28 |
[RTS Engine] Unity RTS Engine Document (0) | 2021.05.28 |