error CS1022:类型或命名空间定义,或文件结尾预期的统一问题

问题描述 投票:0回答:0

这是我的代码:

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
    // Start is called before the first frame update
void Start()
{
    public Rigidbody2D Hear;
}
    // Update is called once per frame
void Update()
{
    if (Input.GetKeyDown(KeyCode.Space))
    {
        Hear.velocity = Vector2.up * 10;
    }
} 

怎么了?

我加了分号但是没用 这也是统一的,所以如果你有程序,你可以尝试运行我的代码

visual-studio unity3d
© www.soinside.com 2019 - 2024. All rights reserved.