Quantcast
Channel: Questions in topic: "error"
Viewing all articles
Browse latest Browse all 7934

I need help I can't find the error in my code!

$
0
0
So I am coding a dialogue system and everything is going perfectly fine until Unity said error void doesn't work. So I tried all of this other stuff and I can't seem to fix it. Can someone please help! using System.Collections; using System.Collections.Generic; using UnityEngine; public class DialogueSystem : MonoBehaviour { public static DialogueSystem Instance { get; set; } public List dialogueLines = new List(); void Awake () { if (Instance != null && Instance != this) { Destroy(gameObject); } else { Instance = this; } } } public void AddNewDialogue(string[] lines) { dialogueLines = new List(); foreach(string line in lines) { dialogueLines.Add(line); } Debug.Log(dialogueLines.Count); } }

Viewing all articles
Browse latest Browse all 7934

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>