forked from MattRix/UnityDecompiled
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAssetStoreToolUtils.cs
More file actions
27 lines (27 loc) · 827 Bytes
/
Copy pathAssetStoreToolUtils.cs
File metadata and controls
27 lines (27 loc) · 827 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
using System;
using System.Runtime.CompilerServices;
using UnityEditor;
using UnityEngine;
namespace UnityEditorInternal
{
public sealed class AssetStoreToolUtils
{
[WrapperlessIcall]
[MethodImpl(MethodImplOptions.InternalCall)]
public static extern bool BuildAssetStoreAssetBundle(UnityEngine.Object targetObject, string targetPath);
public static bool PreviewAssetStoreAssetBundleInInspector(AssetBundle bundle, AssetStoreAsset info)
{
info.id = 0;
info.previewAsset = bundle.mainAsset;
AssetStoreAssetSelection.Clear();
AssetStoreAssetSelection.AddAssetInternal(info);
Selection.activeObject = AssetStoreAssetInspector.Instance;
AssetStoreAssetInspector.Instance.Repaint();
return true;
}
public static void UpdatePreloadingInternal()
{
AssetStoreUtils.UpdatePreloading();
}
}
}