Class EditorAssetManager
Provides asset management for Editor.
Methods
InstanceIDToObject(int instanceID)
Translates an instance ID to a reference to an UnityEngine.Object.
public static Object InstanceIDToObject(int instanceID)
AssetsPathToFullPath(string relativeAssetsPath, [bool normalized = true])
Converts the relativeAssetsPath to a full path.
public static string AssetsPathToFullPath(string relativeAssetsPath, [bool normalized = true])
ProjectPathToFullPath(string relativeProjectPath, [bool normalized = true])
Converts the relativeProjectPath to a full path.
public static string ProjectPathToFullPath(string relativeProjectPath, [bool normalized = true])
FullPathToProjectPath(string fullPath, [bool normalized = true])
Converts the fullPath to a path relative to project.
public static string FullPathToProjectPath(string fullPath, [bool normalized = true])
OpenAsset(string relativeProjectPath)
Opens the asset located at the specified relative project path in Editor.
public static bool OpenAsset(string relativeProjectPath)
CreateAsset<T>(string relativeProjectDirectory, string name, [bool refresh = true])
Create a asset of type T.
public static T CreateAsset<T>(string relativeProjectDirectory, string name, [bool refresh = true])
CreateAsset<T>(string relativeProjectPath, [bool refresh = true])
public static T CreateAsset<T>(string relativeProjectPath, [bool refresh = true])
CreateAsset(Object instance, string relativeProjectDirectory, string name, [bool refresh = true])
Create a asset of instance.
public static void CreateAsset(Object instance, string relativeProjectDirectory, string name, [bool refresh = true])
CreateAsset(Object instance, string relativeProjectPath, [bool refresh = true])
public static void CreateAsset(Object instance, string relativeProjectPath, [bool refresh = true])
CreateDirectory(string relativeProjectDirectory, [bool refresh = true])
Create directory relativeProjectDirectory.
public static void CreateDirectory(string relativeProjectDirectory, [bool refresh = true])
LoadAsset<T>(string relativeProjectPath)
Load asset from relativeProjectPath.
public static T LoadAsset<T>(string relativeProjectPath)
LoadAssetByGUID<T>(string guid)
Load asset by guid.
public static T LoadAssetByGUID<T>(string guid)
LoadMesh(string relativeProjectPath)
public static Mesh LoadMesh(string relativeProjectPath)
LoadShader(string relativeProjectPath)
public static Shader LoadShader(string relativeProjectPath)
LoadTexture(string relativeProjectPath)
public static Texture LoadTexture(string relativeProjectPath)
LoadMaterial(string relativeProjectPath)
public static Material LoadMaterial(string relativeProjectPath)
LoadPrefab(string relativeProjectPath)
public static GameObject LoadPrefab(string relativeProjectPath)
LoadAudioClip(string relativeProjectPath)
public static AudioClip LoadAudioClip(string relativeProjectPath)
LoadTextAsset(string relativeProjectPath)
public static TextAsset LoadTextAsset(string relativeProjectPath)
LoadVideoClip(string relativeProjectPath)
public static VideoClip LoadVideoClip(string relativeProjectPath)
LoadAudioMixer(string relativeProjectPath)
public static AudioMixer LoadAudioMixer(string relativeProjectPath)
LoadComputeShader(string relativeProjectPath)
public static ComputeShader LoadComputeShader(string relativeProjectPath)
LoadAnimationClip(string relativeProjectPath)
public static AnimationClip LoadAnimationClip(string relativeProjectPath)
LoadPhysicsMaterial(string relativeProjectPath)
public static PhysicsMaterial LoadPhysicsMaterial(string relativeProjectPath)
ClonePrefab(GameObject prefab, [bool linkToPrefabAsset = false])
instantiate prefab.
public static GameObject ClonePrefab(GameObject prefab, [bool linkToPrefabAsset = false])
LoadPrefabAndClone(string relativeProjectPath, [bool linkToPrefabAsset = false])
Load and instantiate prefab.
public static GameObject LoadPrefabAndClone(string relativeProjectPath, [bool linkToPrefabAsset = false])
PingAsset(string relativeProjectPath)
Ping assset relativeProjectPath.
public static void PingAsset(string relativeProjectPath)
DeleteAsset(string relativeProjectPath, [bool refresh = true])
Delete asset/folder.
public static bool DeleteAsset(string relativeProjectPath, [bool refresh = true])
Exists(string relativeProjectPath)
Does the given relativeProjectPath exist?
public static bool Exists(string relativeProjectPath)
ExistsDirectory(string relativeProjectPath)
Does the given directory relativeProjectPath exist?
public static bool ExistsDirectory(string relativeProjectPath)
GetAssetPath(Object assetObject)
Get path of assetObject.
public static string GetAssetPath(Object assetObject)
GetAssetGUID(Object assetObject)
Get GUID of assetObject.
public static string GetAssetGUID(Object assetObject)
GetAssetDirectory(Object assetObject)
Get directory where assetObject is located.
public static string GetAssetDirectory(Object assetObject)
GetAssetPathsAtPath<T>(string relativeProjectPath)
Get the paths of all assets of type T from path relativeProjectPath.
public static IEnumerable<string> GetAssetPathsAtPath<T>(string relativeProjectPath)
ImportAsset(string relativeProjectPath)
Import asset.
public static void ImportAsset(string relativeProjectPath)
ImportAssetAsync(string relativeProjectPath)
Import asset (async).
public static void ImportAssetAsync(string relativeProjectPath)
Refresh()
Refresh Assetdatabase.
public static void Refresh()
RefreshAsync()
Refresh Assetdatabase (async).
public static void RefreshAsync()
GUIDToAssetPath(string guid)
Get asset path by guid.
public static string GUIDToAssetPath(string guid)
AssetPathToGUID(string relativeProjectPath)
Get GUID by relativeProjectPath.
public static string AssetPathToGUID(string relativeProjectPath)
LoadAllAssetsAtPath<T>(string relativeProjectPath)
Load all assets of type T from relativeProjectPath.
public static IEnumerable<T> LoadAllAssetsAtPath<T>(string relativeProjectPath)
LoadAllTextAssetAtPath(string relativeProjectPath)
Load all TextAsset from relativeProjectPath.
public static IEnumerable<TextAsset> LoadAllTextAssetAtPath(string relativeProjectPath)
LoadAllGameObjectAtPath(string relativeProjectPath)
Load all prefab from relativeProjectPath.
public static IEnumerable<GameObject> LoadAllGameObjectAtPath(string relativeProjectPath)
GetFiles(string relativeProjectPath, [bool includeSubdirectory = true])
Get all file paths from relativeProjectPath.
public static IEnumerable<string> GetFiles(string relativeProjectPath, [bool includeSubdirectory = true])
GetFiles(string relativeProjectPath, string extension, [bool includeSubdirectory = true])
Get all file paths with the specified extension from relativeProjectPath.
public static IEnumerable<string> GetFiles(string relativeProjectPath, string extension, [bool includeSubdirectory = true])
GetMeshPathsAtPath(string relativeProjectPath)
Get the paths of all Mesh from path relativeProjectPath.
public static IEnumerable<string> GetMeshPathsAtPath(string relativeProjectPath)
GetShaderPathsAtPath(string relativeProjectPath)
Get the paths of all Shader from path relativeProjectPath.
public static IEnumerable<string> GetShaderPathsAtPath(string relativeProjectPath)
GetScenePathsAtPath(string relativeProjectPath)
Get the paths of all Scene from path relativeProjectPath.
public static IEnumerable<string> GetScenePathsAtPath(string relativeProjectPath)
GetPrefabPathsAtPath(string relativeProjectPath)
Get the paths of all Prefab from path relativeProjectPath.
public static IEnumerable<string> GetPrefabPathsAtPath(string relativeProjectPath)
GetTexturePathsAtPath(string relativeProjectPath)
Get the paths of all Texture from path relativeProjectPath.
public static IEnumerable<string> GetTexturePathsAtPath(string relativeProjectPath)
GetMaterialPathsAtPath(string relativeProjectPath)
Get the paths of all Material from path relativeProjectPath.
public static IEnumerable<string> GetMaterialPathsAtPath(string relativeProjectPath)
GetTextAssetPathsAtPath(string relativeProjectPath)
Get the paths of all TextAsset from path relativeProjectPath.
public static IEnumerable<string> GetTextAssetPathsAtPath(string relativeProjectPath)
GetAudioClipPathsAtPath(string relativeProjectPath)
Get the paths of all AudioClip from path relativeProjectPath.
public static IEnumerable<string> GetAudioClipPathsAtPath(string relativeProjectPath)
GetAudioMixerPathsAtPath(string relativeProjectPath)
Get the paths of all AudioMixer from path relativeProjectPath.
public static IEnumerable<string> GetAudioMixerPathsAtPath(string relativeProjectPath)
GetVideoClipPathsAtPath(string relativeProjectPath)
Get the paths of all VideoClip from path relativeProjectPath.
public static IEnumerable<string> GetVideoClipPathsAtPath(string relativeProjectPath)
GetAnimationClipPathsAtPath(string relativeProjectPath)
Get the paths of all AnimationClip from path relativeProjectPath.
public static IEnumerable<string> GetAnimationClipPathsAtPath(string relativeProjectPath)
GetComputeShaderPathsAtPath(string relativeProjectPath)
Get the paths of all ComputeShader from path relativeProjectPath.
public static IEnumerable<string> GetComputeShaderPathsAtPath(string relativeProjectPath)
GetPhysicsMaterialPathsAtPath(string relativeProjectPath)
Get the paths of all PhysicsMaterial from path relativeProjectPath.
public static IEnumerable<string> GetPhysicsMaterialPathsAtPath(string relativeProjectPath)