Reputation: 57
I have this script that i have inserted into an object that is a card with no more scripts on it. In the inspector though I cannot change the values of these public variables help? All the scripts are saved and have been compiled
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class CardDisplay : MonoBehaviour
{
public Card card;
public Text nameText;
public Text descpritionText;
public Image artworkImage;
public Text levelText;
public Test costText;
}
Upvotes: 0
Views: 7035
Reputation: 7080
There is 3 way which can help you
Ensure that you don't have any compile error in c# scripts
Use [System.Serializable] before your class name like
[System.Serializable] public class...{ }
remove regions code before public variables like
//#if UNITY_ANDROID public String androidAdmobAppId;
and if still not working then use your all public variables on top of your class(and private variables on bottom )like
public class BillingManager : MonoBehaviour
{
//#if UNITY_ANDROID
public String androidAdmobAppId;
public String androidInterstitalAdUnitId;
public String androidBannerAdUnitId;
//#endif
//#if UNITY_IPHONE
public String iosAdmobAppId;
public String iosInterstitalAdUnitId;
public String iosBannerAdUnitId;
//#endif
private BannerView bannerView;
private InterstitialAd interstitial;
}
Upvotes: 1