Esempio n. 1
0
        private void SetParams(Object targetAsset, AssetReferenceInfo assetReferenceInfo)
        {
            this.targetAsset = targetAsset;

            referenceInfo = assetReferenceInfo != null ? new ReferenceInfo(assetReferenceInfo) : null;

            displayType    = DisplayType.Asset;
            scrollPosition = Vector2.zero;
        }
Esempio n. 2
0
        //----- property -----

        //----- method -----

        public static void Open(Object targetAsset, AssetReferenceInfo assetReferenceInfo)
        {
            if (!IsExist)
            {
                Instance.titleContent = new GUIContent("Find References In Project");
                Instance.Show();
            }

            Instance.SetParams(targetAsset, assetReferenceInfo);
        }
Esempio n. 3
0
            //----- method -----

            internal TargetAssetInfo(Object target, string path, string fullPath)
            {
                this.guid = GetGuid(fullPath);
                this.AssetReferenceInfo = new AssetReferenceInfo(path, target);

                // DLLでMonoScriptだったらDLLの中のコンポーネントなのでfileIDを取り出す.
                if (path.EndsWith(".dll") && target is MonoScript)
                {
                    fileId = LocalIdentifierInFile.Get(target).ToString();
                }
            }
Esempio n. 4
0
            public ReferenceInfo(AssetReferenceInfo info)
            {
                TargetPath   = info.TargetPath;
                Target       = info.Target;
                Object       = AssetDatabase.LoadAssetAtPath(info.TargetPath, typeof(Object));
                Dependencies = new Dictionary <string, Object>();

                foreach (var item in info.Dependencies)
                {
                    Dependencies.Add(item, AssetDatabase.LoadAssetAtPath(item, typeof(Object)));
                }
            }