问答详情
源自:3-2 卡牌预制体及翻牌效果实现

输出不了所有的卡牌

运行后,显示下面的错误:

NullReferenceException: Object reference not set to an instance of an object

GameMain.LoadLevelCard(Int32 width, Int32 height)(at Assets/Script/GameMain.cs: 72)


第72行:int maxCount = Mathf.Max(contentRoot.childCount, needShowCardList.Count);

无法出现Resources里的图片。之前在第4步显示卡牌到UI上 ,都测试可以成功。这是为什么呢?

提问者:住在幸福中 2018-06-01 16:58

个回答

  • Andy0726
    2018-06-28 02:19:25

    请问成功了吗,我也是败在了这个错误上……

  • 坚持2016
    2018-06-05 21:52:57

    可能网络故障