Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

"The variable m_Terrain of TerrainSplatEditor doesn't exist anymore"

Discussion in 'Editor & General Support' started by unfungmz, Jul 10, 2018.

  1. unfungmz

    unfungmz

    Joined:
    Jul 29, 2017
    Posts:
    162
    Not sure why this is happening all of a sudden. Her'es the full error log:

    MissingReferenceException: The variable m_Terrain of TerrainSplatEditor doesn't exist anymore.
    You probably need to reassign the m_Terrain variable of the 'TerrainSplatEditor' script in the inspector.
    UnityEditor.TerrainSplatEditor.OnGUI () (at C:/buildslave/unity/build/Editor/Mono/TerrainEditor/TerrainSplatEditor.cs:229)
    System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:222)
    Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
    System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:232)
    System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MethodBase.cs:115)
    UnityEditor.HostView.Invoke (System.String methodName, System.Object obj) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:295)
    UnityEditor.HostView.Invoke (System.String methodName) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:288)
    UnityEditor.HostView.OldOnGUI () (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:107)
    UnityEngine.Experimental.UIElements.IMGUIContainer.DoOnGUI (UnityEngine.Event evt) (at C:/buildslave/unity/build/Runtime/UIElements/Managed/IMGUIContainer.cs:182)
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr)

    It's weird that it's showing an error occurring on TerrainSplatEditor.OnGUI() - I can see that apparently that script is in a hidden folder. I guess I could get in there and mess with it, but that seems like a bad idea since I'm not even sure what the purpose of it is.

    My gut tells me that either MegaSplat or CTS caused this. I removed both, but the error used to only happen when I would build a project. Since removing those assets, it now happens everytime I hit play.

    Any ideas on how to fix this?
     
  2. mike_kennedy989

    mike_kennedy989

    Joined:
    Feb 5, 2014
    Posts:
    51
    getting this as well, if you find an answer please let us know
     
  3. sarahnorthway

    sarahnorthway

    Joined:
    Jul 16, 2015
    Posts:
    78
    I ran into this error after changing the Control Texture Resolution (which nukes the splat map) in 2018.2.5f1. Restarting Unity fixed it for me.
     
    HaShinda likes this.