So on managerino.cs I have the following code:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class managerino : MonoBehaviour
{
public bool[] availablecardSlots; //the lenght of the list is set on the inspector and all the values begin as true
}
And on my DragDrop.cs script (note that the scripts are not applied to the same gameObject) I want to set one of the elements in availablecardSlots to false, which means I have to be able to modify the list outside of the script where it was created.
I tried this:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class DragDrop : MonoBehaviour
{
int n = 2;
private void Start()
{
managerino = FindObjectOfType<managerino>;
}
managerino.availablecardSlots[n] = true;
Destroy(gameObject);
But its not working I'm getting three errors all about managerino