블로그 이미지
Every unexpected event is a path to learning for you. blueasa

카테고리

분류 전체보기 (2795)
Unity3D (852)
Programming (478)
Server (33)
Unreal (4)
Gamebryo (56)
Tip & Tech (185)
협업 (61)
3DS Max (3)
Game (12)
Utility (68)
Etc (98)
Link (32)
Portfolio (19)
Subject (90)
iOS,OSX (55)
Android (14)
Linux (5)
잉여 프로젝트 (2)
게임이야기 (3)
Memories (20)
Interest (38)
Thinking (38)
한글 (30)
PaperCraft (5)
Animation (408)
Wallpaper (2)
재테크 (18)
Exercise (3)
나만의 맛집 (3)
냥이 (10)
육아 (16)
Total
Today
Yesterday

[상황]

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

 

반응형
Posted by blueasa
, |

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 search providers to the Quick Search Tool (see API section below), by default we ship with these SearchProviders:

Assets

All assets in the current project are available for search. From an asset you can apply the following actions:

  • Select the asset (in the Project browser)
  • Open the asset (using an external editor if necessary)
  • Show in Explorer (Finder)

Asset provider supports advance type filtering (Similar to Project Hierarchy):

Current Scene

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!

Settings

Each Project Settings or Preferences pages is available for search. The Quick Search Tool will open the Unified Settings Window at the required pages.

Online Search Providers

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:

Keyboard Navigation

All the features of the Quick Search tool can be access using the keyboard:

  • The Search box is always focused and you can type even with an element selected.
  • Alt + Left Arrow : Toggle the Filter view
    • Using Up Arrow, Down Arrow in the Filter view cycle between filters.
    • Using spacebar toggle a filter

  • Alt + Right Arrow brings the action menu

  • Alt + Up Arrow or Alt + Down Arrow navigate through the search history:

Filters

There are 2 levels of filtering available in the Quick Search Tool:

Provider filters

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:

  • Alt + Shit + A : Assets only search
  • Alt + Shit + M : Menu only search
  • Alt + Shit + S : Scene only search

Provider text filters

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:

  • Asset: p:
  • Menu: me:
  • Scene: h:
  • Online Search: web:

Example of queries using text providers:

  • p:Player : Search assets containing "Player"
  • h:Main Camera : Search scene for GameObjects with "Main Camera" in their name
  • me:Test Runner : Search menus item for Test Runner
  • se:VFX : Search settings (project and preferences) for VFX

Provider specific filters

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:

Drag and Drop

Asset items and Scene Items supports drag and drop from the QuickSearch window to anywhere that supports it (hierarchy view, game view, inspector, etc):

API

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.

SearchProvider

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.

Registering an SearchProvider

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).

Asynchronous Search Results

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:

  • com.unity.quicksearch/Editor/Providers/Examples/AssetStoreProvider.cs : which provide a way to query the asset store using WebRequest.
  • com.unity.quicksearch/Editor/Providers/Examples/ESS.cs: which creates a thread to start the EntrianSource search indexer to provide full text search for assets in your project.

Registering an Action Handler

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.

SearchService

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

 

반응형

'Unity3D > Plugins' 카테고리의 다른 글

[링크] 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
Posted by blueasa
, |

[링크] https://ms-dev.tistory.com/104

 

[flutter] GoogleAppMeasurement requires CocoaPods version >= 1.10.2, which is not satisfied by your current version, 1.10.1. Err

해당 프로젝트의 ios의 pod를 업데이트 해주면 해결된다. [해결방법] 터미널을 열고 아래 명령을 순서대로 입력한다. 1) 해당 프로젝트의 ios 경로로 이동 #> cd [프로젝트 경로]/ios 2) pod 업데이트 실

ms-dev.tistory.com

 

반응형
Posted by blueasa
, |

이전에 메시지로 문자를 분명히 받았는데 보이지도 않고 검색해도 안나와서 알아보다보니 버그인 것 같다.

아래 참조 링크 2개를 참조했는데 iOS 버전이 달라져서인지 메뉴가 좀 다른 것 같아서 스크린샷 포함해서 올려 둔다.

 

