fork download
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4.  
  5. public class ClearCounterScript : MonoBehaviour
  6. {
  7. [SerializeField] private KitchenObjectSO kitchenObjectSO;
  8. [SerializeField] private Transform counterTopPoint;
  9. [SerializeField] private ClearCounterScript secondCounter;
  10. [SerializeField] private bool testing;
  11.  
  12. private KitchenObject kObject;
  13.  
  14. public void Interact()
  15. {
  16. //Debug.Log("Interact!");
  17.  
  18. /*
  19.   * If there isn't a Kitchen Object in the scene;
  20.   * create one and only one
  21.   *
  22.   * The selected counter knows there's currently an object on it
  23.   * and the kitchen object itself knows where it currently is spawned
  24.   *
  25.   * The point where the kitchen object spawns on the counter
  26.   * is placed on the counter visual in the prefab
  27.   */
  28. if (kObject == null)
  29. {
  30. Transform kitchenObjectTransform = Instantiate(kitchenObjectSO.prefab, counterTopPoint);
  31.  
  32. kObject = kitchenObjectTransform.GetComponent<KitchenObject>();
  33.  
  34. /*
  35.   * Send this object in scene
  36.   * that this script is attached
  37.   * to as an argument
  38.   *
  39.   * 'this' keyword refers to the object
  40.   * the script is attached to in Scene
  41.   */
  42. kObject.SetClearCounter(this);
  43. }
  44.  
  45. else
  46. {
  47. //kObject.SetClearCounter(player);
  48.  
  49. Debug.Log(kObject.GetClearCounter());
  50. }
  51.  
  52. //Debug.Log(kitchenObjectTransform.GetComponent<KitchenObject>().GetKitchenObjectSO().objectName);
  53. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cs(52,250): error CS1525: Unexpected symbol `end-of-file'
Compilation failed: 1 error(s), 0 warnings
stdout
Standard output is empty