Skip to content

UdonToolkit Drag and Drop Error #93

Description

@DjShinter

UdonToolkit Drag and Drop not working as intended.

Reproduction Steps:

  1. Create an Udon Script call it ExampleCode (can be named anything just an example), edit the script and replace it with
using UdonSharp;
using UnityEngine;

public class ExampleCode : UdonSharpBehaviour
{
    [SerializeField] private GameObject[] example;
}
  1. Change your Udon Sharp Default Behaviour Editor to UdonToolKit Editor if you haven't already.

  2. Create a game object and add Udon Behaviour and add the newly made script to it.

  3. Drag multiple game objects to the example array you just made.

Results: Error on Unity
Reproduction Rate: 10/10

Error Log

RefreshInfo: RefreshV2(ForceSynchronousImport)
RefreshProfiler: Total: 49.740ms
	InvokeBeforeRefreshCallbacks: 0.216ms
	ApplyChangesToAssetFolders: 0.043ms
	WriteModifiedImportersToTextMetaFiles: 0.000ms
	CleanLegacyArtifacts: 0.000ms
	Scan: 42.251ms
	OnSourceAssetsModified: 0.000ms
	UnregisterDeletedAssets: 0.000ms
	InitializeImportedAssetsSnapshot: 3.630ms
	GetAllGuidsForCategorization: 0.000ms
	CategorizeAssets: 0.000ms
	ImportAndPostprocessOutOfDateAssets: 0.000ms (0.000ms without children)
		ImportManagerImport: 0.000ms (0.000ms without children)
			ImportInProcess: 0.000ms
			ImportOutOfProcess: 0.000ms
			UpdateCategorizedAssets: 0.000ms
			RemoteAssetCacheGetArtifact: 0.000ms (0.000ms without children)
				RemoteAssetCacheResolve: 0.000ms
				RemoteAssetCacheDownloadFile: 0.000ms
		CompileScripts: 0.000ms
		PostProcessAllAssets: 0.000ms
		ReloadImportedAssets: 0.000ms
		VerifyAssetsAreUpToDateAndCorrect: 0.000ms
		EnsureUptoDateAssetsAreRegisteredWithGuidPM: 0.000ms
		InitializingProgressBar: 0.000ms
		PostProcessAllAssetNotificationsAddChangedAssets: 0.000ms
		OnDemandSchedulerStart: 0.000ms
		RestoreLoadedAssetsState: 0.000ms
	InvokeProjectHasChanged: 0.000ms
	UpdateImportedAssetsSnapshot: 0.000ms
	ReloadSourceAssets: 0.000ms
	UnloadImportedAssets: 0.000ms
	Hotreload: 0.076ms
	FixTempGuids: 0.004ms
	VerifyGuidPMRegistrations: 0.000ms
	GatherAllCurrentPrimaryArtifactRevisions: 0.347ms
	UnloadStreamsBegin: 0.040ms
	LoadedImportedAssetsSnapshotReleaseGCHandles: 0.727ms
	GetLoadedSourceAssetsSnapshot: 0.990ms
	PersistCurrentRevisions: 0.000ms
	UnloadStreamsEnd: 0.025ms
	GenerateScriptTypeHashes: 0.000ms
	Untracked: 1.392ms
NullReferenceException: Object reference not set to an instance of an object
  at UdonToolkit.UTEditorArray.HandleDragAndDrop (UnityEngine.Rect position, UnityEditor.SerializedObject obj, System.Collections.Generic.List`1[T] props) [0x00083] in F:\Unity\UdonProject\Assets\UdonToolkit\Internals\Editor\UTEditorArray.cs:76 
  at UdonToolkit.UTEditor.HandleListView (System.Collections.Generic.List`1[T] listViewFields, System.Collections.Generic.KeyValuePair`2[TKey,TValue] fieldEntry) [0x001f1] in F:\Unity\UdonProject\Assets\UdonToolkit\Internals\Editor\UTListViewHandler.cs:127 
  at UdonToolkit.UTEditor.HandleFields (System.Collections.Generic.Dictionary`2[TKey,TValue] fields) [0x00300] in F:\Unity\UdonProject\Assets\UdonToolkit\Internals\Editor\UTEditorFieldHandling.cs:72 
  at UdonToolkit.UTEditor.DrawGUI () [0x00001] in F:\Unity\UdonProject\Assets\UdonToolkit\Internals\Editor\UTEditor.cs:243 
  at UdonToolkit.UTEditor.OnInspectorGUI () [0x004cf] in F:\Unity\UdonProject\Assets\UdonToolkit\Internals\Editor\UTEditor.cs:184 
  at UdonSharpEditor.UdonBehaviourOverrideEditor.OnInspectorGUI () [0x00189] in F:\Unity\UdonProject\Assets\UdonSharp\Editor\Editors\UdonSharpBehaviourEditor.cs:507 
  at UnityEditor.UIElements.InspectorElement+<>c__DisplayClass58_0.<CreateIMGUIInspectorFromEditor>b__0 () [0x00280] in <a259d3c004024353a2c217da97495055>:0 
UnityEngine.DebugLogHandler:Internal_LogException(Exception, Object)
UnityEngine.DebugLogHandler:LogException(Exception, Object)
UnityEngine.Logger:LogException(Exception, Object)
UnityEngine.Debug:LogException(Exception)
UnityEditor.UIElements.<>c__DisplayClass58_0:<CreateIMGUIInspectorFromEditor>b__0()
UnityEngine.UIElements.IMGUIContainer:DoOnGUI(Event, Matrix4x4, Rect, Boolean, Rect, Action, Boolean)
UnityEngine.UIElements.IMGUIContainer:HandleIMGUIEvent(Event, Matrix4x4, Rect, Action, Boolean)
UnityEngine.UIElements.IMGUIContainer:HandleIMGUIEvent(Event, Action, Boolean)
UnityEngine.UIElements.IMGUIContainer:HandleIMGUIEvent(Event, Boolean)
UnityEngine.UIElements.IMGUIContainer:SendEventToIMGUI(EventBase, Boolean)
UnityEngine.UIElements.IMGUIContainer:HandleEvent(EventBase)
UnityEngine.UIElements.EventDispatchUtilities:PropagateEvent(EventBase)
UnityEngine.UIElements.MouseEventDispatchingStrategy:DispatchEvent(EventBase, IPanel)
UnityEngine.UIElements.EventDispatcher:ApplyDispatchingStrategies(EventBase, IPanel, Boolean)
UnityEngine.UIElements.EventDispatcher:ProcessEvent(EventBase, IPanel)
UnityEngine.UIElements.EventDispatcher:Dispatch(EventBase, IPanel, DispatchMode)
UnityEngine.UIElements.BaseVisualElementPanel:SendEvent(EventBase, DispatchMode)
UnityEngine.UIElements.UIElementsUtility:DoDispatch(BaseVisualElementPanel)
UnityEngine.UIElements.UIElementsUtility:ProcessEvent(Int32, IntPtr)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
 
(Filename: Assets/UdonToolkit/Internals/Editor/UTEditorArray.cs Line: 76)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions