UnityRef is currently in early development. Some features may be incomplete and/or not functioning.

UNITYREF

Your Pit Stop For Solving ANYTHING in Unity

editor

[SearchWindow] Custom ulong ScriptableObject Data Formatting Unlocked

Under Audit

scriptable objectsoptimization

Unity 2022.3.x - Unity 6.x

Published Thu, Mar 26

The Search window lacks direct support for creating custom column formatters to display ulong properties as formatted strings from ScriptableObject assets.

Issue

 The Search window offers robust capabilities for viewing ScriptableObjects. However, extending its display functionality to include custom column formatters for specific data types, such as ulong properties, is not readily apparent. When a ulong field contains several bits of packed data, there is a need to transform this ulong into a readable string for display within the Search window. The current implementation does not provide a direct method to add a custom option to the column formatting menu, preventing developers from creating a simple custom formatter that can receive a ulong and convert it to a string for immediate display in the Search window's columns.

Experimental Fixes
  • Create a custom EditorWindow to display your ScriptableObjects, where you can implement unique column rendering for complex ulong properties.
  • Pre-process the ulong data into a readable string format and store it in a dedicated string field within your ScriptableObjects, allowing it to be displayed by default Search window columns.

Editor's Note:

The above fixes have not been verified by our audit team yet. They are provided exclusively for your own technical research. We recommend creating a backup of your project before proceeding with any attempts. Utilize at your own discretion!

Related Posts Haven't quite found a solution to your problem? We think these posts might help you.

Content inspired by a Unity discussion post.