Have run into reports of this with my mod ( https://github.com/shadowmage45/SSTULabs ), where I add procedurally generated fairings to parts at run-time (not stock fairings though). These fairing transforms and meshes do not exist on the prefab parts, and as such attempting to grab a reference to their transforms from the prefab model will always fail.
Log excerpt from user submission:
NullReferenceException: Object reference not set to an instance of an object
at FerramAerospaceResearch.FARPartGeometry.GeometryPartModule.GetVisibleMeshData (UnityEngine.Transform t, Boolean onlyMeshes) [0x00000] in <filename unknown>:0
at FerramAerospaceResearch.FARPartGeometry.GeometryPartModule.CreateMeshListFromTransforms (System.Collections.Generic.List`1& meshTransforms) [0x00000] in <filename unknown>:0
at FerramAerospaceResearch.FARPartGeometry.GeometryPartModule.RebuildAllMeshData () [0x00000] in <filename unknown>:0
at FerramAerospaceResearch.FARPartGeometry.GeometryPartModule.GeometryPartModuleRebuildMeshData () [0x00000] in <filename unknown>:0
UnityEngine.Component:SendMessage(String, Object, SendMessageOptions)
UnityEngine.Component:SendMessage(String)
SSTUTools.SSTUModInterop:onPartGeometryUpdate(Part, Boolean)
SSTUTools.SSTUNodeFairing:buildFairing()
SSTUTools.SSTUNodeFairing:initialize()
SSTUTools.SSTUNodeFairing:OnStart(StartState)
Part:ModulesOnStart()
Locally cloning the FAR repo and adding some debugging to the GetVisibleMeshData method returned the following information:
Have run into reports of this with my mod ( https://github.com/shadowmage45/SSTULabs ), where I add procedurally generated fairings to parts at run-time (not stock fairings though). These fairing transforms and meshes do not exist on the prefab parts, and as such attempting to grab a reference to their transforms from the prefab model will always fail.
Log excerpt from user submission:
Locally cloning the FAR repo and adding some debugging to the GetVisibleMeshData method returned the following information:
A null-check/wrapper around this code block would 'fix' the problems with these parts:
https://github.com/ferram4/Ferram-Aerospace-Research/blob/master/FerramAerospaceResearch/FARPartGeometry/GeometryPartModule.cs#L667-L668
I am heading out of town for a few days, but will put together a proper PR for this when I return (if it is desired and/or needed).
Thanks in advance :)