0
今日、私はgamemanagerを必要とするゲームを作っています。なぜコードが動かないのかわからないのですが、 私はまだ出くわしました 下記の別のエラー、誰もが私が間違っているところかもしれないを教えてください、私はこの エラーを修正する助けてもらえますが、これは私は再び私のコードを見た後、あなたの時間を無駄にしていると申し訳ありませんイム、現在は修正されましたAssets/Scripts/GameManager.cs(37,1):エラーCS8025:構文解析エラー
Assets/Scripts/GameManager.cs(30,41): error CS1525: Unexpected symbol `{'
Assets/Scripts/GameManager.cs(37,1): error CS8025: Parsing error`
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
public class GameManager : MonoBehaviour {
public List<Character> Characters = new List<Character>();
bool ShowCharWeel;
public int SelectedCharacter;
// Use this for initialization
void Start() {
}
// Update is called once per frame
void Update() {
if (Input.GetKeyDown (KeyCode.C))
{
ShowCharWeel = true;
}
}
//controls the weel for characactor change//
void OnGUI()
{
if (ShowCharWeel)
{
GUILayout.BeginArea(new Rect(Screen.width - 256, Screen.height - 256, 512, 512),GUIContent.none, "box");
foreach (Character c in Characters)
{
if (GUILayout.Button(c.Icon,GUILayout.Width(64),GUILayout.Height(64)()
{
SelectedCharacter = Characters.IndexOf(c);
}
}
GUILayout.EndArea();
}
}
}
[System.Serializable]
public class Character
{
public string Name;
public Texture2D Icon;
public GameObject PlayerPrefab;
}