BunyaPineTree / LethalCompany_ModelReplacementSDK

A SDK to simplify creating character model replacements in Lethal Company
MIT License
5 stars 5 forks source link

"Setup Model" fails with multiple errors #4

Closed JTJutajoh closed 10 months ago

JTJutajoh commented 10 months ago

I set up a new project using a model I had set up with the pre-SDK workflow but the "Setup Models" option is no longer working in the SDK version. I am getting two NREs that I believe are the main culprits:

NullReferenceException: Object reference not set to an instance of an object
ModelReplacement.AvatarBodyUpdater.OffsetBuilder.Start () (at ./Library/PackageCache/com.bunya.modelreplacementsdk@94b864c701/Plugins/OffsetBuilder.cs:123)

and

NullReferenceException: Object reference not set to an instance of an object
OffsetBuilderEditor.OnSceneGUI () (at ./Library/PackageCache/com.bunya.modelreplacementsdk@94b864c701/Editor/ItemOffsetEditor.cs:49)
(wrapper dynamic-method) System.Object.lambda_method(System.Runtime.CompilerServices.Closure,UnityEditor.Editor)
UnityEditor.SceneView.CallOnSceneGUI () (at <2e279d988b9d4542841de511fbfdf8c2>:0)
UnityEditor.SceneView.HandleSelectionAndOnSceneGUI () (at <2e279d988b9d4542841de511fbfdf8c2>:0)
UnityEditor.SceneView.DoOnGUI () (at <2e279d988b9d4542841de511fbfdf8c2>:0)
UnityEditor.SceneView.OnSceneGUI () (at <2e279d988b9d4542841de511fbfdf8c2>:0)
UnityEngine.UIElements.IMGUIContainer.DoOnGUI (UnityEngine.Event evt, UnityEngine.Matrix4x4 parentTransform, UnityEngine.Rect clippingRect, System.Boolean isComputingLayout, UnityEngine.Rect layoutSize, System.Action onGUIHandler, System.Boolean canAffectFocus) (at <b8c852c145a8456ba2512bf23f96ab0b>:0)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)

The Model Replacement Properties component successfully gets added to my prefab, but none of the RotationOffset components do, and none of the other prefabs/GameObjects get added to the scene. I am not 100% sure but it seems to me like an issue with failing to instantiate those prefabs from the SDK's Assets folder as these NREs are thrown the first time the instance is referenced.