private static string GetGUIDFromType(Type type)
        {
#if UNITY_EDITOR
            return(AssetSearcher.GetClassGUID(type));
#else
            return(string.Empty);
#endif
        }
Exemplo n.º 2
0
        private void SearchSpriteFileClick(object sender, RoutedEventArgs e)
        {
            assetSearcher = new AssetSearcher(EFileType.SPRITE, SpriteFileButtonClick);

            window = new Window
            {
                Title   = "Select Asset",
                Content = assetSearcher,
                Height  = 450,
                Width   = 330,
            };
            window.ShowDialog();
        }
        private void ReportObjectsWithMissingValue()
        {
#if UNITY_EDITOR
            var foundObjects = AssetSearcher.FindObjectsWithValue(nameof(TypeNameAndAssembly), TypeNameAndAssembly);
            Debug.Log("The value is set in the following objects:");

            foreach (FoundObject foundObject in foundObjects)
            {
                var details = foundObject
                              .Select(detail => $"{detail.Key}: {detail.Value}");

                Debug.Log($"[{foundObject.Type}] {string.Join(", ", details)}");
            }
#endif
        }