This repository has been archived on 2025-03-20. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
mojo-kitchen-chaos/Assets/Scripts/ClearCounter.cs

20 lines
526 B
C#

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);
}
}