Kitchen object creation and spawning

This commit is contained in:
BuyMyMojo 2023-02-28 05:25:39 +11:00
parent 989648c00b
commit 1729ddf5c6
22 changed files with 462 additions and 3 deletions

View file

@ -3,9 +3,18 @@ using UnityEngine;
public class ClearCounter : MonoBehaviour
{
[SerializeField] private KitchenObjectSO kitchenObjectSO;
[SerializeField] private Transform counterTopPoint;
public void Interact()
{
Debug.Log("Interacted!");
Transform kitchenObjectTransform = Instantiate(kitchenObjectSO.prefab, counterTopPoint);
kitchenObjectTransform.localPosition = Vector3.zero;
Debug.Log(kitchenObjectTransform.GetComponent<KitchenObject>().GetKitchenObjectSO().objectName);
}
}