Obi Official Forum
Softbody Surface blueprint seems to fail at generation - Printable Version

+- Obi Official Forum (https://obi.virtualmethodstudio.com/forum)
+-- Forum: Obi Users Category (https://obi.virtualmethodstudio.com/forum/forum-1.html)
+--- Forum: Obi Softbody (https://obi.virtualmethodstudio.com/forum/forum-12.html)
+--- Thread: Softbody Surface blueprint seems to fail at generation (/thread-3055.html)



Softbody Surface blueprint seems to fail at generation - Snail921 - 10-08-2021

Hi,
When I try to generate and edit a softbody surface blueprint by following the procedure explained here, obi seems to fail to generate valid data for the softbody surface blueprint.
I feed my mesh to a newly created blueprint and  hit generate. Right after the generation, nothing happens but when I hit edit button, I get an error as bellow.

Quote:NullReferenceException: Object reference not set to an instance of an object
Obi.ObiActorBlueprintEditor.OnSceneGUI (UnityEditor.SceneView sceneView) (at Assets/Obi/Editor/Common/Blueprints/ObiActorBlueprintEditor.cs:314)
UnityEditor.SceneView.CallOnSceneGUI () (at <1798d6bccd2b44b2854be2fbcc2463b3>:0)
UnityEditor.SceneView.HandleSelectionAndOnSceneGUI () (at <1798d6bccd2b44b2854be2fbcc2463b3>:0)
UnityEditor.SceneView.OnGUI () (at <1798d6bccd2b44b2854be2fbcc2463b3>:0)
UnityEditor.HostView.InvokeOnGUI (UnityEngine.Rect onGUIPosition, UnityEngine.Rect viewRect) (at <1798d6bccd2b44b2854be2fbcc2463b3>:0)
UnityEditor.DockArea.DrawView (UnityEngine.Rect viewRect, UnityEngine.Rect dockAreaRect) (at <1798d6bccd2b44b2854be2fbcc2463b3>:0)
UnityEditor.DockArea.OldOnGUI () (at <1798d6bccd2b44b2854be2fbcc2463b3>: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 <6aef74cd6e9c4a708ea4a51c97de39d4>:0)
UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, UnityEngine.Matrix4x4 worldTransform, UnityEngine.Rect clippingRect, System.Action onGUIHandler, System.Boolean canAffectFocus) (at <6aef74cd6e9c4a708ea4a51c97de39d4>:0)
UnityEngine.UIElements.IMGUIContainer.DoIMGUIRepaint () (at <6aef74cd6e9c4a708ea4a51c97de39d4>:0)
UnityEngine.UIElements.UIR.RenderChainCommand.ExecuteNonDrawMesh (UnityEngine.UIElements.UIR.DrawParams drawParams, System.Single pixelsPerPoint, System.Exception& immediateException) (at <6aef74cd6e9c4a708ea4a51c97de39d4>:0)
Rethrow as ImmediateModeException
UnityEngine.UIElements.UIR.RenderChain.Render () (at <6aef74cd6e9c4a708ea4a51c97de39d4>:0)
UnityEngine.UIElements.UIRRepaintUpdater.Update () (at <6aef74cd6e9c4a708ea4a51c97de39d4>:0)
UnityEngine.UIElements.VisualTreeUpdater.UpdateVisualTreePhase (UnityEngine.UIElements.VisualTreeUpdatePhase phase) (at <6aef74cd6e9c4a708ea4a51c97de39d4>:0)
UnityEngine.UIElements.Panel.UpdateForRepaint () (at <6aef74cd6e9c4a708ea4a51c97de39d4>:0)
UnityEngine.UIElements.Panel.Repaint (UnityEngine.Event e) (at <6aef74cd6e9c4a708ea4a51c97de39d4>:0)
UnityEngine.UIElements.UIElementsUtility.DoDispatch (UnityEngine.UIElements.BaseVisualElementPanel panel) (at <6aef74cd6e9c4a708ea4a51c97de39d4>:0)
UnityEngine.UIElements.UIElementsUtility.UnityEngine.UIElements.IUIElementsUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr, System.Boolean& eventHandled) (at <6aef74cd6e9c4a708ea4a51c97de39d4>:0)
UnityEngine.UIElements.UIEventRegistration.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at <6aef74cd6e9c4a708ea4a51c97de39d4>:0)
UnityEngine.UIElements.UIEventRegistration+<>c.<.cctor>b__1_2 (System.Int32 i, System.IntPtr ptr) (at <6aef74cd6e9c4a708ea4a51c97de39d4>:0)
UnityEngine.GUIUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr, System.Boolean& result) (at <9ff04fda545c4aacb8dab659ad40b2f4>:0)
UnityEditor.SceneManagement.EditorSceneManager:NewScene(NewSceneSetup)
Obi.ObiActorBlueprintEditor:EnterBlueprintEditMode() (at Assets/Obi/Editor/Common/Blueprints/ObiActorBlueprintEditor.cs:213)
UnityEditor.EditorApplication:Internal_CallDelayFunctions()
The mesh is a relatively simple mesh with 1138verts. which has been created for this experimental purpose and ported from blender.

The mesh's Read/Write setting has been checked on when it was imported to Unity.
Do you have any idea what is causing this issue?


RE: Softbody Surface blueprint seems to fail at generation - josemendez - 10-08-2021

(10-08-2021, 09:27 AM)Snail921 Wrote: Hi,
When I try to generate and edit a softbody surface blueprint by following the procedure explained here, obi seems to fail to generate valid data for the softbody surface blueprint.
I feed my mesh to a newly created blueprint and  hit generate. Right after the generation, nothing happens but when I hit edit button, I get an error as bellow.

The mesh is a relatively simple mesh with 1138verts. which has been created for this experimental purpose and ported from blender.

The mesh's Read/Write setting has been checked on when it was imported to Unity.
Do you have any idea what is causing this issue?

Another user had a similar error:
http://obi.virtualmethodstudio.com/forum/thread-2873.html?highlight=Obi.ObiActorBlueprintEditor.OnSceneGUI

Line 314 in the blueprint inspector accesses the "currentProperty" variable which, if correctly initialized by Unity, should never be null.
After a long investigation it boiled down to a Unity bug, that does not initialize inspector member variables properly. This seems to be triggered by certain window layout configurations. Resetting the editor layout should help, let me know otherwise.


RE: Softbody Surface blueprint seems to fail at generation - Snail921 - 10-08-2021

That was it.
Resetting the layout solved the issue.

Thank you so much for the quick and solid help.