AssetUtils
public static class AssetUtilsNo description is available for this type.
Methods
Section titled “Methods”
IsPrefab(string)
Section titled “IsPrefab(string)”public static bool IsPrefab(string mainFile)No description is available for this member.
Parameters
| Name | Type | Description |
|---|---|---|
mainFile |
System.String |
Returns
System.Boolean — No return description is available.
CanAddToScene(string)
Section titled “CanAddToScene(string)”public static bool CanAddToScene(string mainFile)No description is available for this member.
Parameters
| Name | Type | Description |
|---|---|---|
mainFile |
System.String |
Returns
System.Boolean — No return description is available.
AddToScene(string)
Section titled “AddToScene(string)”public static void AddToScene(string projectPath)No description is available for this member.
Parameters
| Name | Type | Description |
|---|---|---|
projectPath |
System.String | |
AddToScene(string, Vector3, Transform)
Section titled “AddToScene(string, Vector3, Transform)”public static void AddToScene(string projectPath, Vector3 worldPosition, Transform parentTransform = null)No description is available for this member.
Parameters
| Name | Type | Description |
|---|---|---|
projectPath |
System.String | |
worldPosition |
UnityEngine.Vector3 | |
parentTransform |
UnityEngine.Transform | |
GetProjectRoot()
Section titled “GetProjectRoot()”public static string GetProjectRoot()No description is available for this member.
Returns
System.String — No return description is available.
IsAssetDatabasePath(string, bool)
Section titled “IsAssetDatabasePath(string, bool)”public static bool IsAssetDatabasePath(string path, bool allowPackages = true)No description is available for this member.
Parameters
| Name | Type | Description |
|---|---|---|
path |
System.String | |
allowPackages |
System.Boolean |
Returns
System.Boolean — No return description is available.
GetAssetDatabasePath(string, bool)
Section titled “GetAssetDatabasePath(string, bool)”public static string GetAssetDatabasePath(string path, bool allowPackages = true)No description is available for this member.
Parameters
| Name | Type | Description |
|---|---|---|
path |
System.String | |
allowPackages |
System.Boolean |
Returns
System.String — No return description is available.
AddProjectRoot(string)
Section titled “AddProjectRoot(string)”public static string AddProjectRoot(string path)No description is available for this member.
Parameters
| Name | Type | Description |
|---|---|---|
path |
System.String |
Returns
System.String — No return description is available.
RemoveProjectRoot(string)
Section titled “RemoveProjectRoot(string)”public static string RemoveProjectRoot(string path)No description is available for this member.
Parameters
| Name | Type | Description |
|---|---|---|
path |
System.String |
Returns
System.String — No return description is available.
RemoveLODGroups(string)
Section titled “RemoveLODGroups(string)”public static void RemoveLODGroups(string path)No description is available for this member.
Parameters
| Name | Type | Description |
|---|---|---|
path |
System.String | |
GetPageCount(int, int)
Section titled “GetPageCount(int, int)”public static int GetPageCount(int resultCount, int maxResults)No description is available for this member.
Parameters
| Name | Type | Description |
|---|---|---|
resultCount |
System.Int32 | |
maxResults |
System.Int32 |
Returns
System.Int32 — No return description is available.
ClearCache()
Section titled “ClearCache()”public static void ClearCache()No description is available for this member.
RemoveMissingScripts(Transform)
Section titled “RemoveMissingScripts(Transform)”public static int RemoveMissingScripts(this Transform obj)No description is available for this member.
Parameters
| Name | Type | Description |
|---|---|---|
obj |
UnityEngine.Transform |
Returns
System.Int32 — No return description is available.
LoadAudioFromFile(string, bool)
Section titled “LoadAudioFromFile(string, bool)”public static Task<AudioClip> LoadAudioFromFile(string filePath, bool allowStreaming = true)Loads an audio file from disk. Uses streaming by default for better performance.
Parameters
| Name | Type | Description |
|---|---|---|
filePath |
System.String | Path to the audio file |
allowStreaming |
System.Boolean | If true, uses streaming for better performance. Set to false if you need to access raw sample data with GetData(). |
Returns
System.Threading.Tasks.Task{UnityEngine.AudioClip} — No return description is available.
LoadTextures(List, CancellationToken, Action<int, Texture2D>)
Section titled “LoadTextures(List, CancellationToken, Action<int, Texture2D>)”public static void LoadTextures(List<AssetInfo> infos, CancellationToken ct, Action<int, Texture2D> callback = null)No description is available for this member.
Parameters
| Name | Type | Description |
|---|---|---|
infos |
System.Collections.Generic.List{AssetInventory.AssetInfo} | |
ct |
System.Threading.CancellationToken | |
callback |
System.Action{System.Int32,UnityEngine.Texture2D} | |
LoadPackageTexture(AssetInfo, bool)
Section titled “LoadPackageTexture(AssetInfo, bool)”public static Task LoadPackageTexture(AssetInfo info, bool useCache = true)No description is available for this member.
Parameters
| Name | Type | Description |
|---|---|---|
info |
AssetInventory.AssetInfo | |
useCache |
System.Boolean |
Returns
System.Threading.Tasks.Task — No return description is available.
RemoveFromPreviewCache(string)
Section titled “RemoveFromPreviewCache(string)”public static void RemoveFromPreviewCache(string file)No description is available for this member.
Parameters
| Name | Type | Description |
|---|---|---|
file |
System.String | |
LoadLocalTexture(string, bool, int, bool)
Section titled “LoadLocalTexture(string, bool, int, bool)”public static Task<Texture2D> LoadLocalTexture(string file, bool useCache, int upscale = 0, bool upscaleIsMax = false)No description is available for this member.
Parameters
| Name | Type | Description |
|---|---|---|
file |
System.String | |
useCache |
System.Boolean | |
upscale |
System.Int32 | |
upscaleIsMax |
System.Boolean |
Returns
System.Threading.Tasks.Task{UnityEngine.Texture2D} — No return description is available.
FetchAPIData(string, string, string, string, string, Action, int, Action, bool, string)
Section titled “FetchAPIData(string, string, string, string, string, Action, int, Action, bool, string)”public static Task<T> FetchAPIData<T>(string uri, string method = "GET", string postContent = null, string token = null, string etag = null, Action<string> eTagCallback = null, int retries = 1, Action<long> responseIssueCodeCallback = null, bool suppressErrors = false, string postType = "application/json")No description is available for this member.
Parameters
| Name | Type | Description |
|---|---|---|
uri |
System.String | |
method |
System.String | |
postContent |
System.String | |
token |
System.String | |
etag |
System.String | |
eTagCallback |
System.Action{System.String} | |
retries |
System.Int32 | |
responseIssueCodeCallback |
System.Action{System.Int64} | |
suppressErrors |
System.Boolean | |
postType |
System.String |
Returns
System.Threading.Tasks.Task{{T}} — No return description is available.
LoadImageAsync(string, string)
Section titled “LoadImageAsync(string, string)”public static Task LoadImageAsync(string imageUrl, string targetFile)No description is available for this member.
Parameters
| Name | Type | Description |
|---|---|---|
imageUrl |
System.String | |
targetFile |
System.String |
Returns
System.Threading.Tasks.Task — No return description is available.
IsMp3File(string)
Section titled “IsMp3File(string)”public static bool IsMp3File(string filePath)No description is available for this member.
Parameters
| Name | Type | Description |
|---|---|---|
filePath |
System.String |
Returns
System.Boolean — No return description is available.
GuessSafeName(string, string)
Section titled “GuessSafeName(string, string)”public static string GuessSafeName(string name, string replacement = "")No description is available for this member.
Parameters
| Name | Type | Description |
|---|---|---|
name |
System.String | |
replacement |
System.String |
Returns
System.String — No return description is available.
Guids2Files(List, bool, List, HashSet)
Section titled “Guids2Files(List, bool, List, HashSet)”public static Dictionary<string, List<AssetInfo>> Guids2Files(List<string> guids, bool returnOriginIfNotFound = false, List<int> excludeIds = null, HashSet<string> guidsWithOrigin = null)No description is available for this member.
Parameters
| Name | Type | Description |
|---|---|---|
guids |
System.Collections.Generic.List{System.String} | |
returnOriginIfNotFound |
System.Boolean | |
excludeIds |
System.Collections.Generic.List{System.Int32} | |
guidsWithOrigin |
System.Collections.Generic.HashSet{System.String} |
Returns
System.Collections.Generic.Dictionary{System.String,System.Collections.Generic.List{AssetInventory.AssetInfo}} — No return description is available.
ExtractGuidFromFile(string)
Section titled “ExtractGuidFromFile(string)”public static string ExtractGuidFromFile(string path)No description is available for this member.
Parameters
| Name | Type | Description |
|---|---|---|
path |
System.String |
Returns
System.String — No return description is available.
UpdateGuidInMetaFile(string, string)
Section titled “UpdateGuidInMetaFile(string, string)”public static bool UpdateGuidInMetaFile(string metaPath, string newGuid)No description is available for this member.
Parameters
| Name | Type | Description |
|---|---|---|
metaPath |
System.String | |
newGuid |
System.String |
Returns
System.Boolean — No return description is available.
IsOnURP()
Section titled “IsOnURP()”public static bool IsOnURP()No description is available for this member.
Returns
System.Boolean — No return description is available.
IsOnHDRP()
Section titled “IsOnHDRP()”public static bool IsOnHDRP()No description is available for this member.
Returns
System.Boolean — No return description is available.
IsPackageCompatibleWithCurrentSRP(AssetInfo)
Section titled “IsPackageCompatibleWithCurrentSRP(AssetInfo)”public static bool IsPackageCompatibleWithCurrentSRP(AssetInfo asset)Checks if a package is compatible with the current project’s render pipeline. Package-level flags: URPCompatible, HDRPCompatible, BIRPCompatible.
Parameters
| Name | Type | Description |
|---|---|---|
asset |
AssetInventory.AssetInfo | Asset/package to check |
Returns
System.Boolean — True if package is compatible with current render pipeline
FilterIncompatibleSRPPackages(List)
Section titled “FilterIncompatibleSRPPackages(List)”public static void FilterIncompatibleSRPPackages(List<AssetInfo> files)Filters out files from render pipeline support packages that are incompatible with the current project’s render pipeline. For BIRP projects, removes all URP and HDRP support packages. For URP projects, removes HDRP-only support packages. For HDRP projects, removes URP-only support packages.
Parameters
| Name | Type | Description |
|---|---|---|
files |
System.Collections.Generic.List{AssetInventory.AssetInfo} | List of AssetInfo files to filter |
GetURPVersion()
Section titled “GetURPVersion()”public static string GetURPVersion()No description is available for this member.
Returns
System.String — No return description is available.
GetHDRPVersion()
Section titled “GetHDRPVersion()”public static string GetHDRPVersion()No description is available for this member.
Returns
System.String — No return description is available.
IsUnityProject(string)
Section titled “IsUnityProject(string)”public static bool IsUnityProject(string folder)No description is available for this member.
Parameters
| Name | Type | Description |
|---|---|---|
folder |
System.String |
Returns
System.Boolean — No return description is available.
ShouldBeBIRPCompatible(string)
Section titled “ShouldBeBIRPCompatible(string)”public static bool ShouldBeBIRPCompatible(string assetName)No description is available for this member.
Parameters
| Name | Type | Description |
|---|---|---|
assetName |
System.String |
Returns
System.Boolean — No return description is available.
ShouldBeURPCompatible(string)
Section titled “ShouldBeURPCompatible(string)”public static bool ShouldBeURPCompatible(string assetName)No description is available for this member.
Parameters
| Name | Type | Description |
|---|---|---|
assetName |
System.String |
Returns
System.Boolean — No return description is available.
ShouldBeHDRPCompatible(string)
Section titled “ShouldBeHDRPCompatible(string)”public static bool ShouldBeHDRPCompatible(string assetName)No description is available for this member.
Parameters
| Name | Type | Description |
|---|---|---|
assetName |
System.String |
Returns
System.Boolean — No return description is available.
CreateUVs(int, int)
Section titled “CreateUVs(int, int)”public static List<Rect> CreateUVs(int columns, int rows)No description is available for this member.
Parameters
| Name | Type | Description |
|---|---|---|
columns |
System.Int32 | |
rows |
System.Int32 |
Returns
System.Collections.Generic.List{UnityEngine.Rect} — No return description is available.
ExtractFrame(Texture2D, Rect)
Section titled “ExtractFrame(Texture2D, Rect)”public static Texture2D ExtractFrame(Texture2D sourceTexture, Rect uvRect)No description is available for this member.
Parameters
| Name | Type | Description |
|---|---|---|
sourceTexture |
UnityEngine.Texture2D | |
uvRect |
UnityEngine.Rect |
Returns
UnityEngine.Texture2D — No return description is available.
ConvertBinaryToYaml(string, string)
Section titled “ConvertBinaryToYaml(string, string)”public static bool ConvertBinaryToYaml(string binaryPath, string targetPath)Converts a binary serialized Unity file to YAML text format.
Parameters
| Name | Type | Description |
|---|---|---|
binaryPath |
System.String | Path to the binary serialized file |
targetPath |
System.String | Target path for the YAML text file |
Returns
System.Boolean — True if conversion succeeded, false otherwise