Jump to content

Getting null error on build with GeNa


damenace
Go to solution Solved by damenace,

Recommended Posts

Getting error on build u

 

NullReferenceException: Object reference not set to an instance of an object
GeNa.Core.MeshesSplitter.SplitMeshesAndAssign (UnityEngine.GameObject meshesParent, System.String newParentName, System.String newBaseMeshName, System.String groupParentName) (at <bd27a45fe363481c9cedef3dd3cd6842>:0)
GeNa.Core.GeNaRoadsMesh.PostProcess (UnityEngine.GameObject meshes, System.String groupName) (at <bd27a45fe363481c9cedef3dd3cd6842>:0)
GeNa.Core.GeNaRoadExtension.OnBake (GeNa.Core.GeNaSpline spline) (at Assets/Procedural Worlds/GeNa/Scripts/Runtime/Extensions/GeNaRoadExtension.cs:143)
GeNa.Core.GeNaSplineExtension.Bake () (at <bd27a45fe363481c9cedef3dd3cd6842>:0)
GeNa.Core.GeNaRoadExtension.Bake (System.Boolean postProcess) (at Assets/Procedural Worlds/GeNa/Scripts/Runtime/Extensions/GeNaRoadExtension.cs:114)
GeNa.Core.GeNaRoadPreprocessBuild.UnityEditor.Build.IProcessSceneWithReport.OnProcessScene (UnityEngine.SceneManagement.Scene scene, UnityEditor.Build.Reporting.BuildReport report) (at Assets/Procedural Worlds/GeNa/Scripts/Editor/Extensions/GeNaRoadPreprocessBuild.cs:46)
UnityEditor.Build.BuildPipelineInterfaces+<>c__DisplayClass16_0.<OnSceneProcess>b__1 (UnityEditor.Build.IProcessSceneWithReport spp) (at <55729f52d042492e9efc384182ae2feb>:0)
UnityEditor.Build.BuildPipelineInterfaces.InvokeCallbackInterfacesPair[T1,T2] (System.Collections.Generic.List`1[T] oneInterfaces, System.Action`1[T] invocationOne, System.Collections.Generic.List`1[T] twoInterfaces, System.Action`1[T] invocationTwo, System.Boolean exitOnFailure) (at <55729f52d042492e9efc384182ae2feb>:0)
UnityEditor.BuildPlayerWindow:BuildPlayerAndRun()
 

Link to comment
Share on other sites

  • Solution

Found a solution had to add null check in GeNaRouadExtension line 141

 

changed 

            if (m_postProcess && m_splitAtTerrains)

to
            if (m_postProcess && m_splitAtTerrains && roadMeshes != null)

 

Not sure if it is the right thing to do but it is working for now.

  • Like 1
Link to comment
Share on other sites

19 hours ago, damenace said:

Found a solution had to add null check in GeNaRouadExtension line 141

 

changed 

            if (m_postProcess && m_splitAtTerrains)

to
            if (m_postProcess && m_splitAtTerrains && roadMeshes != null)

 

Not sure if it is the right thing to do but it is working for now.

Was this on an empty road spline?

Link to comment
Share on other sites

 Hi there!

This issue has been fixed in the new latest version of GeNa (v3.3.21).
You can download it via the Unity Package Manager or via Canopy if you are a subscriber here: 

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Tell a friend

    Love Canopy - Procedural Worlds? Tell a friend!
  • Need help?

    We work with some of the biggest brands in global gaming, automotive, technology, and government to create environments, games, simulations, and product launches for desktop, mobile, and VR.

    Our unique expertise and technology enable us to deliver solutions that look and run better at a fraction of the time and cost of a typical project.

    Check out some of our non-NDA work in the Gallery, and then Contact Us to accelerate your next project!

×
×
  • Create New...