Search Unity

always get error when stop Run

Discussion in 'Scripting' started by HX_LSC, Dec 13, 2018.

  1. HX_LSC

    HX_LSC

    Joined:
    Oct 24, 2014
    Posts:
    31
    always get error when stop Run.

    if I use stopCoroutine . there will appear error when I click stop.

    eg: this is a error in vrtk. [VRTK_UICanvas]

    NullReferenceException: (null)
    UnityEngine.MonoBehaviour.StopCoroutine (UnityEngine.Coroutine routine) (at C:/buildslave/unity/build/artifacts/generated/common/runtime/MonoBehaviourBindings.gen.cs:99)
    VRTK.VRTK_UICanvas.RemoveCanvas () (at Assets/VRTK/Scripts/UI/VRTK_UICanvas.cs:199)
    VRTK.VRTK_UICanvas.OnDestroy () (at Assets/VRTK/Scripts/UI/VRTK_UICanvas.cs:44)
     
  2. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    5,467
    Does it work correctly when you don't use StopCoroutine?