mirror of
				https://github.com/DerTyp7/grow-ai-unity.git
				synced 2025-11-03 22:38:59 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			22 lines
		
	
	
		
			512 B
		
	
	
	
		
			C#
		
	
	
	
	
	
			
		
		
	
	
			22 lines
		
	
	
		
			512 B
		
	
	
	
		
			C#
		
	
	
	
	
	
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;
 | 
						|
        }
 | 
						|
    }
 | 
						|
 | 
						|
 | 
						|
}
 |