You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

VS Code C#扩展接受重写建议时删除输入内容问题求助

VS Code C#扩展Override代码补全异常问题

在Unity项目开发中,我遇到VS Code的C#扩展异常:VS Code会显示重写(override)建议,但按下Enter或Tab尝试使用时,不仅未插入代码,还删除全部输入内容,仅保留首字母。

示例:接受建议时内容被删除

该问题覆盖整个项目,并非仅存在于特定类中。我对IntelliSense相关技术不熟悉,不确定需补充哪些信息,希望得到解决方向指引。

版本信息

  • VS Code「C#」扩展版本:v2.0.413
  • VS Code「C# Dev Kit」扩展版本:v0.3.21

当前类代码

public class PlayerMovementState : PlayerState
{
    public PlayerMovementState(IStateMachine stateMachine, PlayerEntity player) : base(stateMachine, player)
    {
    }
}

基类代码

public abstract class PlayerState : BaseStateMachineState
{
    //...

    #region Drawing

    //...

    #endregion
    #region Main Methods

    public virtual void Move() 
    {
        player.Rigidbody.velocity = Vector2.zero;
    }

    #endregion
    #region Callback Methods

    //...

    #endregion
    #region Damage

    //...

    #endregion
    #region Helper Methods

    //...

    #endregion
}

内容的提问来源于stack exchange,提问作者Albee

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.12 14:32:06