I could use some help. Here is a link: Imgur: The magic of the Internet I am dragging the item Total on the left to the Total on the right.
the item on the left is a TextMeshPro Text box on my card. The item on the right is a Scriptable object with a text box which should not have any issues holding the TMPro text box. This code should just let me setup the scriptable object. ( the tutorial I am using does the exact same thing I am doing with an public int in the card.cs and a public Text in the card simply with no compiler errors when I do the exact same thing I am getting this (Assets\Scripts\CardDisplay.cs(18,22): error CS0029: Cannot implicitly convert type ‘int’ to ‘string’) the only difference is I am using a TMPro text box.
Thank you for any help.
My card.cs code:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;using TMPro; <------ I added this to try and troubleshoot I dont think I need it the tutorial I used did not have it.
[CreateAssetMenu(fileName = “New Card”, menuName = “Card”)]
public class Card : ScriptableObject
{
public new string name;
public Sprite image;
public int cardTotal;
}
My carddisplay.cs code:
using System.Collections;using System.Collections.Generic;
using UnityEngine;using UnityEngine.UI;
using TMPro; <------same as above
public class CardDisplay : MonoBehaviour
{
public Card card;
public Image spriteImage;
public Text total;
}