标签:assembly objectc using 没有 compiler 创建 cli art tween
首先要吐槽一下官方居然连这么基础的功能都没有,不魁是移动游戏硬核移植到PC的。
幸好发行的是C#版本,可以自己添加代码实现,这个结构找了好久。
Dnspy里打开Assembly-CSharp.dll,找到GirlActionController或者其他游戏时可以注入的入口点。
创建Update方法
接着加入代码修改如图,我习惯用R键重开游戏。
using System; using System.Runtime.CompilerServices; using DG.Tweening; using UnityEngine; using UnityEngine.UI; public partial class GirlActionController : BaseSpineObjectController { public void Update() { if (Input.GetKeyDown(KeyCode.R)) { GameObject obj = GameObject.Find("UI_2D/Forward/PnlPause/Buttons/BtnRestart"); if (obj != null) { Button btn = obj.GetComponent<Button>(); if (btn != null) { btn.onClick.Invoke(); } } } } }
挑战沙雕曲目,再也不用暴躁的按那愚蠢的菜单键了!!!
标签:assembly objectc using 没有 compiler 创建 cli art tween
原文地址:https://www.cnblogs.com/kileyi/p/11094505.html