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://github.com/PacktPublishing free to download books code by Packet
https://love2.io Chinese site
#encoding:utf-8 | |
import traceback | |
import os | |
import os.path | |
import urllib2 | |
import json | |
import re | |
from bs4 import BeautifulSoup |
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 ^ |