Closed MostHated closed 1 year ago
Please clarify if I misunderstand, but it sounds like the issue that you are having is more on the com.unity.quicksearch
side, rather than goql
?
Well, the issue is with (GoQLSearchProvider.cs). So, I guess technically it is less an issue with goql itself, and more of an issue with how goql is being used in conjunction with QuickSearch's SearchProvider apis. Though, I had assumed it would be considered a goql issue, as the SearchProvider is included with this package. Is that not the case in this instance?
Well, the issue is with (GoQLSearchProvider.cs).
Please let me clarify.
Are you trying to improve the existing GoQLSearchProvider.cs
, but are currently having problems with how to integrate it better with com.unity.quick-search
?
My apologies, I somehow missed your reply.
The main reason for having created this issue is to provide feedback based on my attempt to use the search provider. I wanted to bring attention to some aspects of the search provider that I felt were important, but missing or returned unexpected results compared to how other default search provider implementations functioned. I was demonstrating some of the changes I had made, which I felt made it operate more in line with how other providers worked, in hopes that similar changes might be able to be implemented into the GoQL search provider to enhance its usability. The main one being that most other search providers, if you have a SearchItem object and you call the .toObject() method, it returns the actual object, but the toObject implementation seems to be missing. So if you use the GoQL search provider to search for a GameObject, there was no way I could find currently to actually obtain that GameObject from the search results (when using the search results via code).
(when using the search results via code).
Could you please share us your code so that we can understand the problem ?
Closing due to non-activity. Feel free to reopen when necessary.
Hey there, I have ran into a few issues attempting to use goql as a provider for the Search system. The one that gave me trouble first was that "toObject" is missing from the provider. I had to copy/paste it into a new provider and give it the ID "com.unity.goqlcustom" (why such a long provider id? Most are a letter, or 4, simply goql: would be much more inline and easier to type and use).
At first I tried to add it in the most basic manner:
I added it to the following location https://github.com/Unity-Technologies/com.unity.selection-groups/blob/5a5421b5c48cd528569741a0dbea7fad3cea5d36/GoQL/Editor/GoQLSearchProvider.cs#L56
But then I noticed that when I tried to actually use it in a TableView I was building, and trying to get the name from the toObject call using a SearchSelector for creating a column/header and populating the column with the name of the object, the names I was getting back from the gameobject didn't match the actual path that was coming back in the description field. The description was right, as was the object that was selected when clicking on an entry in the list, but the name kept coming back as a completely different object (ones that didn't even match the search query).
So I went back to the provider and changed the label field to instead return the gameobject name as the path that was returned via the description field was already fine with me:
After this change, and using the label field in my table, it was displaying the proper name:
Thanks, -MH