Error CS1061 I can't find a solution! [C#]

您所在的位置:网站首页 unity错误cs1061 Error CS1061 I can't find a solution! [C#]

Error CS1061 I can't find a solution! [C#]

2024-03-14 15:53| 来源: 网络整理| 查看: 265

Hi, I’m new to unity and i got my script but it’s not working and i can’t find the reason can someone help me?

This is my script: C#

using System.Collections; using System.Collections.Generic; using UnityEngine; public class GameEnd : MonoBehaviour { public GameObject CanvasIG; public GameObject CanvasEnd; // Use this for initialization void Start () { } // Update is called once per frame void Update () { } void OnTriggerEnter(Collider EndPad) { if (EndPad.gameObject.tag == "Player") { CanvasIG.GameObject.SetActive (false); CanvasEnd.GameObject.SetActive (true); } else { } } }

That code should make a canvas appear and anotherone disappear when the player is colliding with an object. Thank you in advanced.



【本文地址】


今日新闻


推荐新闻


CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3