Esempio n. 1
0
            string GetBundlePath(Object obj)
            {
                var assetPath  = AssetDatabase.GetAssetPath(obj);
                var bundleName = AssetImporter.GetAtPath(assetPath).assetBundleName;

                if (!string.IsNullOrEmpty(bundleName))
                {
                    return(Bundles.CreateBundlePath(bundleName, assetPath));
                }
                else
                {
                    return(null);
                }
            }
Esempio n. 2
0
            void Update(Object obj)
            {
                _object = obj;
                var bundleName = AssetImporter.GetAtPath(AssetDatabase.GetAssetPath(_object)).assetBundleName;

                if (EditorAssetUtil.IsResource(_object))
                {
                    _path = EditorAssetUtil.GetResourcePath(_object);
                }
                else if (!string.IsNullOrEmpty(bundleName))
                {
                    _path = Bundles.CreateBundlePath(bundleName, _object.name);
                }
                else
                {
                    _path = string.Empty;
                }
            }