[SearchWindow] Custom ulong ScriptableObject Data Formatting Unlocked
Under Audit
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.
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.
- Create a custom
EditorWindowto display yourScriptableObjects, where you can implement unique column rendering for complex ulong properties. - Pre-process the ulong data into a readable
stringformat and store it in a dedicatedstringfield within yourScriptableObjects, allowing it to be displayed by defaultSearch windowcolumns.
Editor's Note:
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.