概要 using UnityEditor; using UnityEditorInternal; public static class Example { [MenuItem( "Tools/Hoge" )] private static void Hoge() { ProfilerDriver.LoadProfile( "test.data", keepExistingData: true ); } } 現在 Profiler に表示されている…
概要 using UnityEditor; using UnityEditorInternal; public static class Example { [MenuItem( "Tools/Hoge" )] private static void Hoge() { ProfilerDriver.SaveProfile( "test.data" ); } } 保存したファイルは Profiler の Load から読み込める
概要 using UnityEditor; using UnityEditorInternal; public static class Example { [MenuItem( "Tools/Hoge" )] private static void Hoge() { ProfilerDriver.deepProfiling = !ProfilerDriver.deepProfiling; } }
ソースコード 使用例 foreach ( var n in AssetDatabaseUtils.FindAssets<Texture>() ) { Debug.Log( n.name ); }</texture>
ソースコード 使用例 Debug.Log( AssetDatabaseUtils.FindAsset<Texture>().name );</texture>
概要 public sealed class Example : IAssetBundleResource { public void Setup( ProvideHandle handle ) { var options = handle.Location.Data as AssetBundleRequestOptions; // ハッシュ値 Debug.Log( options.Hash ); // CRC 値 Debug.Log( options.Cr…
概要 使用例 using UnityEditor; public static class Example { [MenuItem( "Tools/Hoge" )] private static void Hoge() { var group = AddressableUtils.GetOrCreateGroup( "【グループ名】" ); var bundledAssetGroupSchema = group.Schemas .OfType<BundledAssetGroupSchema>() .</bundledassetgroupschema>…
概要 使用例 public static class Example { [MenuItem( "Tools/Hoge" )] private static void Hoge() { var group = AddressableUtils.GetOrCreateGroup( "【グループ名】" ); var bundledAssetGroupSchema = group.Schemas .OfType<BundledAssetGroupSchema>() .FirstOrDefault() ; </bundledassetgroupschema>…
概要 ProvideHandle provideHandle = ...; AssetBundleRequestOptions options = ...; var location = provideHandle.Location; var url = location.InternalId; var hash = Hash128.Parse( options.Hash ); var isExist = Caching.IsVersionCached( url, ha…
概要 赤枠のアイコンで Stage All(もしくは Unstage All)できる
概要 using UnityEditor; using UnityEditor.AddressableAssets.Settings; using UnityEngine; [InitializeOnLoad] public static class Example { static Example() { AddressableAssetSettings.OnModificationGlobal += OnModificationGlobal; } private s…
概要 public void SetAddress(string addr, bool postEvent = true) { if (m_Address != addr) { m_Address = addr; if (string.IsNullOrEmpty(m_Address)) m_Address = AssetPath; SetDirty(AddressableAssetSettings.ModificationEvent.EntryModified, thi…
概要 使用例 using UnityEditor; public static class Example { [MenuItem( "Tools/Hoge" )] private static void Hoge() { // デフォルトなら // 0: Use Asset Database (faster) // 1: Simulate Groups (advanced) // 2: Use Existing Build (requires bu…
概要 使用例 using UnityEditor; public static class Example { [MenuItem( "Tools/Hoge" )] private static void Hoge() { AddressableUtils.RemoveAllGroupWithoutDefault(); } }
概要 使用例 using UnityEditor; public static class Example { [MenuItem( "Tools/Hoge" )] private static void Hoge() { // アセットにラベルを割り当てます AddressableUtils.SetLabelToAssetOrFolder ( path:"Assets/New Material.mat", label: "hoge"…