“ X被标记为替代,但是找不到适合的替代方法”

时间:2019-09-27 06:30:53

标签: vrtk

我最近更新为VRTK 3.3,以前我的功能脚本中有3个由于引用标题中的错误而停止工作。

我已经尝试检查“使用VRTK”库,并且“去定义实际上使我进入了脚本,与对假定不存在的功能的引用相同。”

//导致错误的功能之一

    public override void StopUsing(VRTK_InteractUse usingObject)
    {
        StopRecordButtonOnClickHandler();

    }

//进入定义

公共类VRTK_InteractUse:MonoBehaviour     {         [标题(“使用设置”))

    [Tooltip("The button used to use/unuse a touched Interactable Object.")]
    public VRTK_ControllerEvents.ButtonAlias useButton = VRTK_ControllerEvents.ButtonAlias.TriggerPress;

    [Header("Custom Settings")]

    [Tooltip("The Controller Events to listen for the events on. If the script is being applied onto a controller then this parameter can be left blank as it will be auto populated by the controller the script is on at runtime.")]
    public VRTK_ControllerEvents controllerEvents;
    [Tooltip("The Interact Touch to listen for touches on. If the script is being applied onto a controller then this parameter can be left blank as it will be auto populated by the controller the script is on at runtime.")]
    public VRTK_InteractTouch interactTouch;
    [Tooltip("The Interact Grab to listen for grab actions on. If the script is being applied onto a controller then this parameter can be left blank as it will be auto populated by the controller the script is on at runtime.")]
    public VRTK_InteractGrab interactGrab;

    /// <summary>
    /// Emitted when the use toggle alias button is pressed.
    /// </summary>
    public event ControllerInteractionEventHandler UseButtonPressed;
    /// <summary>
    /// Emitted when the use toggle alias button is released.
    /// </summary>
    public event ControllerInteractionEventHandler UseButtonReleased;

    /// <summary>
    /// Emitted when a use of a valid object is started.
    /// </summary>
    public event ObjectInteractEventHandler ControllerStartUseInteractableObject;
    /// <summary>
    /// Emitted when a valid object starts being used.
    /// </summary>
    public event ObjectInteractEventHandler ControllerUseInteractableObject;
    /// <summary>
    /// Emitted when a unuse of a valid object is started.
    /// </summary>
    public event ObjectInteractEventHandler ControllerStartUnuseInteractableObject;
    /// <summary>
    /// Emitted when a valid object stops being used.
    /// </summary>
    public event ObjectInteractEventHandler ControllerUnuseInteractableObject;

    protected VRTK_ControllerEvents.ButtonAlias subscribedUseButton = VRTK_ControllerEvents.ButtonAlias.Undefined;
    protected VRTK_ControllerEvents.ButtonAlias savedUseButton = VRTK_ControllerEvents.ButtonAlias.Undefined;
    protected bool usePressed;
    protected VRTK_ControllerReference controllerReference
    {
        get
        {
            return VRTK_ControllerReference.GetControllerReference((interactTouch != null ? interactTouch.gameObject : null));
        }
    }

0 个答案:

没有答案