Button не содержит определения interactible
Добавлено: 13 июл 2020, 09:17
Кто может помогите не могу понять в чем проблема. При написании такого скрипта вылетает сообщение по типу "Button не содержит определения interactible..."
Синтаксис:
Используется csharp
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class Save : MonoBehaviour
{
public Button[] lvls;
// Start is called before the first frame update
void Start()
{
if (PlayerPrefs.HasKey("Lvl"))
for (int i = 0; i < lvls.Length; i++)
{
if (i <= PlayerPrefs.GetInt("Lvl"))
lvls[i].interactable = true;
else
lvls[i].interactable = false;
}
}
}
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class Save : MonoBehaviour
{
public Button[] lvls;
// Start is called before the first frame update
void Start()
{
if (PlayerPrefs.HasKey("Lvl"))
for (int i = 0; i < lvls.Length; i++)
{
if (i <= PlayerPrefs.GetInt("Lvl"))
lvls[i].interactable = true;
else
lvls[i].interactable = false;
}
}
}