[확인한 아이폰 iOS 버전] iOS 15.3

 

1) 설정-Siri 및 검색

2) 'Siri야' 듣기, 측면 버튼 눌러서 Siri 사용 : 끄기

3) 설정-Siri 및 검색-(화면 아래로 내려서)메시지

4) 제안 부분 모두 끄기

5) 아이폰 껐다 켠다(재부팅)

   ※ 요즘 폰은 홈+볼륨업 버튼 3초정도 누르고 있으면 끄는 메뉴 뜸

6) 위의 1)~4)에서 껐던 걸 다시 켠다.

7) 메시지 앱 들어가서 예전꺼 검색해본다.

8) 검색에서 잘 나옴

 

 

[참조1] http://treorsi.egloos.com/6444509

 

아이폰 문자 검색 문제 해결 방법

아이폰에서 문자 검색 기능이 안 될 때 해결하는 방법을 알려드리도록 하겠습니다. 아이폰에서는 문자(메시지) 목록에서 검색 기능을 제공하고 있습니다. 찾고 싶은 대화가 있을 경우 상단에 있

treorsi.egloos.com

 

[참조2] https://theqoo.net/square/1212283079

 

혹시 아이폰에서 예전 문자 검색 잘 안되는 덬들에게 팁.txt - 스퀘어 카테고리

https://img.theqoo.net/DFskG 문자 검색시 단어 넣어도 분명히 더 많은 문자가 있을텐데 최근꺼밖에 검색 안돼서 답답했었는데, 이거 했더니 2014년 메시지까지 다 검색돼서... 묵은 체증이 확 달아난 느

theqoo.net

 

반응형
Posted by blueasa
, |

[링크] UniTask

Unity3D/Plugins / 2022. 1. 11. 16:21

[링크] https://openupm.com/packages/com.cysharp.unitask/

 

📦 UniTask - com.cysharp.unitask

 

openupm.com

 

반응형

'Unity3D > Plugins' 카테고리의 다른 글

[링크] Localization(AppName)  (0) 2022.04.05
[Package] Unity Quick Search  (0) 2022.02.18
[펌] Unity Timers  (0) 2021.10.20
[펌] Unity Bezier Solution  (0) 2021.10.12
[에셋] I2 Localization(Android/iOS app_name Localization)  (0) 2021.02.25
Posted by blueasa
, |

[추가]

[Fixed] iOS: Fixed game objects' colors in light mode. (1379817)

2020.3.27f1 버전에서 해당 이슈가 수정되었다.

 

--------------------------------------------------------------------------------------------------------

Unity 2020.3.21f1에서 Unity 2020.3.22f1으로 업데이트 하고나니 Android는 문제없는데, iOS에서 기존에 발생하지 않던 쉐이더 문제가 생겼다.

 

[증상] 기존에 검은 느낌이던 텍스쳐가 약간 회색빛이 나옴

아래 이미지에서 A이던 느낌이 B느낌이 남

그래서 Unity 2020.3.21f1으로 내리니 다시 정상동작 하는걸 확인했다.

링크 내용을 보니 iOS Dark Mode 관련 버그라고 한다.

 

현재 임시로 해결하는 방법은 iOS Info.plist에서 강제로 Dark Mode로 셋팅 하는 방법이 있다고 한다.

 

버그가 수정될 때까지 Dark Mode로 셋팅하거나, Unity 2020.3.21f1 이하 버전을 사용해야 될 것 같다.

 

 

 

[Unity 소스상에서 Info.plist 수정]

var projectPath = pathToBuiltProject + "/Unity-iPhone.xcodeproj/project.pbxproj";
var plistPath = System.IO.Path.Combine(pathToBuiltProject, "Info.plist");
var plist = new PlistDocument();
plist.ReadFromFile(plistPath);

// [iOS15+Unity2020.3.22f1 이슈] Force Dark Mode(Automatic/Light/Dark) - Appearance
plist.root.SetString("UIUserInterfaceStyle", "Dark");

 

 

 

[Info.plist 수정 참조 링크] https://stackoverflow.com/questions/56537855/is-it-possible-to-opt-out-of-dark-mode-on-ios-13/64015200

 

