делаю диалоговые окна в игре. Юнити выдаёт ошибку CS1061 Сам код(2 разных т.к. разные нужды в кодах): using System.Collections; using System.Collections.Generic; using UnityEngine;
public class DialogAnimator : MonoBehaviour { public Animator startAnim; public Animator dm;
public void OnTriggerEnter2D(Collider2D other) { startAnim.SetBool("startOpen", true); }
public void OnTriggerExit2D(Collider2D other) { startAnim.SetBool("startOpen", false); dm.EndDialogue(); } }
2: using System.Collections; using System.Collections.Generic; using UnityEngine; using TMPro;
public class DialogueManager : MonoBehaviour { public TextMeshProUGUI dialogueText; public TextMeshProUGUI nameText;
public Animator boxAnim; public Animator startAnim; public void EndDialogue() { boxAnim.SetBool("boxOpen", false); } }
Сам код(2 разных т.к. разные нужды в кодах):
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class DialogAnimator : MonoBehaviour
{
public Animator startAnim;
public Animator dm;
public void OnTriggerEnter2D(Collider2D other)
{
startAnim.SetBool("startOpen", true);
}
public void OnTriggerExit2D(Collider2D other)
{
startAnim.SetBool("startOpen", false);
dm.EndDialogue();
}
}
2:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using TMPro;
public class DialogueManager : MonoBehaviour
{
public TextMeshProUGUI dialogueText;
public TextMeshProUGUI nameText;
public Animator boxAnim;
public Animator startAnim;
public void EndDialogue()
{
boxAnim.SetBool("boxOpen", false);
}
}