The initial source comes from sdcuike/issueBlog#4
https://github.com/PacktPublishing free to download books code by Packet
https://love2.io Chinese site
| // https format remote address, using github token `github_pat_xxx` | |
| https://QXSoftware:[email protected]/QXSoftware/PhysX.git |
https://github.com/PacktPublishing free to download books code by Packet
https://love2.io Chinese site
| using System.Collections.Generic; | |
| using UnityEngine; | |
| using UnityEngine.UI; | |
| /// <summary> | |
| /// | |
| /// Unity 引擎的 mesh 顶点顺序如下: | |
| /// | |
| /// (0)-------(1)(4)-------(5) | |
| /// | | | | |
本次测试包含对AssetDatabase.GetDependencies和EditorUtility.CollectDependencies这两个获取资源的依赖资源的 API 的测试,以及对于meta残留对打AssetBundle的影响。
输入资源路径,例如Assets/Material/demo.mat,以路径形式返回该资源依赖的资源列表,例如Assets/Texture/demo.jpg。
这个 API 返回的结果是“错误”的,也就是带残留的。比如某个材质,原本的shader引用了4个纹理,然后切换其shader为新的shader使之只引用一个纹理,这时AssetDatabase.GetDependencies返回的结果还是4个纹理。
| private static string[] _persistentDataPaths; | |
| public static bool IsDirectoryWritable(string path) { | |
| try { | |
| if (!Directory.Exists(path)) return false; | |
| string file = Path.Combine(path, Path.GetRandomFileName()); | |
| using (FileStream fs = File.Create(file, 1)) {} | |
| File.Delete(file); | |
| return true; | |
| } catch { |
| using System; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| using System.Text; | |
| using UnityEditor; | |
| using UnityEngine; | |
| using UnityEngine.Rendering; | |
| [CustomEditor(typeof(Camera), true)] | |
| public class CameraInspector : Editor |
| using System; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| using System.Text; | |
| using UnityEditor; | |
| using UnityEngine; | |
| [CustomEditor(typeof(MeshRenderer), true)] | |
| public class MeshRendererInspector : Editor | |
| { |
| use strict; | |
| use warnings; | |
| sub process_html_file { | |
| my $doc_file = $_[0]; | |
| open(DOC_FILE, "<", $doc_file) || die "Cannot open file : $!"; | |
| local $/; | |
| my $content = <DOC_FILE>; | |
| close(DOC_FILE); | |
| $content =~ s#<script type=\"text/javascript\">\s*var _gaq = _gaq \|\| \[\];.+?</script>##s; |
| @echo off | |
| taskkill -f ^ | |
| -im TE.ProcessHost.Managed.exe ^ | |
| -im Microsoft.Alm.Shared.Remoting.RemoteContainer.dll ^ | |
| -im Microsoft.VsHub.Server.HttpHostx64.exe ^ | |
| -im WordBook.exe ^ | |
| -im wandoujia_helper.exe ^ | |
| -im VBCSCompiler.exe ^ | |
| -im Merge.exe ^ |