前提・実現したいこと
UnityのC#での質問なんですがvisualstudioって中括弧自動であるべき場所に入れてくれるじゃないですかその設定で中括弧がエラー起こして抜け出せない状態にあるんですがこの自動でやってくれる設定を消す方法ってありますか?
該当のソースコード
using MediaFoundation.OPM; using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; public class GameControlloer : MonoBehaviour {//① InputField inputField; Text text; // Start is called before the first frame update void Start() { inputField = GameObject.Find("InputField").GetComponent<InputField>(); text = GameObject.Find("Message").GetComponent<Text>(); string x = inputField.text; int monndaisuu = 0; int one = UnityEngine.Random.Range(1, 11); int two = UnityEngine.Random.Range(1, 11); int answer = one + two; Debug.Log(one + "+" + two + "+" + "=" + answer); if (monndaisuu == 10) { Debug.Log("成功!"); } else if (x == (one + "+" + two + "=" + answer)) { monndaisuu++; GET get = GetComponent<GET>(); } } public void InputText() {//② text.text = inputField.text; public string InputField = "ochai"; }//③ } // ④ //本当は①と④ ②と③の括弧をつなげたいのですが ③と①がつながれていて、②と④がどちらも孤立しています }
試したこと
いろいろ試行錯誤しましたが、どうしてもできませんでした
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2020/01/17 06:49 編集