This file contains 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
test |
This file contains 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 UnityEngine; | |
using UnityEditor; | |
using System; | |
using System.Reflection; | |
using Editor = UnityEditor.Editor; | |
[CanEditMultipleObjects] | |
[CustomEditor(typeof(Transform), true)] | |
public class TransformInspector : Editor | |
{ |
This file contains 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 UnityEngine; | |
using UnityEditor; | |
using System; | |
using System.Reflection; | |
using Editor = UnityEditor.Editor; | |
[CanEditMultipleObjects] | |
[CustomEditor(typeof(RectTransform), true)] | |
public class RectTransformInspector : Editor | |
{ |
This file contains 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
批处理命令: | |
@echo off | |
git config --global sendpack.sideband false | |
git config --global receive.denyCurrentBranch ignore | |
git daemon --reuseaddr --base-path=. --export-all --verbose --enable=receive-pack | |
使用流程: | |
运行命令后,共享当前目录的所有git工程给局域网内的其他电脑使用 | |
其他电脑clone路径为 git://电脑ip/git仓库名 |
This file contains 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.IO; | |
using System.Linq; | |
namespace ExtractGradleJar | |
{ | |
class Program | |
{ | |
static string[] AllowedExtensions = new[] { ".jar", ".pom" }; |
This file contains 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
1、安装 Docker | |
2、进入 linux 创建对应的目录,比如:agent_xxx | |
3、创建 accelerator 程序,端口为 10086(自定义), 绑定端口为 10080(不可改) | |
cmd 运行: docker run -p 10086:10080 -e "UNITY_ACCELERATOR_PERSIST=/agent_xxx" -e "UNITY_ACCELERATOR_DEBUG=true" unitytechnologies/accelerator:latest | |
4、创建账号/修改密码,创建账号为 dev | |
在 docker 中打开该程序的 cli:unity-accelerator dashboard password dev | |
如果需要多个 accelerator,则重复 2~4 步骤 | |
This file contains 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
#if UNITY_EDITOR | |
using UnityEditor; | |
public class SceneRenderModeForURP | |
{ | |
const string MenuName = "SceneRenderMode/Overdraw"; | |
static DrawCameraMode s_RenderMode; | |
[MenuItem(MenuName, true)] | |
static bool EnableOverdrawConditional() |
This file contains 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
@echo off | |
REM 将下面的 PackageName 设置为 当前要调试的包名,不要加双引号 | |
set PackageName="com.test.apk" | |
adb shell setprop "debug.checkjni" "1" | |
adb forward --remove-all | |
adb reverse --remove-all | |
REM adb forward "tcp:34999" "localabstract:Unity-%PackageName%" | |
adb reverse "tcp:34998" "tcp:34999" | |
adb shell am start -a android.intent.action.MAIN -c android.intent.category.LAUNCHER -f 0x10200000 -S -n "%PackageName%/com.unity3d.player.UnityPlayerActivity" |
This file contains 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
UnityEditor内部代码有对一系列的指定程序集开放,比如下面的这一行代码 | |
[assembly: InternalsVisibleTo("Unity.InternalAPIEditorBridge.001")] | |
所以只要搞一个上面名字的程序集即可访问内部代码了。 | |
上面代码是在UnityCS源码中Editor的AssemblyInfo.cs中找到的 |
This file contains 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
例子:[email protected],下面1和3可以搭配,2和3可以搭配,下面邮箱等同于 [email protected] | |
1、可以在前面的username中加点号,如 [email protected] | |
2、可以在username后面添加+号xxx,如[email protected] | |
3、可以将@gmail.com换成@googlemail.com |
OlderNewer