[링크] [Redis] Redis Desktop Manager 설치 및 테스트
'Server' 카테고리의 다른 글
[링크] Windows10에 XAMPP 설치 & 사용하기 (Apache, MySql, PHP) (0) | 2022.03.30 |
---|---|
[링크] DATABASE (0) | 2022.03.23 |
[링크] Install Docker on Windows (WSL) without Docker Desktop (0) | 2022.03.22 |
[링크] Windows10에 XAMPP 설치 & 사용하기 (Apache, MySql, PHP) (0) | 2022.03.30 |
---|---|
[링크] DATABASE (0) | 2022.03.23 |
[링크] Install Docker on Windows (WSL) without Docker Desktop (0) | 2022.03.22 |
[링크] https://dev.to/bowmanjd/install-docker-on-windows-wsl-without-docker-desktop-34m9
Install Docker on Windows (WSL) without Docker Desktop
Windows Subsystem for Linux 2 sports an actual Linux kernel, supporting real Linux containers and Doc...
dev.to
[링크] Windows10에 XAMPP 설치 & 사용하기 (Apache, MySql, PHP) (0) | 2022.03.30 |
---|---|
[링크] DATABASE (0) | 2022.03.23 |
[링크] [Redis] Redis Desktop Manager 설치 및 테스트 (0) | 2022.03.23 |
[링크] https://blog.naver.com/nieah914/221815212859
mysql Workbench 사용법
안녕하세요 피드백맨입니다. 요즘 다양한 개발들을 진행하면서 어떻게든 내돈을 안들이면서 무료로 플랫폼...
blog.naver.com
[링크] C# 에서 Mysql연동하기 (insert, select) (0) | 2022.03.30 |
---|---|
[링크] [Mysql] Dump 관련 내용 (mysql dump) (0) | 2022.03.30 |
[링크] [excel] Mysql for Excel 사용해보기 (0) | 2022.03.24 |
[링크] MySQL 마이그레이션 (0) | 2022.03.23 |
[링크] 윈도우 10 Mysql 설치하기 (mysql 개발환경 세팅) (0) | 2022.03.22 |
[링크] https://vmpo.tistory.com/82
윈도우 10 Mysql 설치하기 (mysql 개발환경 세팅)
윈도우10에서 mysql을 설치해보도록 하겠습니다. 아래 웹사이트로 접속하면 최신버전 mysql install 파일을 확인할 수 있습니다. https://dev.mysql.com/downloads/installer/ MySQL :: Download MySQL Installer..
vmpo.tistory.com
[링크] C# 에서 Mysql연동하기 (insert, select) (0) | 2022.03.30 |
---|---|
[링크] [Mysql] Dump 관련 내용 (mysql dump) (0) | 2022.03.30 |
[링크] [excel] Mysql for Excel 사용해보기 (0) | 2022.03.24 |
[링크] MySQL 마이그레이션 (0) | 2022.03.23 |
[링크] MySql Workbench 사용법 (0) | 2022.03.22 |
[요약] 솔루션(sln) 파일을 vs2019에서 vs2022로 변경하기 위해 찾아봄
[방법]
1) 솔루션(sln)파일을 에디터로 열어서 원하는 버전으로 수정
- 나는 글쓰는 시점 기준 17.1.358.51495로 수정함
- vs2022는 17버전임. 세부 버전은 VS 실행해서 '도움말-Microsoft Visual Studio 정보'에서 세부 버전 확인
2) 솔루션(sln) 파일 연결 프로그램은 'Microsft Visual Studio Version Selector'로 변경.
3) 더블클릭해서 실행해본다.
- 혹시나 잘안되면 .vs 폴더 삭제 후 다시 더블클릭
---------------------------------------
Welcome to Microsoft Q&A!
You can open the sln file of the project, for example, using Visual Studio Code.
This is a partial screenshot of two sln files, the upper one was created by Visual Studio 2019, and the lower one was created by Visual Studio 2022.
Visual Studio 2019:
Visual Studio 2022:
"# Visual Studio Version 16"
The major version of Visual Studio that (most recently) saved this solution file. This information controls the version number in the solution icon.
VisualStudioVersion = 16.0.28701.123
The full version of Visual Studio that (most recently) saved the solution file. If the solution file is saved by a newer version of Visual Studio that has the same major version, this value is not updated so as to lessen churn in the file.
You can modify these two version numbers.
As an example, I modified the version number of the sln file created by VS2019:
Double click the sln file, it will open in VS2020.
You can refer to Solution (.sln) file.
Upgrading sln to Open With Visual Studio 2022 Community - Microsoft Q&A
docs.microsoft.com
[Tips] '원하지 않는 namespace가 자동으로 추가 될 때' 끄는 법 (0) | 2023.02.07 |
---|---|
[링크][VS 삽질] Visual Studio 설치 속도가 너무 느릴 때 (0) | 2022.07.13 |
[Visual Studio] 현재 소스 새 창에서 열기(복제) (0) | 2016.11.10 |
[VS 확장프로그램] PowerMode (0) | 2016.04.28 |
[TD 2015] Visual Studio를 사용하는 비주얼 개발자를 위한 Tips & Tricks (No Slide, All Demo!) (0) | 2015.12.17 |
----------------------------------------------------
Unity 2020.3.27f1
Xcode 13.2.1
FBAEMKit 12.2.1
FBSDKCoreKit 12.2.1
FBSDKCoreKit_Basics 12.2.1
FBSDKLoginKit 12.2.1
GoogleMobileAds 6.1.2
GoogleMobileAds-FacebookUnityAdapter-3.6.0
----------------------------------------------------
회사 플랫폼에서 Firebase Auth를 쓰면서 FBSDK(12.2.1) framework 가 들어가게 됐는데,
여기서 광고를 쓰기 위해 GoogleMoblieAds(6.1.2)를 추가하고,
페이스북 광고를쓰기위해 GoogleMobileAds의 미디에이션인 FacebookUnityAdapter(3.6.0)을 추가했는데..
Android는 잘되는데 iOS에서 에러 남.
플러그인 추가 진행 상황은 아래와 같다.
----------------------------------------------------
1) 플랫폼 SDK 추가하면서 FBSDK(12.2.1) 추가
1.1)Plugins/iOS에 프레임워크 추가 돼 있음(FBAEMKit.framework/FBSDKCoreKit.framework/FBSDKCoreKit_Basics.framework/FBSDKLoginKit.framework)
2) GoogleMobileAds(6.1.2) 추가 -> 빌드 잘 됨
3) GoogleMobileAds-FacebookUnityAdapter(3.6.0) 추가 -> 빌드 에러
3.1) [에러메시지] Undefined Symbols for architecture arm64: "_OBJC_CLASS_$_GAD...
3.2) [해결방법] Unity Editor-Menu-External Dependency Manager-iOS Resolver-Settings : Link frameworks statically <- 체크
3.3) [참조] https://blueasa.tistory.com/2587
4) 3) 해결 후, 빌드는 되는데 런타임에서 에러 남 -> 런타임 에러
4.1) [에러메시지] Library not loaded: @rpath/FBAEMKit.framework...
4.1.1) [추천] 4.2.4 방식 먼저 시도
4.2.) [해결방법] 구글링 하다보니 아래와 같은 내용이 있음.
4.2.1) General->Frameworks, Library, and Embedded Content. If it's "Do Not Embed", change to "Embed Without Signing"
(참조: https://stackoverflow.com/questions/58144104/xcode11-dyld-library-not-loaded-reason-image-not-found)
4.2.2) 빌드하고 수정하긴 그래서 XcodePostProcessor.cs에 아래 내용을 추가함.
(처음엔 weak 파라미터를 false로 추가해봤었는데 여전히 런타임 에러 남)
[추가소스]
/// Initialize PbxProject
var projectPath = pathToBuiltProject + "/Unity-iPhone.xcodeproj/project.pbxproj";
PBXProject pbxProject = new PBXProject();
pbxProject.ReadFromFile(projectPath);
string targetGuid = pbxProject.GetUnityFrameworkTargetGuid();
// 플랫폼 SDK에서 아래 4개 프레임워크를 추가해놔서 여기서도 4개 추가시킴
pbxProject.AddFrameworkToProject(targetGuid, "FBAEMKit.framework", true); // weak 부분을 true로 넘김
pbxProject.AddFrameworkToProject(targetGuid, "FBSDKCoreKit.framework", true);
pbxProject.AddFrameworkToProject(targetGuid, "FBSDKCoreKit_Basics.framework", true);
pbxProject.AddFrameworkToProject(targetGuid, "FBSDKLoginKit.framework", true);
4.2.3) 위의 4.2.2) 방법이 안된다면 (스크립트로 프레임워크 추가를 안하고) 직접 넣어도 됨
직접 넣는 건 아래 링크에서 원하는 버전의 FacebookSDK-Static_XCFramework를 다운받아서 추가.
(iOS는 받아서 압축풀어보면 여러개의 폴더가 나오는데 ios-arm64(또는 ios-arm64_armv7) 폴더를 사용하면 된다)
[링크] https://github.com/facebook/facebook-ios-sdk/releases
Releases · facebook/facebook-ios-sdk
Used to integrate the Facebook Platform with your iOS & tvOS apps. - facebook/facebook-ios-sdk
github.com
4.2.3.1) static 프레임워크 추가하고 Undefined symbol: _vDSP 에러가 나면 Accelerate.framework도 추가하자.
[참조] https://minmong.tistory.com/242
페이스북 sdk 빌드 에러 iOS Facebook SDK Static Framework build error
지난 번에 Facebook 심사를 위한 앱검수 얘기를 했었는데요. 페이스북 권한을 사용하는 컨텐츠를 동영상으로 촬영해야 된다고 말씀드렸습니다. 그리고 iOS의 경우는 시뮬레이터 빌드를 준비해야
minmong.tistory.com
4.2.4) 최근(2023-05-10)에 FacebookSDK 버전을 올리려고 확인 해보면서 FacebookSDK_Dynamic.xcframework를 적용해봤는데 이걸로 해도 잘되는 것 같다.
4.2.4.1) FacebookSDK_Dynamic.xcframework 추가
4.2.4.2) 기존 Dependencies.xml은 버전 맞춰 주기(난 15.0.0으로 맞춤)
[참조] <iosPod name="FBSDKLoginKit" version="15.0.0" minTargetSdk="12.0"> </iosPod>
5) 4)까지 하고 빌드하니 런타임에서도 에러 안나고 잘 됨. -> 빌드 잘 됨
6) 빌드 성공!
[첨언]
결론적으로 GoogleMobileAds가 Static Framework을 강제(Link frameworks statically)하면서 생기는 문제로 보인다.
결국 GoogleMobileAds를 사용해야 된다면 dynamic framework 추가 방식은 불가능하므로, Facebook 관련 SDK 소스를 직접 추가(4.2.3)하는게 맞는 것 같다.
[Model] 캐릭터가 카메라 가까울 때 일부가 렌더링 안되는 문제 (0) | 2022.04.18 |
---|---|
[Mac] Unable to find command line tool python required for Firebase Android resource generation. (0) | 2022.03.31 |
[CS0433] 'Task' 형식이 'Unity.Tasks, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' 및 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'에 모두 있습니다. (0) | 2022.02.21 |
[Error] CS1069: The type name 'NavMeshAgent' could not be found in the namespace 'UnityEngine.AI'. (0) | 2021.08.17 |
[펌] Unexpected character encountered while parsing value: . Path '', line 0, position 0. (0) | 2021.08.12 |
Unity 2020.3.27f1
GoogleMobileAds-v6.1.2
GoogleMobileAds-FacebookUnityAdapter-3.6.0
[에러메시지]
Undefined Symbols for architecture arm64: "_OBJC_CLASS_$_GAD...
[해결방법]
Unity Editor-Menu-External Dependency Manager-iOS Resolver-Settings : Link frameworks statically 체크
[참조] https://newreleases.io/project/github/googleads/googleads-mobile-unity/release/v6.0.0
- [GooglemobileAds 6.0.0] You need to enable "Link frameworks statically" in Unity Editor -> Assets -> External Dependency Manager -> iOS Resolver -> Settings, or else the GMA plugin does not work.
-----------------------------------------------------------------------------------------------------
[펌]
Unityで開発したアプリをiOSでビルドした際に出たエラーの対処法がわかりづらかったのでメモ。
Xcodeでビルドした際に以下のエラーが出ました。
ld: warning: Could not find or use auto-linked framework 'AVFAudio'
Undefined symbols for architecture arm64:
"_OBJC_CLASS_$_GADMediaView", referenced from:
objc-class-ref in AppLovinMediationGoogleAdapter(ALGoogleMediationAdapter.o)
"_OBJC_CLASS_$_GADRequest", referenced from:
objc-class-ref in AppLovinMediationGoogleAdapter(ALGoogleMediationAdapter.o)
"_OBJC_CLASS_$_GADNativeAdImageAdLoaderOptions", referenced from:
objc-class-ref in AppLovinMediationGoogleAdapter(ALGoogleMediationAdapter.o)
"_OBJC_CLASS_$_GADNativeAdViewAdOptions", referenced from:
objc-class-ref in AppLovinMediationGoogleAdapter(ALGoogleMediationAdapter.o)
"_OBJC_CLASS_$_GADBannerView", referenced from:
objc-class-ref in AppLovinMediationGoogleAdapter(ALGoogleMediationAdapter.o)
"_OBJC_CLASS_$_GADInterstitialAd", referenced from:
objc-class-ref in AppLovinMediationGoogleAdapter(ALGoogleMediationAdapter.o)
"_OBJC_CLASS_$_GADNativeAdView", referenced from:
objc-class-ref in AppLovinMediationGoogleAdapter(ALGoogleMediationAdapter.o)
"_kGADAdSizeMediumRectangle", referenced from:
-[ALGoogleMediationAdapter adSizeFromAdFormat:withServerParameters:] in AppLovinMediationGoogleAdapter(ALGoogleMediationAdapter.o)
"_OBJC_CLASS_$_GADMobileAds", referenced from:
objc-class-ref in AppLovinMediationGoogleAdapter(ALGoogleMediationAdapter.o)
"_kGADAdSizeLeaderboard", referenced from:
-[ALGoogleMediationAdapter adSizeFromAdFormat:withServerParameters:] in AppLovinMediationGoogleAdapter(ALGoogleMediationAdapter.o)
"_OBJC_CLASS_$_GADAdLoader", referenced from:
objc-class-ref in AppLovinMediationGoogleAdapter(ALGoogleMediationAdapter.o)
"_GADCurrentOrientationAnchoredAdaptiveBannerAdSizeWithWidth", referenced from:
-[ALGoogleMediationAdapter adSizeFromAdFormat:withServerParameters:] in AppLovinMediationGoogleAdapter(ALGoogleMediationAdapter.o)
+[ALGoogleMediationAdapter currentOrientationAchoredAdaptiveBannerSizeWithWidth:] in AppLovinMediationGoogleAdapter(ALGoogleMediationAdapter.o)
"_OBJC_CLASS_$_GADQueryInfo", referenced from:
objc-class-ref in AppLovinMediationGoogleAdapter(ALGoogleMediationAdapter.o)
"_OBJC_CLASS_$_GADExtras", referenced from:
objc-class-ref in AppLovinMediationGoogleAdapter(ALGoogleMediationAdapter.o)
"_kGADAdSizeBanner", referenced from:
-[ALGoogleMediationAdapter adSizeFromAdFormat:withServerParameters:] in AppLovinMediationGoogleAdapter(ALGoogleMediationAdapter.o)
"_OBJC_CLASS_$_GADRewardedAd", referenced from:
objc-class-ref in AppLovinMediationGoogleAdapter(ALGoogleMediationAdapter.o)
"_kGADAdLoaderAdTypeNative", referenced from:
-[ALGoogleMediationAdapter loadAdViewAdForParameters:adFormat:andNotify:] in AppLovinMediationGoogleAdapter(ALGoogleMediationAdapter.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
このエラーの厄介なところは、具体的にどんな対処をすればいいのかわからない点です。この部分でエラーが出ているよってことがわかればなおせますが、複数の要因により出ていると思われるエラーは修正することで泥沼にいっちゃうこともあるので慎重に対処するのが大事かなと思います。
僕の環境では以下の方法で解決できました。(具体的なエラー原因がまだわかっていないので、上記のエラーが出た場合の対処法の一つ程度だと思ってもらえれば幸いです)
上記の方法でエラーが解消されました。
最近結構出るエラーなので、また発生したら今回のメモを参考にしたいと思います。
お知らせ
謎解き推理ゲーム「イラスト探偵」を最近リリースしました!
もしよろしければダウンロードお願い致します!
[출처] https://develop.hateblo.jp/entry/unity-ios-error-build-arm64
Unity【iOS】「Undefined symbols for architecture arm64: _OBJC_CLASS_$_GADMediaView」エラーの対処法に関するメ
Unityで開発したアプリをiOSでビルドした際に出たエラーの対処法がわかりづらかったのでメモ。Xcodeでビルドした際に以下のエラーが出ました。ld: warning: Could not find or use auto-linked framework 'AVFAu
develop.hateblo.jp
[iOS] SKANErrorDomain:SKANErrorUnknown (value 10) (0) | 2022.06.10 |
---|---|
[링크] Cycle in dependencies between targets ... (0) | 2022.03.28 |
[링크] GoogleAppMeasurement requires CocoaPods version >= 1.10.2, which is not satisfied by your current version, 1.10.1. (0) | 2022.02.16 |
[펌] Unity shader glitches according to the Dark Mode on iOS 15 (0) | 2021.12.23 |
[Link][XCode] Unity-iPhone has Conflicting Provisioning Settings 오류 (0) | 2021.10.15 |
[상황]
Firebase 8.8.0-RemoteConfig 추가하고 연동하면서 에러 발생
[에러 메시지]
오류 CS0433 'Task' 형식이 'Unity.Tasks, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' 및 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'에 모두 있습니다.
[해결방법]
/Parse/Plugins 아래에서 안쓰는 버전의 Unity.Compat, Unity.Tasks 제거
(.NET 4.x 버전을 쓰고 있어서 .NET 3.5 버전 Unity.Compat, Unity.Tasks 제거함)
[참조] https://drehzr.tistory.com/1080
문제해결)error CS0012: The type `System.Threading.Tasks.Task' is defined in an assembly that is not referenced. Consider add
error CS0012: The type `System.Threading.Tasks.Task' is defined in an assembly that is not referenced. Consider adding a reference to assembly 그전의 Firebase 패키지를 처리하는 도..
drehzr.tistory.com
[Mac] Unable to find command line tool python required for Firebase Android resource generation. (0) | 2022.03.31 |
---|---|
[iOS/RuntimeError] Library not loaded: @rpath/FBAEMKit.framework (0) | 2022.03.02 |
[Error] CS1069: The type name 'NavMeshAgent' could not be found in the namespace 'UnityEngine.AI'. (0) | 2021.08.17 |
[펌] Unexpected character encountered while parsing value: . Path '', line 0, position 0. (0) | 2021.08.12 |
[Crash/Android] Caused by java.lang.Error signal 11 (SIGSEGV), code 1 (SEGV_MAPERR) (0) | 2021.07.06 |
Search anything in Unity.
Using the shortcut Alt + ' or the Help -> Quick Search menu will bring out the Quick Search Tool. This extensible tool allows you to search over multiple area of Unity.
It is easy to add new search providers to the Quick Search Tool (see API section below), by default we ship with these SearchProviders:
All assets in the current project are available for search. From an asset you can apply the following actions:
Asset provider supports advance type filtering (Similar to Project Hierarchy):
All GameObjects in the current scene are available for search. Activating a scene item in the Quick Search tool will select the corresponding GameObject in the Scene.
Each menu items in Unity is available for search. You can execute the menu item from the Quick Search Tool. This is especially useful to pop that elusive Test Runner or the Profiler!
Each Project Settings or Preferences pages is available for search. The Quick Search Tool will open the Unified Settings Window at the required pages.
We have a SearchProvider that allows to search various Unity websites. Using this provider will open your default browser at a specific Unity page and perform a search and display some results. You can search the following websites and it is very easy to add new web search providers:
All the features of the Quick Search tool can be access using the keyboard:
There are 2 levels of filtering available in the Quick Search Tool:
Those filters define which providers are available for a search. This can help reduce the amount of items return by a search query especially if you know what type of item you are looking for.
Note that there are more specialized shortcuts to call the Quick Search Tool with a specific provider filter enabled:
From the Quick Search Box you can type a search provider search filter token that will restrain the search to specific providers. The search tokens are:
Example of queries using text providers:
Some provider (i.e the Asset provider) supports specific filters:
As usual you can pass the same search tokens used by the project browser to a search query:
When opening the Quick Search Tool using Alt + ` the state (and filters) of your previous search is preserved:
Asset items and Scene Items supports drag and drop from the QuickSearch window to anywhere that supports it (hierarchy view, game view, inspector, etc):
Creating new SearchProvider is fairly easy. It basically comes down to providing a function to fetch and search for items and to provide action handlers to activate any selected item.
An SearchProvider manages search for specific type of items and manages thumbnails, description and subfilters. Its basic API is as follow:
public class SearchProvider
{
public SearchProvider(string id, string displayName = null);
// Create an Item bound to this provider.
public SearchItem CreateItem(string id, string label = null, string description = null, Texture2D thumbnail = null);
// Utility functions use to check if a search text matches a string.
public static bool MatchSearchGroups(string searchContext, string content);
public static bool MatchSearchGroups(string searchContext, string content, out int startIndex, out int endIndex);
public NameId name;
// Text filter key use to enable this Provider from the NameId search box
public string filterId;
// Functor used to fetch item description
public DescriptionHandler fetchDescription;
// Functor used to fetch thumbnail icon
public PreviewHandler fetchThumbnail;
// Functor used to execute a search query
public GetItemsHandler fetchItems;
// Functor use to check if an item is still valid
public IsItemValidHandler isItemValid;
// Sub filter specific to this provider
public List<NameId> subCategories;
// Called when QuickSearchWindow is opened allowing a provider to initialize search data.
public Action onEnable;
// Called when QuickSearchWindow is closed.
public Action onDisable;
}
Note that since the UI of the NameId is done using a virtual scrolling algorithm some SearchItem fields (thumbail and description) are fetched on demand. This means the SearchProvider needs to be initialized with specific Handlers (fetchDescription, fetchThumbnail) if you want to populate those fields.
Adding a new SearchProvider is just creating a function tagged with the [SearchItemProvider] attribute. This function must returns a new SearchProvider instance:
[SearchItemProvider]
internal static SearchProvider CreateProvider()
{
return new SearchProvider(type, displayName)
{
filterId = "me:",
fetchItems = (context, items, provider) =>
{
var itemNames = new List<string>();
var shortcuts = new List<string>();
GetMenuInfo(itemNames, shortcuts);
items.AddRange(itemNames.Where(menuName =>
SearchProvider.MatchSearchGroups(context.searchText, menuName))
.Select(menuName => provider.CreateItem(menuName, Path.GetFileName(menuName), menuName)));
},
fetchThumbnail = (item, context) => Icons.shortcut
};
}
By default an SearchProvider must have a type (ex: asset, menu, scene...) that is unique among providers and a display Name (used in the Provider filter dialog).
Specifying a filterId is optional but it makes text based filtering easier (ex: p: my_asset).
The bulk of the provider work happens in the fetchItems functor. This is the function a provider creator must fulfill to do an actual search (and filtering). The fetchItems signature is:
// context: all the necessary search context (tokenized search, sub filters...)
// items: list of items to populate
// provider: the provider itself
public delegate void GetItemsHandler(SearchContext context, List<SearchItem> items, SearchProvider provider);
The SearchProvider must add new SearchItems to the items list.
An SearchItem is a simple struct:
public struct SearchItem
{
// Unique id of this item among this provider items.
public string id;
// Display name of the item
public string label;
// If no description is provided, SearchProvider.fetchDescription will be called when the item is first displayed.
public string description;
// If no thumbnail are provider, SearchProvider.fetchThumbnail will be called when the item is first displayed.
public Texture2D thumbnail;
}
Only the id is necessary to be filled.
When doing filtering according to SearchContext.searchText we recommend using the static function SearchProvider.MatchSearchGroup which makes partial search (and eventually fuzzy search) easy (see example above).
If your search providers can take a long time to compute its results or rely on asynchronous search engine (ex: WebRequests) you can use the context.sendAsyncItems callback to populate search results asynchronously.
The SearchContext also contains a searchId that needs to be provided with the call to sendAsyncItems. This allows QuickSearch to know for which search those results are provided.
An example of using asynchronous search result would be:
new SearchProvider(type, displayName)
{
filterId = "store:",
fetchItems = (context, items, provider) =>
{
var currentSearchRequest = UnityWebRequest.Get(url + context.searchQuery);
currentSearchRequest.SetRequestHeader("X-Unity-Session", InternalEditorUtility.GetAuthToken());
var currentSearchRequestOp = currentSearchRequest.SendWebRequest();
currentSearchRequestOp.completed += op => {
var items = // GetItems from websearch
// Notify the search about async items:
// ensure to set the searchId you are providing result for!
context.sendAsyncItems(context.searchId, items);
};
}
};
The QuickSearch package contains 2 examples with async results:
Actions can be register for a specific provider. These actions buttons will be drawn next to the SearchItem of the specified provider type:
Since registering an action handler is a different process than regisering a provider this means you can register new action handlers for existing providers (mind blown)!
Here is an example of how to register actions for the Asset provider:
[SearchActionsProvider]
internal static IEnumerable<SearchAction> ActionHandlers()
{
return new[]
{
new SearchAction("asset", "select", Icons.@goto, "Select asset...")
{
handler = (item, context) =>
{
var asset = AssetDatabase.LoadAssetAtPath<Object>(item.id);
if (asset != null)
{
Selection.activeObject = asset;
EditorGUIUtility.PingObject(asset);
EditorWindow.FocusWindowIfItsOpen(Utils.GetProjectBrowserWindowType());
}
}
},
new SearchAction("asset", "open", SearchIcon.open, "Open asset... (Alt+Enter)")
{
handler = (item, context) =>
{
var asset = AssetDatabase.LoadAssetAtPath<Object>(item.id);
if (asset != null) AssetDatabase.OpenAsset(asset);
}
},
new SearchAction("asset", "reveal", SearchIcon.folder, "Show in Explorer")
{
handler = (item, context) =>
{
EditorUtility.RevealInFinder(item.id);
}
}
};
}
Basically you create a function tagged with the [SearchActionsProvider] attribute. This function must returns an IEnumerable<SearchAction>.
An SearchAction describe and action and provide a handler to execute the action on a specific SearchItem
public class SearchAction
{
public SearchAction(string providerType, string name, Texture2D icon = null, string tooltip = null);
public ActionHandler handler;
public EnabledHandler isEnabled;
}
providerType is the provider unique id for which you are registering the action.
ActionHandler is of the following signature:
// item: item that needs the action to be executed.
// context: search context of the SearchTool when the item is executed.
public delegate void ActionHandler(SearchItem item, SearchContext context);
An action can be setup with a isEnabled predicate that will decide if the action is available (i.e. enabled) for a specific item.
The SearchService manages most of the persisted state of the Quick Search Tool and provider a global end point to access the filter.
The common usage of the SearchService forSearchProvider writer is to register a shortcut that will open the Quick Search Tool with a specific set of filter enabled:
[Shortcut("Window/Quick Search Tool/Assets", KeyCode.A, ShortcutModifiers.Alt | ShortcutModifiers.Shift)]
public static void PopQuickSearch()
{
// Disable all filter
SearchService.Filter.ResetFilter(false);
// Enabled only the asset SearchProvider
SearchService.Filter.SetFilter(true, "asset");
// Disabled the packages sub filter
SearchService.Filter.SetFilter(false, "asset", "a:packages");
// Open the Quick Search Tool to allow a quick search of assets!
SearchTool.ShowWindow();
}
[출처] https://docs.unity3d.com/Packages/com.unity.quicksearch@1.0/manual/index.html
Unity Quick Search | Package Manager UI website
Unity Quick Search Search anything in Unity. Search Providers Using the shortcut Alt + ' or the Help -> Quick Search menu will bring out the Quick Search Tool. This extensible tool allows you to search over multiple area of Unity. It is easy to add new sea
docs.unity3d.com
[링크] Game Package Manager for Unity (by NHN) (0) | 2022.05.11 |
---|---|
[링크] Localization(AppName) (0) | 2022.04.05 |
[링크] UniTask (0) | 2022.01.11 |
[펌] Unity Timers (0) | 2021.10.20 |
[펌] Unity Bezier Solution (0) | 2021.10.12 |