mirror of
				https://github.com/DerTyp7/grow-ai-unity.git
				synced 2025-10-31 05:17:08 +01:00 
			
		
		
		
	a
This commit is contained in:
		
							
								
								
									
										21
									
								
								Assets/Scripts/UI/BuildingMenu.cs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										21
									
								
								Assets/Scripts/UI/BuildingMenu.cs
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,21 @@ | ||||
| using System.Collections; | ||||
| using System.Collections.Generic; | ||||
| using UnityEngine; | ||||
|  | ||||
| public class BuildingMenu : MonoBehaviour | ||||
| { | ||||
|      | ||||
|     [SerializeField] GameObject slotPrefab; | ||||
|     [SerializeField] List<PlacedObjectTypeSO> placedObjectTypeSOList; | ||||
|  | ||||
|     void Start() | ||||
|     { | ||||
|         foreach(PlacedObjectTypeSO p in placedObjectTypeSOList) | ||||
|         { | ||||
|             GameObject slot = Instantiate(slotPrefab, gameObject.transform); | ||||
|             slot.GetComponent<BuildingMenuSlot>().placedObjectTypeSO = p; | ||||
|         } | ||||
|     } | ||||
|  | ||||
|  | ||||
| } | ||||
		Reference in New Issue
	
	Block a user
	 j.mei7
					j.mei7