This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import codecs | |
def convert_encoding_to_utf8_no_bom(file_path): | |
""" | |
检测文件编码,如果是 GB2312,则转换为 UTF-8 无 BOM。 | |
""" | |
try: | |
# 尝试以 GB2312 编码读取 | |
with codecs.open(file_path, 'r', encoding='gb2312', errors='strict') as f: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#pragma kernel CSMain | |
TextureCube<float3> _MipUp; | |
RWTexture2DArray<float3> _MipDown; | |
SamplerState g_linear_repeat_sampler; | |
float _OneOverMipSize;//MipDownSize | |
[numthreads(8,8,1)] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from enum import Enum, auto | |
import tempfile | |
import os | |
import subprocess | |
import xml.etree.ElementTree as ET | |
cli_path = r"D:\AssetStudio\AssetStudioModCLI_net472_win32_64\AssetStudioModCLI.exe" | |
class AssetType(Enum): | |
Shader = auto() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#CompareUnityBinary.py | |
import argparse | |
import sys | |
import os | |
import os.path | |
import tempfile | |
import subprocess | |
def create_temporary(suff = ''): | |
f, path = tempfile.mkstemp(suffix = suff) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections.Generic; | |
using System.Linq; | |
using System.Reflection; | |
using UnityEditor; | |
using UnityEngine; | |
public class CleanMaterialInvalidKeyword : EditorWindow | |
{ | |
[MenuItem("Tools/CleanMaterialInvalidKeyword")] | |
public static void OpenCleanMaterialInvalidKeywordWindow() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections; | |
using System.Collections.Generic; | |
using System.Reflection; | |
using UnityEditor; | |
using UnityEngine; | |
[ExecuteAlways] | |
public class RenderdocCapture : MonoBehaviour | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# in renderdoc menu > Window > Python Shell | |
# Interactive Python Shell > Run Scripts > Open > this script | |
# write your .rdc file path in line 13 OpenFile function | |
import renderdoc as rd | |
rd.InitialiseReplay(rd.GlobalEnvironment(), []) | |
# Open a capture file handle | |
cap = rd.OpenCaptureFile() |