Is it possible to opt-out of dark mode on iOS 13?

A large part of my app consists of web views to provide functionality not yet available through native implementations. The web team has no plans to implement a dark theme for the website. As such,...

stackoverflow.com

 

 

 

[출처] https://stackoverflow.com/questions/70239569/unity-shader-glitches-according-to-the-dark-mode-on-ios-15

 

Unity shader glitches according to the Dark Mode on iOS 15

I'm using a shader (code below) which allows me to turn an image color into a grayscale (with transparency if needed). Everything was perfect until I updated my device to iOS 15. Since that update,...

stackoverflow.com

 

반응형
Posted by blueasa
, |

[링크] https://novemberfirst.tistory.com/90

 

[Unity] Device Simulator를 Package Manager에서 찾을 수 없을 때

2020.3 버전을 다운받았다. 너무 오랜만에 켜서 이것저것 찾아보다가 Device Simulator라는 기능을 써보고 싶어 추가하려는데 난 도저히 찾을 수 없었다. 그러다가 발견했다. Edit >Project Settings > Package M

novemberfirst.tistory.com

 

[참조] https://skuld2000.tistory.com/79

 

[Unity] 유니티에 새로 추가되는 디바이스 시뮬레이터(Device Simulator) 소개

1. 유니티 디바이스 시뮬레이터 (Unity Device Simulator) 유니티 디바이스 시뮬레이터(Unity Device Simulator)는 유니티 에디터에서 개발중인 게임을 실행했을 때 Game 윈도우에서 실행되는 대신 Game XCode 나..

skuld2000.tistory.com

 

반응형
Posted by blueasa
, |

[링크] https://82looks.com/how-to-interlock-trello-gant-chart/

 

트렐로 간트 차트 연동하는 4가지 방법

트렐로 간트 차트 사용하는 방법에 대해 알아보려고 합니다. 트렐로 작업 관리 서비스는 직관적인 인터페이스로 단순한 기능들을 효과적으로 이용할 수 있습니다. 이는 기본적으로 무료로 제공

82looks.com

 

반응형
Posted by blueasa
, |

[링크] https://github.com/unity3d-jp/UnityChanToonShaderVer2_Project

 

GitHub - unity3d-jp/UnityChanToonShaderVer2_Project: UnityChanToonShaderVer2 Project / v.2.0.8 Release

UnityChanToonShaderVer2 Project / v.2.0.8 Release. Contribute to unity3d-jp/UnityChanToonShaderVer2_Project development by creating an account on GitHub.

github.com

 

반응형
Posted by blueasa
, |

The saved objects are handled on the native side, and there is no way I know of to hook into that side of Unity.


As an aside, here's an example of using an extension to track such a quality:

I would create a an extension for Object which stores all saved objects, something like this:

  1. public static class ObjectExtension {
  2.  
  3. private static List<Object> savedObjects = new List<Object>();
  4.  
  5. public static void DontDestroyOnLoad(this Object obj){
  6. savedObjects.Add(obj);
  7. Object.DontDestroyOnLoad(obj);
  8. }
  9.  
  10. public static void Destory(this Object obj){
  11. savedObjects.Remove(obj);
  12. Destory(obj);
  13. }
  14.  
  15. public static List<Objects> GetSavedObjects(){
  16. return new List<Objects>(savedObjects);
  17. }
  18. }
  19.  

Now, to save the object you'll have to use this.DontDestroyOnLoad(); instead of the normal DontDestroyOnLoad(this);

EDIT:

I started looking into this and found that setting a GameObject's hideflags to HideFlags.DontSave means (as far as I can tell) the same thing as DontDestroyOnLoad, except that none of Unity's functions (Update, etc.) are called. The one with hideflags might also leak if not destroyed manually...

Finding GameObjects with its hideFlags set to DontSave is trivial.

 

 

 

[출처] https://answers.unity.com/questions/544886/find-objects-with-dontdestroyonload.html

 

Find objects with DontDestroyOnLoad - Unity Answers

 

answers.unity.com

 

반응형
Posted by blueasa
, |