When I try to assign an object with the proper script, it won’t allow me to add it to the prefab (I even tried to link to link before it was a prefab) unless the game object i’m linking is itself a prefab
this is causing a problem because the function only runs on the clone, not the prefab
SCRIPT B
![using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using UnityEngine.EventSystems;
public class CardStats : MonoBehaviour
{
public Deck deck;
public int cardCost;
public int cardHealth;
public int cardDefense;
public Text cardHealthText;
public Text cardCostText;
public Text cardDefenseText;
public int cardID;
// Use this for initialization
void Start ()
{
}
// Update is called once per frame
void Update ()
{
if (cardCost <= 0)
{
cardCost = 0;
}
if (cardHealth <= 0)
{
cardHealth = 0;
}
if (cardDefense <= 0)
{
cardDefense = 0;
}
if (Input.GetKeyDown(KeyCode.D))
{
cardID = deck.tempDeck[0];
Debug.Log(" Huh? " + cardID);][1]