using System.Collections; using System.Collections.Generic; using UnityEngine; public class Cooking : MonoBehaviour { private string[] ingrediens = {"L","Egg"}; void GetIngredients() { } void CheckDishes() { if (System.Array.IndexOf(ingrediens, "Egg")!=-1){ print("Egg"); } } void Update() { GetIngredients(); CheckDishes(); } }