Skip to content

Transfer Function Editor window not loading #279

Open
@AuxiliaryPanther

Description

@AuxiliaryPanther

Accidentally closed previous issue. More information for this issue shows it as a GUI issue with the transfer function window.

Repro:

  • Unity 6 (6000.0.35f1)
  • Tried both UnityVolumeRendering-2020.3+ and UnityVolumeRendering-2019 (R2024.4)
  1. Import DICOM files using your documentation
  2. Select model in scene
  3. Open Inspector
  4. Note: I have to manually add the component Volume Rendered Object for each model.
  5. Select any Render Mode
  6. Select any Transfer Function Type
  7. Click "Edit transfer function"
  8. TransferFunctionEditorWindow appears completely empty for any combination of render mode and TF type.
  9. Then the following two error messages appear 6 times each every second in Console, starting with the following:

ERROR 1:
NullReferenceException: Object reference not set to an instance of an object
UnityVolumeRendering.TransferFunctionEditor.DrawOnGUI (UnityEngine.Rect rect) (at Assets/UnityVolumeRendering/Assets/Scripts/GUI/IMGUI/TransferFunctionEditor.cs:64)
UnityVolumeRendering.TransferFunctionEditorWindow.OnGUI () (at Assets/UnityVolumeRendering/Assets/Editor/TransferFunctionEditorWindow.cs:66)
UnityEditor.HostView.InvokeOnGUI (UnityEngine.Rect onGUIPosition) (at <2f9d421960d84dffaa88793de0f4b5f3>:0)
UnityEditor.DockArea.DrawView (UnityEngine.Rect dockAreaRect) (at <2f9d421960d84dffaa88793de0f4b5f3>:0)
UnityEditor.DockArea.OldOnGUI () (at <2f9d421960d84dffaa88793de0f4b5f3>: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 :0)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)

ERROR 2:
NullReferenceException: Object reference not set to an instance of an object
UnityVolumeRendering.TransferFunctionEditor.DrawOnGUI (UnityEngine.Rect rect) (at Assets/UnityVolumeRendering/Assets/Scripts/GUI/IMGUI/TransferFunctionEditor.cs:64)
UnityVolumeRendering.TransferFunctionEditorWindow.OnGUI () (at Assets/UnityVolumeRendering/Assets/Editor/TransferFunctionEditorWindow.cs:66)
UnityEditor.HostView.InvokeOnGUI (UnityEngine.Rect onGUIPosition) (at <2f9d421960d84dffaa88793de0f4b5f3>:0)
UnityEditor.DockArea.DrawView (UnityEngine.Rect dockAreaRect) (at <2f9d421960d84dffaa88793de0f4b5f3>:0)
UnityEditor.DockArea.OldOnGUI () (at <2f9d421960d84dffaa88793de0f4b5f3>: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 :0)
UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, UnityEngine.Matrix4x4 worldTransform, UnityEngine.Rect clippingRect, System.Action onGUIHandler, System.Boolean canAffectFocus) (at :0)
UnityEngine.UIElements.IMGUIContainer.DoIMGUIRepaint () (at :0)
UnityEngine.UIElements.UIR.RenderChainCommand.ExecuteNonDrawMesh (UnityEngine.UIElements.UIR.DrawParams drawParams, System.Single pixelsPerPoint, System.Exception& immediateException) (at :0)
Rethrow as ImmediateModeException
UnityEngine.UIElements.UIR.RenderChain.Render () (at :0)
UnityEngine.UIElements.UIRRepaintUpdater.Render () (at :0)
UnityEngine.UIElements.BaseVisualElementPanel.Render () (at :0)
UnityEngine.UIElements.Panel.Render () (at :0)
UnityEditor.UIElements.EditorPanel.Render () (at <440ef95092dc402283338101458784af>:0)
UnityEngine.UIElements.UIElementsUtility.DoDispatch (UnityEngine.UIElements.BaseVisualElementPanel panel) (at :0)
UnityEngine.UIElements.UIElementsUtility.UnityEngine.UIElements.IUIElementsUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr, System.Boolean& eventHandled) (at :0)
UnityEngine.UIElements.UIEventRegistration.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at :0)
UnityEngine.UIElements.UIEventRegistration+<>c.<.cctor>b__1_2 (System.Int32 i, System.IntPtr ptr) (at :0)
UnityEngine.GUIUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr, System.Boolean& result) (at <597a8f11f7f6488b9a0d0f6e0dc59248>:0)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions