├── AssetBundle
├── ProjectSettings
│ ├── ProjectVersion.txt
│ ├── ClusterInputManager.asset
│ ├── NetworkManager.asset
│ ├── TimeManager.asset
│ ├── EditorBuildSettings.asset
│ ├── AudioManager.asset
│ ├── EditorSettings.asset
│ ├── TagManager.asset
│ ├── DynamicsManager.asset
│ ├── UnityConnectSettings.asset
│ ├── Physics2DSettings.asset
│ ├── NavMeshAreas.asset
│ ├── GraphicsSettings.asset
│ ├── QualitySettings.asset
│ ├── InputManager.asset
│ └── ProjectSettings.asset
└── Assets
│ ├── 12.ttf
│ ├── CreateAssetBundles.cs
│ ├── TestMono.cs
│ ├── NewUnlitShader.shader
│ ├── BuildTest.unity
│ └── InjectScene.unity
├── README.md
├── Reference
├── UnityEngine.dll
└── UnityEngine.UI.dll
├── MonoInjector
├── App.config
├── InjectionConfig.cs
├── Properties
│ └── AssemblyInfo.cs
├── Memory.cs
├── Utils.cs
├── Assembler.cs
├── MonoProcess.cs
├── Program.cs
├── Native.cs
├── MonoInjector.csproj
└── Injector.cs
├── Payload
├── Main.cs
├── MonoScript
│ ├── InjectMonoManager.cs
│ ├── InjectAssetBundle.cs
│ ├── SceneHierarchy.cs
│ ├── Statistic.cs
│ ├── Console.cs
│ ├── FreeCamera.cs
│ ├── Inspector.cs
│ ├── Tetris.cs
│ └── Utils.cs
├── Properties
│ └── AssemblyInfo.cs
└── Payload.csproj
├── UnityInjection.sln
├── .gitattributes
└── .gitignore
/AssetBundle/ProjectSettings/ProjectVersion.txt:
--------------------------------------------------------------------------------
1 | m_EditorVersion: 2017.1.1f1
2 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Unity-SkeletonKey
2 | ## 注入工具集合
3 |
4 |
5 | 使用方法很简单:先打开游戏,再点开本程序即可
6 |
7 | 按键请看Wiki
8 |
9 |
--------------------------------------------------------------------------------
/AssetBundle/Assets/12.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Lou1sL/Unity-SkeletonKey/HEAD/AssetBundle/Assets/12.ttf
--------------------------------------------------------------------------------
/Reference/UnityEngine.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Lou1sL/Unity-SkeletonKey/HEAD/Reference/UnityEngine.dll
--------------------------------------------------------------------------------
/Reference/UnityEngine.UI.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Lou1sL/Unity-SkeletonKey/HEAD/Reference/UnityEngine.UI.dll
--------------------------------------------------------------------------------
/AssetBundle/ProjectSettings/ClusterInputManager.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!236 &1
4 | ClusterInputManager:
5 | m_ObjectHideFlags: 0
6 | m_Inputs: []
7 |
--------------------------------------------------------------------------------
/MonoInjector/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/AssetBundle/ProjectSettings/NetworkManager.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!149 &1
4 | NetworkManager:
5 | m_ObjectHideFlags: 0
6 | m_DebugLevel: 0
7 | m_Sendrate: 15
8 | m_AssetToPrefab: {}
9 |
--------------------------------------------------------------------------------
/AssetBundle/ProjectSettings/TimeManager.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!5 &1
4 | TimeManager:
5 | m_ObjectHideFlags: 0
6 | Fixed Timestep: 0.02
7 | Maximum Allowed Timestep: 0.33333334
8 | m_TimeScale: 1
9 | Maximum Particle Timestep: 0.03
10 |
--------------------------------------------------------------------------------
/AssetBundle/ProjectSettings/EditorBuildSettings.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!1045 &1
4 | EditorBuildSettings:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 2
7 | m_Scenes:
8 | - enabled: 1
9 | path: Assets/BuildTest.unity
10 | guid: e2562fac5a6fd8e4da3a7909ac7f46c2
11 |
--------------------------------------------------------------------------------
/AssetBundle/ProjectSettings/AudioManager.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!11 &1
4 | AudioManager:
5 | m_ObjectHideFlags: 0
6 | m_Volume: 1
7 | Rolloff Scale: 1
8 | Doppler Factor: 1
9 | Default Speaker Mode: 2
10 | m_SampleRate: 0
11 | m_DSPBufferSize: 0
12 | m_VirtualVoiceCount: 512
13 | m_RealVoiceCount: 32
14 | m_SpatializerPlugin:
15 | m_AmbisonicDecoderPlugin:
16 | m_DisableAudio: 0
17 | m_VirtualizeEffects: 1
18 |
--------------------------------------------------------------------------------
/AssetBundle/ProjectSettings/EditorSettings.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!159 &1
4 | EditorSettings:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 4
7 | m_ExternalVersionControlSupport: Visible Meta Files
8 | m_SerializationMode: 2
9 | m_DefaultBehaviorMode: 0
10 | m_SpritePackerMode: 0
11 | m_SpritePackerPaddingPower: 1
12 | m_ProjectGenerationIncludedExtensions: txt;xml;fnt;cd
13 | m_ProjectGenerationRootNamespace:
14 | m_UserGeneratedProjectSuffix:
15 | m_CollabEditorSettings:
16 | inProgressEnabled: 1
17 |
--------------------------------------------------------------------------------
/AssetBundle/ProjectSettings/TagManager.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!78 &1
4 | TagManager:
5 | serializedVersion: 2
6 | tags: []
7 | layers:
8 | - Default
9 | - TransparentFX
10 | - Ignore Raycast
11 | -
12 | - Water
13 | - UI
14 | -
15 | -
16 | -
17 | -
18 | -
19 | -
20 | -
21 | -
22 | -
23 | -
24 | -
25 | -
26 | -
27 | -
28 | -
29 | -
30 | -
31 | -
32 | -
33 | -
34 | -
35 | -
36 | -
37 | -
38 | -
39 | -
40 | m_SortingLayers:
41 | - name: Default
42 | uniqueID: 0
43 | locked: 0
44 |
--------------------------------------------------------------------------------
/AssetBundle/Assets/CreateAssetBundles.cs:
--------------------------------------------------------------------------------
1 | #if UNITY_EDITOR
2 |
3 | using UnityEditor;
4 |
5 |
6 | public class CreateAssetBundles
7 | {
8 | [MenuItem("Assets/Build AssetBundles")]
9 | static void BuildAllAssetBundles()
10 | {
11 | BuildPipeline.BuildAssetBundles(@"../Build/x86/InjectAssetBundle", BuildAssetBundleOptions.None, BuildTarget.StandaloneWindows);
12 | BuildPipeline.BuildAssetBundles(@"../Build/x64/InjectAssetBundle", BuildAssetBundleOptions.None, BuildTarget.StandaloneWindows64);
13 |
14 | //BuildPipeline.BuildAssetBundles(@"Assets/StreamingAssets/InjectAssetBundle", BuildAssetBundleOptions.None, BuildTarget.StandaloneWindows64);
15 | }
16 | }
17 |
18 | #endif
--------------------------------------------------------------------------------
/Payload/Main.cs:
--------------------------------------------------------------------------------
1 | using Payload.MonoScript;
2 | using System.Collections.Generic;
3 | using UnityEngine;
4 |
5 |
6 | namespace Payload
7 | {
8 | public class Main
9 | {
10 | static GameObject gameObject;
11 |
12 | public static void Inject()
13 | {
14 | gameObject = new GameObject();
15 | gameObject.name = "InjectedMonoManager";
16 | gameObject.AddComponent();
17 | Object.DontDestroyOnLoad(gameObject);
18 | }
19 | public static void Eject()
20 | {
21 | //Since this function is easily broken...
22 | //I'll just leave it.:(
23 | //Object.Destroy(gameObject);
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/Payload/MonoScript/InjectMonoManager.cs:
--------------------------------------------------------------------------------
1 | using UnityEngine;
2 |
3 | namespace Payload.MonoScript
4 | {
5 | public class InjectMonoManager : MonoBehaviour
6 | {
7 | public static new GameObject gameObject { get; private set; }
8 |
9 | private void Awake()
10 | {
11 | gameObject = base.gameObject;
12 |
13 | gameObject.AddComponent();
14 | Camera.main.gameObject.AddComponent();
15 | gameObject.AddComponent();
16 | gameObject.AddComponent();
17 | gameObject.AddComponent();
18 | gameObject.AddComponent();
19 | //gameObject.AddComponent();
20 | }
21 |
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/AssetBundle/ProjectSettings/DynamicsManager.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!55 &1
4 | PhysicsManager:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 3
7 | m_Gravity: {x: 0, y: -9.81, z: 0}
8 | m_DefaultMaterial: {fileID: 0}
9 | m_BounceThreshold: 2
10 | m_SleepThreshold: 0.005
11 | m_DefaultContactOffset: 0.01
12 | m_DefaultSolverIterations: 6
13 | m_DefaultSolverVelocityIterations: 1
14 | m_QueriesHitBackfaces: 0
15 | m_QueriesHitTriggers: 1
16 | m_EnableAdaptiveForce: 0
17 | m_EnablePCM: 1
18 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
19 | m_AutoSimulation: 1
20 |
--------------------------------------------------------------------------------
/MonoInjector/InjectionConfig.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.IO;
3 |
4 | namespace MonoInjector
5 | {
6 | public class InjectionConfig
7 | {
8 | public MonoProcess Target { get; set; }
9 |
10 | public byte[] Assembly { get; set; }
11 |
12 | public string AssemblyPath { get; set; }
13 |
14 | public IntPtr AssemblyPointer { get; set; }
15 |
16 | public string Namespace { get; set; }
17 |
18 | public string Class { get; set; }
19 |
20 | public string Method { get; set; }
21 |
22 | public override string ToString()
23 | {
24 | return Target.Process.Is64Bit()
25 | ? $"0x{AssemblyPointer.ToInt64():X16} - {Path.GetFileName(AssemblyPath)}"
26 | : $"0x{AssemblyPointer.ToInt64():X8} - {Path.GetFileName(AssemblyPath)}";
27 | }
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/AssetBundle/Assets/TestMono.cs:
--------------------------------------------------------------------------------
1 | using System.Collections;
2 | using System.Collections.Generic;
3 | using UnityEngine;
4 |
5 | public class TestMono : MonoBehaviour {
6 |
7 | public Light light;
8 |
9 | public int TestField = 1;
10 | private Color TestFieldPrivate = new Color(1,1,1,1);
11 |
12 | public int TestProp { get; set; }
13 | public int TestPropGet { get { return -1; } }
14 |
15 | public void TestFunc() { Debug.Log("Wow!"); }
16 | public void TestFuncPrivate() { Debug.Log("Wow private!"); }
17 |
18 | private void Start()
19 | {
20 | CancelInvoke();
21 | InvokeRepeating("AddOne", 1f, 1f);
22 | Debug.Log("Wow Start!");
23 | }
24 |
25 | private void Update()
26 | {
27 | light.color = TestFieldPrivate;
28 | }
29 |
30 | private void AddOne()
31 | {
32 | TestField++;
33 | TestProp++;
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/AssetBundle/ProjectSettings/UnityConnectSettings.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!310 &1
4 | UnityConnectSettings:
5 | m_ObjectHideFlags: 0
6 | m_Enabled: 0
7 | m_TestMode: 0
8 | m_TestEventUrl:
9 | m_TestConfigUrl:
10 | m_TestInitMode: 0
11 | CrashReportingSettings:
12 | m_EventUrl: https://perf-events.cloud.unity3d.com/api/events/crashes
13 | m_Enabled: 0
14 | m_CaptureEditorExceptions: 1
15 | UnityPurchasingSettings:
16 | m_Enabled: 0
17 | m_TestMode: 0
18 | UnityAnalyticsSettings:
19 | m_Enabled: 0
20 | m_InitializeOnStartup: 1
21 | m_TestMode: 0
22 | m_TestEventUrl:
23 | m_TestConfigUrl:
24 | UnityAdsSettings:
25 | m_Enabled: 0
26 | m_InitializeOnStartup: 1
27 | m_TestMode: 0
28 | m_EnabledPlatforms: 4294967295
29 | m_IosGameId:
30 | m_AndroidGameId:
31 | m_GameIds: {}
32 | m_GameId:
33 | PerformanceReportingSettings:
34 | m_Enabled: 0
35 |
--------------------------------------------------------------------------------
/Payload/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // 有关程序集的一般信息由以下
6 | // 控制。更改这些特性值可修改
7 | // 与程序集关联的信息。
8 | [assembly: AssemblyTitle("Payload")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("Payload")]
13 | [assembly: AssemblyCopyright("Copyright © 2018")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // 将 ComVisible 设置为 false 会使此程序集中的类型
18 | //对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
19 | //请将此类型的 ComVisible 特性设置为 true。
20 | [assembly: ComVisible(false)]
21 |
22 | // 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
23 | [assembly: Guid("4838df1a-7ad6-4457-923a-e58f9e167463")]
24 |
25 | // 程序集的版本信息由下列四个值组成:
26 | //
27 | // 主版本
28 | // 次版本
29 | // 生成号
30 | // 修订号
31 | //
32 | // 可以指定所有值,也可以使用以下所示的 "*" 预置版本号和修订号
33 | //通过使用 "*",如下所示:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/MonoInjector/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // 有关程序集的一般信息由以下
6 | // 控制。更改这些特性值可修改
7 | // 与程序集关联的信息。
8 | [assembly: AssemblyTitle("MonoInjector")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("MonoInjector")]
13 | [assembly: AssemblyCopyright("Copyright © 2018")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // 将 ComVisible 设置为 false 会使此程序集中的类型
18 | //对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
19 | //请将此类型的 ComVisible 特性设置为 true。
20 | [assembly: ComVisible(false)]
21 |
22 | // 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
23 | [assembly: Guid("320ef999-a632-4d43-a665-3aa8ea82f0ac")]
24 |
25 | // 程序集的版本信息由下列四个值组成:
26 | //
27 | // 主版本
28 | // 次版本
29 | // 生成号
30 | // 修订号
31 | //
32 | // 可以指定所有值,也可以使用以下所示的 "*" 预置版本号和修订号
33 | // 方法是按如下所示使用“*”: :
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/AssetBundle/Assets/NewUnlitShader.shader:
--------------------------------------------------------------------------------
1 | Shader "Unlit/NewUnlitShader"
2 | {
3 | Properties
4 | {
5 | _MainTex ("Texture", 2D) = "white" {}
6 | }
7 | SubShader
8 | {
9 | Tags { "RenderType"="Opaque" }
10 | LOD 100
11 |
12 | Pass
13 | {
14 | CGPROGRAM
15 | #pragma vertex vert
16 | #pragma fragment frag
17 | // make fog work
18 | #pragma multi_compile_fog
19 |
20 | #include "UnityCG.cginc"
21 |
22 | struct appdata
23 | {
24 | float4 vertex : POSITION;
25 | float2 uv : TEXCOORD0;
26 | };
27 |
28 | struct v2f
29 | {
30 | float2 uv : TEXCOORD0;
31 | UNITY_FOG_COORDS(1)
32 | float4 vertex : SV_POSITION;
33 | };
34 |
35 | sampler2D _MainTex;
36 | float4 _MainTex_ST;
37 |
38 | v2f vert (appdata v)
39 | {
40 | v2f o;
41 | o.vertex = UnityObjectToClipPos(v.vertex);
42 | o.uv = TRANSFORM_TEX(v.uv, _MainTex);
43 | UNITY_TRANSFER_FOG(o,o.vertex);
44 | return o;
45 | }
46 |
47 | fixed4 frag (v2f i) : SV_Target
48 | {
49 | // sample the texture
50 | fixed4 col = tex2D(_MainTex, i.uv);
51 | // apply fog
52 | UNITY_APPLY_FOG(i.fogCoord, col);
53 | return col;
54 | }
55 | ENDCG
56 | }
57 | }
58 | }
59 |
--------------------------------------------------------------------------------
/Payload/MonoScript/InjectAssetBundle.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections;
3 | using System.Collections.Generic;
4 | using System.IO;
5 | using System.Linq;
6 | using System.Text;
7 | using UnityEngine;
8 |
9 | namespace Payload.MonoScript
10 | {
11 | public class InjectAssetBundle : MonoBehaviour
12 | {
13 | private static AssetBundle InjectedScene = null;
14 | private static AssetBundle InjectedAsset = null;
15 |
16 | void Start()
17 | {
18 | this.InjectLog("AssetBundle Injection Will Be Started In 5 Sec!");
19 | Invoke("InitAsset", 5f);
20 | }
21 |
22 | private void OnDestroy()
23 | {
24 | InjectedScene.Unload(true);
25 | }
26 |
27 |
28 | private void InitAsset()
29 | {
30 | //InjectedAssetBundle = AssetBundle.LoadFromFile(@".\InjectAssetBundle\InjectAssetBundle");
31 | InjectedAsset = AssetBundle.LoadFromFile(@".\InjectAssetBundle\inject_asset");
32 | InjectedScene = AssetBundle.LoadFromFile(@".\InjectAssetBundle\inject_scene");
33 |
34 | string[] scenePaths = InjectedScene.GetAllScenePaths();
35 |
36 | string sceneName = Path.GetFileNameWithoutExtension(scenePaths[0]);
37 | //this.InjectLog("Load scene:" + sceneName);
38 | //SceneManager.LoadScene(sceneName);
39 | }
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/AssetBundle/ProjectSettings/Physics2DSettings.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!19 &1
4 | Physics2DSettings:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 3
7 | m_Gravity: {x: 0, y: -9.81}
8 | m_DefaultMaterial: {fileID: 0}
9 | m_VelocityIterations: 8
10 | m_PositionIterations: 3
11 | m_VelocityThreshold: 1
12 | m_MaxLinearCorrection: 0.2
13 | m_MaxAngularCorrection: 8
14 | m_MaxTranslationSpeed: 100
15 | m_MaxRotationSpeed: 360
16 | m_BaumgarteScale: 0.2
17 | m_BaumgarteTimeOfImpactScale: 0.75
18 | m_TimeToSleep: 0.5
19 | m_LinearSleepTolerance: 0.01
20 | m_AngularSleepTolerance: 2
21 | m_DefaultContactOffset: 0.01
22 | m_AutoSimulation: 1
23 | m_QueriesHitTriggers: 1
24 | m_QueriesStartInColliders: 1
25 | m_ChangeStopsCallbacks: 0
26 | m_CallbacksOnDisable: 1
27 | m_AlwaysShowColliders: 0
28 | m_ShowColliderSleep: 1
29 | m_ShowColliderContacts: 0
30 | m_ShowColliderAABB: 0
31 | m_ContactArrowScale: 0.2
32 | m_ColliderAwakeColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.7529412}
33 | m_ColliderAsleepColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.36078432}
34 | m_ColliderContactColor: {r: 1, g: 0, b: 1, a: 0.6862745}
35 | m_ColliderAABBColor: {r: 1, g: 1, b: 0, a: 0.2509804}
36 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
37 |
--------------------------------------------------------------------------------
/AssetBundle/ProjectSettings/NavMeshAreas.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!126 &1
4 | NavMeshProjectSettings:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 2
7 | areas:
8 | - name: Walkable
9 | cost: 1
10 | - name: Not Walkable
11 | cost: 1
12 | - name: Jump
13 | cost: 2
14 | - name:
15 | cost: 1
16 | - name:
17 | cost: 1
18 | - name:
19 | cost: 1
20 | - name:
21 | cost: 1
22 | - name:
23 | cost: 1
24 | - name:
25 | cost: 1
26 | - name:
27 | cost: 1
28 | - name:
29 | cost: 1
30 | - name:
31 | cost: 1
32 | - name:
33 | cost: 1
34 | - name:
35 | cost: 1
36 | - name:
37 | cost: 1
38 | - name:
39 | cost: 1
40 | - name:
41 | cost: 1
42 | - name:
43 | cost: 1
44 | - name:
45 | cost: 1
46 | - name:
47 | cost: 1
48 | - name:
49 | cost: 1
50 | - name:
51 | cost: 1
52 | - name:
53 | cost: 1
54 | - name:
55 | cost: 1
56 | - name:
57 | cost: 1
58 | - name:
59 | cost: 1
60 | - name:
61 | cost: 1
62 | - name:
63 | cost: 1
64 | - name:
65 | cost: 1
66 | - name:
67 | cost: 1
68 | - name:
69 | cost: 1
70 | - name:
71 | cost: 1
72 | m_LastAgentTypeID: -887442657
73 | m_Settings:
74 | - serializedVersion: 2
75 | agentTypeID: 0
76 | agentRadius: 0.5
77 | agentHeight: 2
78 | agentSlope: 45
79 | agentClimb: 0.75
80 | ledgeDropHeight: 0
81 | maxJumpAcrossDistance: 0
82 | minRegionArea: 2
83 | manualCellSize: 0
84 | cellSize: 0.16666667
85 | manualTileSize: 0
86 | tileSize: 256
87 | accuratePlacement: 0
88 | m_SettingNames:
89 | - Humanoid
90 |
--------------------------------------------------------------------------------
/Payload/MonoScript/SceneHierarchy.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections;
3 | using System.Collections.Generic;
4 | using UnityEngine;
5 |
6 | namespace Payload.MonoScript
7 | {
8 | public class SceneHierarchy : MonoBehaviour
9 | {
10 | private bool Active = true;
11 | private KeyCode Switch = KeyCode.Insert;
12 |
13 | private GameObjectTree GOTree;
14 | private GameObjectSearch search;
15 |
16 | private string filter = string.Empty;
17 | private bool SearchMode = false;
18 |
19 | private void Start()
20 | {
21 | GOTree = new GameObjectTree();
22 | GOTree.UpdateTree();
23 | search = new GameObjectSearch();
24 | }
25 |
26 | private void Update()
27 | {
28 | if (Input.GetKeyDown(Switch))
29 | Active = !Active;
30 | }
31 |
32 | private void OnGUI()
33 | {
34 | if (!Active) return;
35 |
36 | AllRect.HierRect = GUILayout.Window(WindowID.TRANSFORM_WITH_TRIGGER_LIST, AllRect.HierRect, (id) =>
37 | {
38 | if (GUILayout.Button("Update Hierarchy"))
39 | GOTree.UpdateTree();
40 |
41 | GUILayout.BeginHorizontal();
42 | filter = GUILayout.TextField(filter);
43 |
44 | if (GUILayout.Button("?", GUILayout.Width(20)) && filter != string.Empty)
45 | {
46 | search.Search(FindObjectsOfType(), filter);
47 | SearchMode = true;
48 | }
49 | if (SearchMode && GUILayout.Button("X", GUILayout.Width(20))) SearchMode = false;
50 |
51 | GUILayout.EndHorizontal();
52 |
53 | if (SearchMode) search.OnGUISearch();
54 | else GOTree.OnGUIHierarchy();
55 |
56 | if (GUILayout.Button("Close")) Active = false;
57 |
58 | GUI.DragWindow(new Rect(0, 0, AllRect.HierRect.width, 20));
59 | }, "Scene Hierarchy", AllGUIStyle.DEFAULT_WINDOW);
60 | }
61 |
62 |
63 | }
64 | }
65 |
--------------------------------------------------------------------------------
/UnityInjection.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 15
4 | VisualStudioVersion = 15.0.27004.2005
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MonoInjector", "MonoInjector\MonoInjector.csproj", "{320EF999-A632-4D43-A665-3AA8EA82F0AC}"
7 | EndProject
8 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Payload", "Payload\Payload.csproj", "{4838DF1A-7AD6-4457-923A-E58F9E167463}"
9 | EndProject
10 | Global
11 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
12 | Debug|x64 = Debug|x64
13 | Debug|x86 = Debug|x86
14 | Release|x64 = Release|x64
15 | Release|x86 = Release|x86
16 | EndGlobalSection
17 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
18 | {320EF999-A632-4D43-A665-3AA8EA82F0AC}.Debug|x64.ActiveCfg = Debug|x64
19 | {320EF999-A632-4D43-A665-3AA8EA82F0AC}.Debug|x64.Build.0 = Debug|x64
20 | {320EF999-A632-4D43-A665-3AA8EA82F0AC}.Debug|x86.ActiveCfg = Debug|x86
21 | {320EF999-A632-4D43-A665-3AA8EA82F0AC}.Debug|x86.Build.0 = Debug|x86
22 | {320EF999-A632-4D43-A665-3AA8EA82F0AC}.Release|x64.ActiveCfg = Release|x64
23 | {320EF999-A632-4D43-A665-3AA8EA82F0AC}.Release|x64.Build.0 = Release|x64
24 | {320EF999-A632-4D43-A665-3AA8EA82F0AC}.Release|x86.ActiveCfg = Release|x86
25 | {320EF999-A632-4D43-A665-3AA8EA82F0AC}.Release|x86.Build.0 = Release|x86
26 | {4838DF1A-7AD6-4457-923A-E58F9E167463}.Debug|x64.ActiveCfg = Debug|x64
27 | {4838DF1A-7AD6-4457-923A-E58F9E167463}.Debug|x64.Build.0 = Debug|x64
28 | {4838DF1A-7AD6-4457-923A-E58F9E167463}.Debug|x86.ActiveCfg = Debug|x86
29 | {4838DF1A-7AD6-4457-923A-E58F9E167463}.Debug|x86.Build.0 = Debug|x86
30 | {4838DF1A-7AD6-4457-923A-E58F9E167463}.Release|x64.ActiveCfg = Release|x64
31 | {4838DF1A-7AD6-4457-923A-E58F9E167463}.Release|x64.Build.0 = Release|x64
32 | {4838DF1A-7AD6-4457-923A-E58F9E167463}.Release|x86.ActiveCfg = Release|x86
33 | {4838DF1A-7AD6-4457-923A-E58F9E167463}.Release|x86.Build.0 = Release|x86
34 | EndGlobalSection
35 | GlobalSection(SolutionProperties) = preSolution
36 | HideSolutionNode = FALSE
37 | EndGlobalSection
38 | GlobalSection(ExtensibilityGlobals) = postSolution
39 | SolutionGuid = {E5E8367F-9DCA-46D1-A4C1-E3130A557992}
40 | EndGlobalSection
41 | EndGlobal
42 |
--------------------------------------------------------------------------------
/AssetBundle/ProjectSettings/GraphicsSettings.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!30 &1
4 | GraphicsSettings:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 12
7 | m_Deferred:
8 | m_Mode: 1
9 | m_Shader: {fileID: 69, guid: 0000000000000000f000000000000000, type: 0}
10 | m_DeferredReflections:
11 | m_Mode: 1
12 | m_Shader: {fileID: 74, guid: 0000000000000000f000000000000000, type: 0}
13 | m_ScreenSpaceShadows:
14 | m_Mode: 1
15 | m_Shader: {fileID: 64, guid: 0000000000000000f000000000000000, type: 0}
16 | m_LegacyDeferred:
17 | m_Mode: 1
18 | m_Shader: {fileID: 63, guid: 0000000000000000f000000000000000, type: 0}
19 | m_DepthNormals:
20 | m_Mode: 1
21 | m_Shader: {fileID: 62, guid: 0000000000000000f000000000000000, type: 0}
22 | m_MotionVectors:
23 | m_Mode: 1
24 | m_Shader: {fileID: 75, guid: 0000000000000000f000000000000000, type: 0}
25 | m_LightHalo:
26 | m_Mode: 1
27 | m_Shader: {fileID: 105, guid: 0000000000000000f000000000000000, type: 0}
28 | m_LensFlare:
29 | m_Mode: 1
30 | m_Shader: {fileID: 102, guid: 0000000000000000f000000000000000, type: 0}
31 | m_AlwaysIncludedShaders:
32 | - {fileID: 7, guid: 0000000000000000f000000000000000, type: 0}
33 | - {fileID: 15104, guid: 0000000000000000f000000000000000, type: 0}
34 | - {fileID: 15105, guid: 0000000000000000f000000000000000, type: 0}
35 | - {fileID: 15106, guid: 0000000000000000f000000000000000, type: 0}
36 | - {fileID: 10753, guid: 0000000000000000f000000000000000, type: 0}
37 | - {fileID: 10770, guid: 0000000000000000f000000000000000, type: 0}
38 | - {fileID: 16000, guid: 0000000000000000f000000000000000, type: 0}
39 | m_PreloadedShaders: []
40 | m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000,
41 | type: 0}
42 | m_CustomRenderPipeline: {fileID: 0}
43 | m_TransparencySortMode: 0
44 | m_TransparencySortAxis: {x: 0, y: 0, z: 1}
45 | m_DefaultRenderingPath: 1
46 | m_DefaultMobileRenderingPath: 1
47 | m_TierSettings: []
48 | m_LightmapStripping: 0
49 | m_FogStripping: 0
50 | m_InstancingStripping: 0
51 | m_LightmapKeepPlain: 1
52 | m_LightmapKeepDirCombined: 1
53 | m_LightmapKeepDynamicPlain: 1
54 | m_LightmapKeepDynamicDirCombined: 1
55 | m_LightmapKeepShadowMask: 1
56 | m_LightmapKeepSubtractive: 1
57 | m_FogKeepLinear: 1
58 | m_FogKeepExp: 1
59 | m_FogKeepExp2: 1
60 | m_AlbedoSwatchInfos: []
61 | m_LightsUseLinearIntensity: 0
62 | m_LightsUseColorTemperature: 0
63 |
--------------------------------------------------------------------------------
/MonoInjector/Memory.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace MonoInjector
6 | {
7 | public class Memory : IDisposable
8 | {
9 | private readonly IntPtr _handle;
10 |
11 | private readonly Dictionary _allocations = new Dictionary();
12 |
13 | public Memory(IntPtr processHandle)
14 | {
15 | _handle = processHandle;
16 | }
17 |
18 | public string ReadString(IntPtr address, int length, Encoding encoding)
19 | {
20 | List bytes = new List();
21 |
22 | for (int i = 0; i < length; i++)
23 | {
24 | byte read = ReadBytes(address + bytes.Count, 1)[0];
25 |
26 | if (read != 0x00)
27 | bytes.Add(read);
28 | else break;
29 | }
30 |
31 | return encoding.GetString(bytes.ToArray());
32 | }
33 |
34 | public short ReadShort(IntPtr address)
35 | {
36 | return BitConverter.ToInt16(ReadBytes(address, 2), 0);
37 | }
38 |
39 | public int ReadInt(IntPtr address)
40 | {
41 | return BitConverter.ToInt32(ReadBytes(address, 4), 0);
42 | }
43 |
44 | public byte[] ReadBytes(IntPtr address, int size)
45 | {
46 | byte[] bytes = new byte[size];
47 | Native.ReadProcessMemory(_handle, address, bytes, size, out _);
48 | return bytes;
49 | }
50 |
51 | public IntPtr AllocateAndWrite(byte[] data)
52 | {
53 | IntPtr addr = Allocate(data.Length);
54 | Write(addr, data);
55 | return addr;
56 | }
57 |
58 | public IntPtr Allocate(int size)
59 | {
60 | IntPtr addr =
61 | Native.VirtualAllocEx(_handle, IntPtr.Zero, size,
62 | AllocationType.MEM_COMMIT, MemoryProtection.PAGE_EXECUTE_READWRITE);
63 | _allocations.Add(addr, size);
64 | return addr;
65 | }
66 |
67 | public void Write(IntPtr addr, byte[] data)
68 | {
69 | Native.WriteProcessMemory(_handle, addr, data, data.Length, out _);
70 | }
71 |
72 | public void Dispose()
73 | {
74 | foreach (var kvp in _allocations)
75 | Native.VirtualFreeEx(_handle,
76 | kvp.Key, kvp.Value, MemoryFreeType.MEM_DECOMMIT);
77 | }
78 | }
79 | }
80 |
--------------------------------------------------------------------------------
/MonoInjector/Utils.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.ComponentModel;
3 | using System.Diagnostics;
4 | using System.IO;
5 |
6 | namespace MonoInjector
7 | {
8 | public static class Utils
9 | {
10 | public static bool ReadFile(string path, out byte[] bytes)
11 | {
12 | try
13 | {
14 | bytes = File.ReadAllBytes(path);
15 | return true;
16 | }
17 | catch
18 | {
19 | bytes = null;
20 | return false;
21 | }
22 | }
23 |
24 | public static void EnsureNotZero(IntPtr ptr, string name)
25 | {
26 | if (ptr == IntPtr.Zero)
27 | throw new ApplicationException($"{name} = 0");
28 | }
29 |
30 | public static bool Is64Bit(this Process p)
31 | {
32 | if (!Environment.Is64BitOperatingSystem)
33 | return false;
34 |
35 | if (!Native.IsWow64Process(p.Handle, out bool isWow64))
36 | throw new Win32Exception();
37 |
38 | return !isWow64;
39 | }
40 |
41 | public static bool DirOverWriteCopy(string sourceDirName, string destDirName)
42 | {
43 | DirDel(destDirName);
44 |
45 | DirectoryInfo src = new DirectoryInfo(sourceDirName);
46 |
47 | if (!src.Exists)
48 | {
49 | return false;
50 | }
51 |
52 | DirectoryInfo[] dirs = src.GetDirectories();
53 |
54 | if (!Directory.Exists(destDirName))
55 | {
56 | Directory.CreateDirectory(destDirName);
57 | }
58 |
59 | FileInfo[] files = src.GetFiles();
60 | foreach (FileInfo file in files)
61 | {
62 | string temppath = Path.Combine(destDirName, file.Name);
63 | file.CopyTo(temppath, false);
64 | }
65 |
66 | foreach (DirectoryInfo subdir in dirs)
67 | {
68 | string temppath = Path.Combine(destDirName, subdir.Name);
69 | DirOverWriteCopy(subdir.FullName, temppath);
70 | }
71 |
72 | return true;
73 | }
74 |
75 | public static bool DirDel(string dir)
76 | {
77 | if (Directory.Exists(dir))
78 | {
79 | Directory.Delete(dir, true);
80 | return true;
81 | }
82 | return false;
83 | }
84 | }
85 | }
86 |
--------------------------------------------------------------------------------
/MonoInjector/Assembler.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 |
4 | namespace MonoInjector
5 | {
6 | public class Assembler
7 | {
8 | private readonly List _asm = new List();
9 |
10 | public void MovRax(IntPtr arg)
11 | {
12 | _asm.AddRange(new byte[] {0x48, 0xB8});
13 | _asm.AddRange(BitConverter.GetBytes((long)arg));
14 | }
15 |
16 | public void MovRcx(IntPtr arg)
17 | {
18 | _asm.AddRange(new byte[] {0x48, 0xB9});
19 | _asm.AddRange(BitConverter.GetBytes((long)arg));
20 | }
21 |
22 | public void MovRdx(IntPtr arg)
23 | {
24 | _asm.AddRange(new byte[] {0x48, 0xBA});
25 | _asm.AddRange(BitConverter.GetBytes((long)arg));
26 | }
27 | //
28 | public void MovR8(IntPtr arg)
29 | {
30 | _asm.AddRange(new byte[] {0x49, 0xB8});
31 | _asm.AddRange(BitConverter.GetBytes((long)arg));
32 | }
33 |
34 | public void MovR9(IntPtr arg)
35 | {
36 | _asm.AddRange(new byte[] {0x49, 0xB9});
37 | _asm.AddRange(BitConverter.GetBytes((long)arg));
38 | }
39 |
40 | public void SubRsp(byte arg)
41 | {
42 | _asm.AddRange(new byte[] {0x48, 0x83, 0xEC});
43 | _asm.Add(arg);
44 | }
45 |
46 | public void CallRax()
47 | {
48 | _asm.AddRange(new byte[] {0xFF, 0xD0});
49 | }
50 |
51 | public void AddRsp(byte arg)
52 | {
53 | _asm.AddRange(new byte[] {0x48, 0x83, 0xC4});
54 | _asm.Add(arg);
55 | }
56 |
57 | public void Push(IntPtr arg)
58 | {
59 | _asm.Add((int)arg < 128 ? (byte)0x6A : (byte)0x68);
60 | _asm.AddRange((int)arg <= 255 ? new[] {(byte)arg} : BitConverter.GetBytes((int)arg));
61 | }
62 |
63 | public void MovEax(IntPtr arg)
64 | {
65 | _asm.Add(0xB8);
66 | _asm.AddRange(BitConverter.GetBytes((int)arg));
67 | }
68 |
69 | public void CallEax()
70 | {
71 | _asm.AddRange(new byte[] {0xFF, 0xD0});
72 | }
73 |
74 | public void AddEsp(byte arg)
75 | {
76 | _asm.AddRange(new byte[] {0x83, 0xC4});
77 | _asm.Add(arg);
78 | }
79 |
80 | public void Return()
81 | {
82 | _asm.Add(0xC3);
83 | }
84 |
85 | public byte[] ToByteArray() => _asm.ToArray();
86 | }
87 | }
88 |
--------------------------------------------------------------------------------
/.gitattributes:
--------------------------------------------------------------------------------
1 | ###############################################################################
2 | # Set default behavior to automatically normalize line endings.
3 | ###############################################################################
4 | * text=auto
5 |
6 | ###############################################################################
7 | # Set default behavior for command prompt diff.
8 | #
9 | # This is need for earlier builds of msysgit that does not have it on by
10 | # default for csharp files.
11 | # Note: This is only used by command line
12 | ###############################################################################
13 | #*.cs diff=csharp
14 |
15 | ###############################################################################
16 | # Set the merge driver for project and solution files
17 | #
18 | # Merging from the command prompt will add diff markers to the files if there
19 | # are conflicts (Merging from VS is not affected by the settings below, in VS
20 | # the diff markers are never inserted). Diff markers may cause the following
21 | # file extensions to fail to load in VS. An alternative would be to treat
22 | # these files as binary and thus will always conflict and require user
23 | # intervention with every merge. To do so, just uncomment the entries below
24 | ###############################################################################
25 | #*.sln merge=binary
26 | #*.csproj merge=binary
27 | #*.vbproj merge=binary
28 | #*.vcxproj merge=binary
29 | #*.vcproj merge=binary
30 | #*.dbproj merge=binary
31 | #*.fsproj merge=binary
32 | #*.lsproj merge=binary
33 | #*.wixproj merge=binary
34 | #*.modelproj merge=binary
35 | #*.sqlproj merge=binary
36 | #*.wwaproj merge=binary
37 |
38 | ###############################################################################
39 | # behavior for image files
40 | #
41 | # image files are treated as binary by default.
42 | ###############################################################################
43 | #*.jpg binary
44 | #*.png binary
45 | #*.gif binary
46 |
47 | ###############################################################################
48 | # diff behavior for common document formats
49 | #
50 | # Convert binary document formats to text before diffing them. This feature
51 | # is only available from the command line. Turn it on by uncommenting the
52 | # entries below.
53 | ###############################################################################
54 | #*.doc diff=astextplain
55 | #*.DOC diff=astextplain
56 | #*.docx diff=astextplain
57 | #*.DOCX diff=astextplain
58 | #*.dot diff=astextplain
59 | #*.DOT diff=astextplain
60 | #*.pdf diff=astextplain
61 | #*.PDF diff=astextplain
62 | #*.rtf diff=astextplain
63 | #*.RTF diff=astextplain
64 |
--------------------------------------------------------------------------------
/MonoInjector/MonoProcess.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Diagnostics;
3 | using System.ComponentModel;
4 | using System.Collections.Generic;
5 | using System.Text;
6 |
7 | namespace MonoInjector
8 | {
9 | public class MonoProcess
10 | {
11 | public Process Process { get; }
12 |
13 | public IntPtr MonoModuleAddress { get; }
14 |
15 | public MonoProcess(Process process, IntPtr monoModuleAddress)
16 | {
17 | Process = process;
18 | MonoModuleAddress = monoModuleAddress;
19 | }
20 |
21 | public static MonoProcess[] GetProcesses()
22 | {
23 | List procs = new List();
24 |
25 | foreach (Process p in Process.GetProcesses())
26 | {
27 | try
28 | {
29 | IntPtr baseAddress;
30 |
31 | if ((baseAddress = GetMonoModule(p)) != IntPtr.Zero)
32 | {
33 | procs.Add(new MonoProcess(p, baseAddress));
34 | }
35 | }
36 | catch (Win32Exception)
37 | {
38 | // ignore
39 | }
40 | }
41 | return procs.ToArray();
42 | }
43 |
44 | public static IntPtr GetMonoModule(Process process)
45 | {
46 | int size = process.Is64Bit() ? 8 : 4;
47 |
48 | IntPtr[] modulePointers = new IntPtr[0];
49 |
50 | if (!Native.EnumProcessModulesEx(
51 | process.Handle, modulePointers, 0, out int bytesNeeded, ModuleFilter.LIST_MODULES_ALL))
52 | {
53 | return IntPtr.Zero;
54 | }
55 |
56 | int count = bytesNeeded / size;
57 | modulePointers = new IntPtr[count];
58 |
59 | if (Native.EnumProcessModulesEx(
60 | process.Handle, modulePointers, bytesNeeded, out bytesNeeded, ModuleFilter.LIST_MODULES_ALL))
61 | {
62 | for (int i = 0; i < count; i++)
63 | {
64 | StringBuilder path = new StringBuilder(260);
65 |
66 | Native.GetModuleFileNameEx(
67 | process.Handle, modulePointers[i], path, 260);
68 |
69 | //In the .NET 4.6 supported Unity.mono.dll is called mono-2.0-bdwgc.dll
70 | bool IsMonoDll = path.ToString().EndsWith("mono.dll", StringComparison.OrdinalIgnoreCase) ||
71 | path.ToString().EndsWith("mono-2.0-bdwgc.dll", StringComparison.OrdinalIgnoreCase);
72 | if (IsMonoDll)
73 | {
74 | Native.GetModuleInformation(process.Handle, modulePointers[i], out MODULEINFO info, (uint)(size * modulePointers.Length));
75 | return info.lpBaseOfDll;
76 | }
77 | }
78 | }
79 |
80 | return IntPtr.Zero;
81 | }
82 |
83 | public override string ToString()
84 | {
85 | return $"{Process.Id} - {Process.ProcessName}";
86 | }
87 | }
88 | }
89 |
--------------------------------------------------------------------------------
/Payload/MonoScript/Statistic.cs:
--------------------------------------------------------------------------------
1 | using System.Diagnostics.CodeAnalysis;
2 | using UnityEngine;
3 | //SceneManagement feture implemented after Unity 5.3(include)
4 | //using UnityEngine.SceneManagement;
5 |
6 | namespace Payload.MonoScript
7 | {
8 | [SuppressMessage("Microsoft.Design", "CS0618")]
9 | public class Statistic : MonoBehaviour
10 | {
11 |
12 | private bool Active = true;
13 | private KeyCode Switch = KeyCode.PageUp;
14 |
15 |
16 | private Vector2 ScrollPosition = new Vector2();
17 |
18 | private void OnGUI()
19 | {
20 | if (!Active) return;
21 |
22 | AllRect.StatisticRect = GUILayout.Window(WindowID.GAME_STATISTIC, AllRect.StatisticRect, (id) =>
23 | {
24 | ScrollPosition = GUILayout.BeginScrollView(ScrollPosition);
25 | GUILayout.BeginVertical();
26 |
27 | string str = "Unity Ver: " + Application.unityVersion + "\n";
28 | str += "FPS: " + Utils.Rnd((1.0f / Time.deltaTime)) + "\n\n";
29 | //After Unity 5.3(include)
30 | //str += "Current Scene: " + SceneManager.GetActiveScene().name + "\n";
31 | //Before Unity 5.3
32 | str += "Current Scene: (" + Application.loadedLevel + ") " + Application.loadedLevelName + "\n\n";
33 | str += "Cameras (Total:" + Camera.allCamerasCount + "):\n";
34 | GUILayout.Label(str, AllGUIStyle.DEFAULT_LABEL);
35 |
36 |
37 | foreach (Camera cam in Camera.allCameras)
38 | {
39 |
40 | GUILayout.BeginHorizontal();
41 | if (GUILayout.Button("□", GUILayout.Width(20)))
42 | {
43 | Inspector.Activate(cam.transform);
44 | }
45 | GUILayout.Label((cam == Camera.main ? "(Main)" : "") + Utils.GetGameObjectPath(cam.gameObject), AllGUIStyle.DEFAULT_LABEL);
46 | GUILayout.EndHorizontal();
47 |
48 |
49 |
50 | GUILayout.BeginHorizontal();
51 | if (!cam.GetComponent())
52 | {
53 | if (GUILayout.Button("Free", GUILayout.Width(60)))
54 | {
55 | foreach (Camera cams in Camera.allCameras)
56 | {
57 | FreeCamera fc = cams.GetComponent();
58 | if (fc) DestroyImmediate(fc);
59 | }
60 | cam.gameObject.AddComponent();
61 | }
62 | }
63 | GUILayout.EndHorizontal();
64 |
65 | string camstr = string.Empty;
66 | camstr += "Projection:" +
67 | (cam.orthographic ?
68 | "Orthographic (Size:" + cam.orthographicSize + ")" :
69 | "Perspective (Fov:" + cam.fieldOfView + ")")
70 | + "\n";
71 | GUILayout.Label(camstr, AllGUIStyle.DEFAULT_LABEL);
72 | }
73 |
74 |
75 | GUILayout.EndVertical();
76 | GUILayout.EndScrollView();
77 |
78 | if (GUILayout.Button("Close")) Active = false;
79 |
80 |
81 | GUI.DragWindow(new Rect(0, 0, AllRect.StatisticRect.width, 20));
82 | }, "Game Statistic", AllGUIStyle.DEFAULT_WINDOW);
83 | }
84 |
85 | private void Update()
86 | {
87 | if (Input.GetKeyDown(Switch)) Active = !Active;
88 | }
89 |
90 |
91 |
92 | }
93 |
94 | }
95 |
--------------------------------------------------------------------------------
/Payload/Payload.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | AnyCPU
7 | {4838DF1A-7AD6-4457-923A-E58F9E167463}
8 | Library
9 | Properties
10 | Payload
11 | Payload
12 | v3.5
13 | 512
14 |
15 |
16 | true
17 | ..\Build\x64\
18 | DEBUG;TRACE
19 | full
20 | x64
21 | prompt
22 | MinimumRecommendedRules.ruleset
23 |
24 |
25 | ..\Build\x64\
26 | TRACE
27 | true
28 | pdbonly
29 | x64
30 | prompt
31 | MinimumRecommendedRules.ruleset
32 |
33 |
34 | true
35 | ..\Build\x86\
36 | DEBUG;TRACE
37 | full
38 | x86
39 | prompt
40 | MinimumRecommendedRules.ruleset
41 |
42 |
43 | ..\Build\x86\
44 | TRACE
45 | true
46 | pdbonly
47 | x86
48 | prompt
49 | MinimumRecommendedRules.ruleset
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 | ..\Reference\UnityEngine.dll
60 |
61 |
62 | ..\Reference\UnityEngine.UI.dll
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
--------------------------------------------------------------------------------
/MonoInjector/Program.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.IO;
4 | using System.Linq;
5 | using System.Text;
6 | using System.Threading.Tasks;
7 |
8 | namespace MonoInjector
9 | {
10 | class Program
11 | {
12 | private static string DLLPath = "Payload.dll";
13 | private static string InjectNameSpace = "Payload";
14 | private static string InjectClass = "Main";
15 | private static string InjectMethod = "Inject";
16 | private static string EjectMethod = "Eject";
17 |
18 | private static Injector injector;
19 | private static MonoProcess target;
20 | private static InjectionConfig injectionConfig;
21 |
22 | static void Main(string[] args)
23 | {
24 | Injection();
25 | //Ejection();
26 | Exit();
27 | }
28 |
29 | private static void Injection()
30 | {
31 | Console.WriteLine("Start Injection: Press ENTER");
32 | Console.ReadLine();
33 |
34 | Console.WriteLine("Finding Unity Game Process...");
35 |
36 | MonoProcess[] result = MonoProcess.GetProcesses();
37 |
38 | if (result.Length == 0)
39 | Error("Unity Game Process Not Found!");
40 |
41 | target = result[0];
42 |
43 | if (target == null)
44 | Error("target == NULL");
45 |
46 |
47 | Console.WriteLine("Process Found: " + target.Process.ProcessName);
48 |
49 | target.Process.Refresh();
50 |
51 | if (target.Process.HasExited)
52 | Error("Process Has Terminated!");
53 |
54 |
55 | if (injector == null || injector.ProcessHandle != target.Process.Handle)
56 | injector = new Injector(target.Process.Handle);
57 |
58 | if (!Utils.ReadFile(DLLPath, out byte[] bytes))
59 | Error("Payload DLL Not Found!");
60 |
61 | injectionConfig = new InjectionConfig
62 | {
63 | Target = target,
64 | Assembly = bytes,
65 | AssemblyPath = DLLPath,
66 | Namespace = InjectNameSpace,
67 | Class = InjectClass,
68 | Method = InjectMethod
69 | };
70 |
71 | try
72 | {
73 | Console.WriteLine("Injecting Mono...");
74 | injector.Inject(injectionConfig);
75 | }
76 | catch (Exception ex)
77 | {
78 | Error($"Mono Injection Failed: {ex.Message} {ex.StackTrace}");
79 | }
80 |
81 | Console.WriteLine("Copying AssetBundle...");
82 | bool isABExist = Utils.DirOverWriteCopy(@".\InjectAssetBundle", Path.GetDirectoryName(target.Process.MainModule.FileName)+ @"\InjectAssetBundle");
83 | if(!isABExist) Console.WriteLine("AssetBundle Injection Cancelled: AssetBundle Not Found!");
84 |
85 | Console.WriteLine("AssetBundle Copied to:"+ Path.GetDirectoryName(target.Process.MainModule.FileName) + @"\InjectAssetBundle");
86 | Console.WriteLine("AssetBundle Injection Will Be Started In 5 Sec!");
87 | Console.WriteLine("INJECTION COMPLETED!");
88 | }
89 | private static void Ejection()
90 | {
91 | Console.WriteLine("Start Ejection: Press ENTER");
92 | Console.ReadLine();
93 |
94 | if (injectionConfig != null)
95 | {
96 | try
97 | {
98 | Console.WriteLine("Ejecting Mono...");
99 | injector.UnloadAndCloseAssembly(injectionConfig, EjectMethod);
100 | }
101 | catch (Exception ex)
102 | {
103 | Error($"Mono Ejection Failed: {ex.Message}");
104 | }
105 | }
106 |
107 | if (target != null)
108 | {
109 | bool isABExist = Utils.DirDel(Path.GetDirectoryName(target.Process.MainModule.FileName) + @"\InjectAssetBundle");
110 | if (!isABExist) Console.WriteLine("AssetBundle Ejection Cancelled: AssetBundle Not Found!");
111 | }
112 |
113 | Console.WriteLine("EJECTION COMPLETED!");
114 |
115 | }
116 |
117 | private static void Error(string errmsg)
118 | {
119 | Console.WriteLine("ERROR: "+ errmsg);
120 | Exit();
121 | }
122 | private static void Exit()
123 | {
124 | Console.WriteLine("Press ENTER to exit!");
125 | Console.ReadLine();
126 | Environment.Exit(0);
127 | }
128 | }
129 | }
130 |
--------------------------------------------------------------------------------
/MonoInjector/Native.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Runtime.InteropServices;
3 | using System.Text;
4 |
5 | namespace MonoInjector
6 | {
7 | [StructLayout(LayoutKind.Sequential)]
8 | public struct MODULEINFO
9 | {
10 | public IntPtr lpBaseOfDll;
11 | public int SizeOfImage;
12 | public IntPtr EntryPoint;
13 | }
14 |
15 | public enum ModuleFilter : uint
16 | {
17 | LIST_MODULES_DEFAULT = 0x0,
18 | LIST_MODULES_32BIT = 0x01,
19 | LIST_MODULES_64BIT = 0x02,
20 | LIST_MODULES_ALL = 0x03
21 | }
22 |
23 | [Flags]
24 | public enum AllocationType
25 | {
26 | MEM_COMMIT = 0x00001000,
27 | MEM_RESERVE = 0x00002000,
28 | MEM_RESET = 0x00080000,
29 | MEM_RESET_UNDO = 0x1000000,
30 | MEM_LARGE_PAGES = 0x20000000,
31 | MEM_PHYSICAL = 0x00400000,
32 | MEM_TOP_DOWN = 0x00100000
33 | }
34 |
35 | [Flags]
36 | public enum MemoryProtection
37 | {
38 | PAGE_EXECUTE = 0x10,
39 | PAGE_EXECUTE_READ = 0x20,
40 | PAGE_EXECUTE_READWRITE = 0x40,
41 | PAGE_EXECUTE_WRITECOPY = 0x80,
42 | PAGE_NOACCESS = 0x01,
43 | PAGE_READONLY = 0x02,
44 | PAGE_READWRITE = 0x4,
45 | PAGE_WRITECOPY = 0x8,
46 | PAGE_TARGETS_INVALID = 0x40000000,
47 | PAGE_TARGETS_NO_UPDATE = 0x40000000,
48 | PAGE_GUARD = 0x100,
49 | PAGE_NOCACHE = 0x200,
50 | PAGE_WRITECOMBINE = 0x400
51 | }
52 |
53 | [Flags]
54 | public enum MemoryFreeType
55 | {
56 | MEM_DECOMMIT = 0x4000,
57 | MEM_RELEASE = 0x8000
58 | }
59 |
60 | [Flags]
61 | public enum ThreadCreationFlags
62 | {
63 | None = 0,
64 | CREATE_SUSPENDED = 0x00000004,
65 | STACK_SIZE_PARAM_IS_A_RESERVATION = 0x00010000
66 | }
67 |
68 | public static class Native
69 | {
70 | [DllImport("kernel32.dll")]
71 | [return: MarshalAs(UnmanagedType.Bool)]
72 | public static extern bool IsWow64Process(IntPtr hProcess, out bool wow64Process);
73 |
74 | [DllImport("psapi.dll")]
75 | public static extern bool EnumProcessModulesEx(IntPtr hProcess, [MarshalAs(UnmanagedType.LPArray, ArraySubType = UnmanagedType.U4)] [In][Out] IntPtr[] lphModule, int cb, [MarshalAs(UnmanagedType.U4)] out int lpcbNeeded, ModuleFilter dwFilterFlag);
76 |
77 | [DllImport("psapi.dll")]
78 | public static extern uint GetModuleFileNameEx(IntPtr hProcess, IntPtr hModule, [Out] StringBuilder lpBaseName, [In] [MarshalAs(UnmanagedType.U4)] uint nSize);
79 |
80 | [DllImport("psapi.dll", SetLastError = true)]
81 | public static extern bool GetModuleInformation(IntPtr hProcess, IntPtr hModule, out MODULEINFO lpmodinfo, uint cb);
82 |
83 | [DllImport("kernel32.dll", CharSet = CharSet.Unicode)]
84 | public static extern IntPtr LoadLibrary([In] [MarshalAs(UnmanagedType.LPTStr)] string lpFileName);
85 |
86 | [DllImport("kernel32.dll")]
87 | [return: MarshalAs(UnmanagedType.Bool)]
88 | public static extern bool FreeLibrary(IntPtr hModule);
89 |
90 | [DllImport("kernel32.dll")]
91 | public static extern IntPtr GetProcAddress(IntPtr hModule, [In] [MarshalAs(UnmanagedType.LPStr)] string lpProcName);
92 |
93 | [DllImport("kernel32.dll")]
94 | [return: MarshalAs(UnmanagedType.Bool)]
95 | public static extern bool WriteProcessMemory(IntPtr hProcess, IntPtr lpBaseAddress, byte[] lpBuffer, int nSize, out int lpNumberOfBytesWritten);
96 |
97 | [DllImport("kernel32.dll")]
98 | [return: MarshalAs(UnmanagedType.Bool)]
99 | public static extern bool ReadProcessMemory(IntPtr hProcess, IntPtr lpBaseAddress, byte[] lpBuffer, int nSize, out int lpNumberOfBytesRead);
100 |
101 | [DllImport("kernel32.dll")]
102 | public static extern IntPtr VirtualAllocEx(IntPtr hProcess, IntPtr lpAddress, int dwSize, AllocationType flAllocationType, MemoryProtection flProtect);
103 |
104 | [DllImport("kernel32.dll")]
105 | [return: MarshalAs(UnmanagedType.Bool)]
106 | public static extern bool VirtualFreeEx(IntPtr hProcess, IntPtr lpAddress, int dwSize, MemoryFreeType dwFreeType);
107 |
108 | [DllImport("kernel32.dll")]
109 | public static extern IntPtr CreateRemoteThread(IntPtr hProcess, IntPtr lpThreadAttributes, int dwStackSize, IntPtr lpStartAddress, IntPtr lpParameter, ThreadCreationFlags dwCreationFlags, out int lpThreadId);
110 |
111 | [DllImport("kernel32.dll")]
112 | public static extern int WaitForSingleObject(IntPtr hHandle, int dwMilliseconds);
113 |
114 | [DllImport("kernel32.dll")]
115 | [return: MarshalAs(UnmanagedType.Bool)]
116 | public static extern bool GetExitCodeThread(IntPtr hThread, out IntPtr lpExitCode);
117 | }
118 | }
119 |
--------------------------------------------------------------------------------
/MonoInjector/MonoInjector.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | AnyCPU
7 | {320EF999-A632-4D43-A665-3AA8EA82F0AC}
8 | Exe
9 | MonoInjector
10 | MonoInjector
11 | v4.6.1
12 | 512
13 | true
14 |
15 |
16 | AnyCPU
17 | true
18 | full
19 | false
20 | bin\Debug\
21 | DEBUG;TRACE
22 | prompt
23 | 4
24 |
25 |
26 | AnyCPU
27 | pdbonly
28 | true
29 | ..\Build\x64\
30 | TRACE
31 | prompt
32 | 4
33 |
34 |
35 | true
36 | ..\Build\x64\
37 | DEBUG;TRACE
38 | full
39 | x64
40 | prompt
41 | MinimumRecommendedRules.ruleset
42 | true
43 |
44 |
45 | ..\Build\x64\
46 | TRACE
47 | true
48 | pdbonly
49 | x64
50 | prompt
51 | MinimumRecommendedRules.ruleset
52 | true
53 |
54 |
55 | true
56 | ..\Build\x86\
57 | DEBUG;TRACE
58 | full
59 | x86
60 | prompt
61 | MinimumRecommendedRules.ruleset
62 | true
63 |
64 |
65 | ..\Build\x86\
66 | TRACE
67 | true
68 | pdbonly
69 | x86
70 | prompt
71 | MinimumRecommendedRules.ruleset
72 | true
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 | {4838df1a-7ad6-4457-923a-e58f9e167463}
101 | Payload
102 |
103 |
104 |
105 |
--------------------------------------------------------------------------------
/Payload/MonoScript/Console.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using System.IO;
3 | using UnityEngine;
4 |
5 | namespace Payload.MonoScript
6 | {
7 | public class Console : MonoBehaviour
8 | {
9 | private bool Active = true;
10 | private KeyCode Switch = KeyCode.PageDown;
11 |
12 |
13 | private Vector2 ScrollPosition = new Vector2();
14 |
15 |
16 | private LogBuffer logBuffer = new LogBuffer();
17 | private sealed class SealedLog
18 | {
19 | public System.DateTime time;
20 | public LogType type;
21 | public string condition;
22 | public string stackTrace;
23 |
24 | public override string ToString()
25 | {
26 | return "" + TagString(condition, type) + " " + "\n" + stackTrace + "\n";
27 | }
28 |
29 | public string ToRawString()
30 | {
31 | return "[" + time.ToString("MM/dd/yyyy HH:mm:ss.fff") + "] " + type.ToString() + ": " + condition + "\r\n" + (stackTrace != string.Empty ? stackTrace + "\r\n" : string.Empty);
32 | }
33 |
34 |
35 | private string TagString(string str, LogType type)
36 | {
37 | string ColorTag = string.Empty;
38 | switch (type)
39 | {
40 | case LogType.Log: ColorTag = "Log: "; break;
41 | case LogType.Warning: ColorTag = "Warning: "; break;
42 | case LogType.Error: ColorTag = "Error: "; break;
43 | case LogType.Exception: ColorTag = "Exception: "; break;
44 | case LogType.Assert: ColorTag = "Assert: "; break;
45 | }
46 | string ColorTagEnd = " ";
47 |
48 | return ColorTag + str + ColorTagEnd;
49 | }
50 | }
51 | private sealed class LogBuffer
52 | {
53 | public int MaxCount = 30;
54 |
55 | public bool ShowLog = true;
56 | public bool ShowWaring = true;
57 | public bool ShowError = true;
58 |
59 | public bool WriteToFile = false;
60 |
61 | private List buffer = new List();
62 |
63 |
64 | public void Add(SealedLog log)
65 | {
66 | buffer.Add(log);
67 | if (buffer.Count > MaxCount)
68 | buffer.RemoveAt(0);
69 |
70 | if (WriteToFile)
71 | File.AppendAllText(@".\UnityConsoleInjected.log", log.ToRawString());
72 | }
73 | public void Clear()
74 | {
75 | buffer.Clear();
76 | }
77 | public override string ToString()
78 | {
79 | string str = string.Empty;
80 | foreach (SealedLog l in buffer)
81 | {
82 | if (!ShowLog && l.type == LogType.Log) continue;
83 | if (!ShowWaring && l.type == LogType.Warning) continue;
84 | if (!ShowError && (l.type == LogType.Error || l.type == LogType.Exception || l.type == LogType.Assert)) continue;
85 | str += l.ToString();
86 | }
87 | return str;
88 | }
89 | }
90 |
91 | private void Awake()
92 | {
93 | Application.logMessageReceived +=
94 | (string condition, string stackTrace, LogType type) =>
95 | {
96 | ScrollPosition = new Vector2(0, System.Single.MaxValue - 1);
97 |
98 | SealedLog sealedLog = new SealedLog()
99 | {
100 | time = System.DateTime.Now,
101 | type = type,
102 | condition = condition,
103 | stackTrace = stackTrace
104 | };
105 |
106 | logBuffer.Add(sealedLog);
107 | };
108 | }
109 | private void OnGUI()
110 | {
111 | if (!Active) return;
112 | AllRect.ConsoleRect = GUILayout.Window(WindowID.CONSOLE, AllRect.ConsoleRect, (id) =>
113 | {
114 | GUILayout.BeginHorizontal();
115 | logBuffer.ShowLog = GUILayout.Toggle(logBuffer.ShowLog, "Log");
116 | logBuffer.ShowWaring = GUILayout.Toggle(logBuffer.ShowWaring, "Warning");
117 | logBuffer.ShowError = GUILayout.Toggle(logBuffer.ShowError, "Error");
118 | logBuffer.WriteToFile = GUILayout.Toggle(logBuffer.WriteToFile, "Write2File");
119 | GUILayout.EndHorizontal();
120 |
121 | ScrollPosition = GUILayout.BeginScrollView(ScrollPosition);
122 | GUILayout.Label(logBuffer.ToString(), AllGUIStyle.DEFAULT_LABEL);
123 | GUILayout.EndScrollView();
124 |
125 |
126 | GUILayout.BeginHorizontal();
127 | if (GUILayout.Button("Clr")) logBuffer.Clear();
128 | if (GUILayout.Button("Close")) Active = false;
129 | GUILayout.EndHorizontal();
130 |
131 |
132 | GUI.DragWindow(new Rect(0, 0, AllRect.ConsoleRect.width, 20));
133 | }, "Console", AllGUIStyle.DEFAULT_WINDOW);
134 | }
135 | private void Update()
136 | {
137 | if (Input.GetKeyDown(Switch)) Active = !Active;
138 | }
139 | }
140 | }
141 |
--------------------------------------------------------------------------------
/AssetBundle/ProjectSettings/QualitySettings.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!47 &1
4 | QualitySettings:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 5
7 | m_CurrentQuality: 5
8 | m_QualitySettings:
9 | - serializedVersion: 2
10 | name: Very Low
11 | pixelLightCount: 0
12 | shadows: 0
13 | shadowResolution: 0
14 | shadowProjection: 1
15 | shadowCascades: 1
16 | shadowDistance: 15
17 | shadowNearPlaneOffset: 3
18 | shadowCascade2Split: 0.33333334
19 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667}
20 | shadowmaskMode: 0
21 | blendWeights: 1
22 | textureQuality: 1
23 | anisotropicTextures: 0
24 | antiAliasing: 0
25 | softParticles: 0
26 | softVegetation: 0
27 | realtimeReflectionProbes: 0
28 | billboardsFaceCameraPosition: 0
29 | vSyncCount: 0
30 | lodBias: 0.3
31 | maximumLODLevel: 0
32 | particleRaycastBudget: 4
33 | asyncUploadTimeSlice: 2
34 | asyncUploadBufferSize: 4
35 | resolutionScalingFixedDPIFactor: 1
36 | excludedTargetPlatforms: []
37 | - serializedVersion: 2
38 | name: Low
39 | pixelLightCount: 0
40 | shadows: 0
41 | shadowResolution: 0
42 | shadowProjection: 1
43 | shadowCascades: 1
44 | shadowDistance: 20
45 | shadowNearPlaneOffset: 3
46 | shadowCascade2Split: 0.33333334
47 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667}
48 | shadowmaskMode: 0
49 | blendWeights: 2
50 | textureQuality: 0
51 | anisotropicTextures: 0
52 | antiAliasing: 0
53 | softParticles: 0
54 | softVegetation: 0
55 | realtimeReflectionProbes: 0
56 | billboardsFaceCameraPosition: 0
57 | vSyncCount: 0
58 | lodBias: 0.4
59 | maximumLODLevel: 0
60 | particleRaycastBudget: 16
61 | asyncUploadTimeSlice: 2
62 | asyncUploadBufferSize: 4
63 | resolutionScalingFixedDPIFactor: 1
64 | excludedTargetPlatforms: []
65 | - serializedVersion: 2
66 | name: Medium
67 | pixelLightCount: 1
68 | shadows: 1
69 | shadowResolution: 0
70 | shadowProjection: 1
71 | shadowCascades: 1
72 | shadowDistance: 20
73 | shadowNearPlaneOffset: 3
74 | shadowCascade2Split: 0.33333334
75 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667}
76 | shadowmaskMode: 0
77 | blendWeights: 2
78 | textureQuality: 0
79 | anisotropicTextures: 1
80 | antiAliasing: 0
81 | softParticles: 0
82 | softVegetation: 0
83 | realtimeReflectionProbes: 0
84 | billboardsFaceCameraPosition: 0
85 | vSyncCount: 1
86 | lodBias: 0.7
87 | maximumLODLevel: 0
88 | particleRaycastBudget: 64
89 | asyncUploadTimeSlice: 2
90 | asyncUploadBufferSize: 4
91 | resolutionScalingFixedDPIFactor: 1
92 | excludedTargetPlatforms: []
93 | - serializedVersion: 2
94 | name: High
95 | pixelLightCount: 2
96 | shadows: 2
97 | shadowResolution: 1
98 | shadowProjection: 1
99 | shadowCascades: 2
100 | shadowDistance: 40
101 | shadowNearPlaneOffset: 3
102 | shadowCascade2Split: 0.33333334
103 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667}
104 | shadowmaskMode: 1
105 | blendWeights: 2
106 | textureQuality: 0
107 | anisotropicTextures: 1
108 | antiAliasing: 0
109 | softParticles: 0
110 | softVegetation: 1
111 | realtimeReflectionProbes: 1
112 | billboardsFaceCameraPosition: 1
113 | vSyncCount: 1
114 | lodBias: 1
115 | maximumLODLevel: 0
116 | particleRaycastBudget: 256
117 | asyncUploadTimeSlice: 2
118 | asyncUploadBufferSize: 4
119 | resolutionScalingFixedDPIFactor: 1
120 | excludedTargetPlatforms: []
121 | - serializedVersion: 2
122 | name: Very High
123 | pixelLightCount: 3
124 | shadows: 2
125 | shadowResolution: 2
126 | shadowProjection: 1
127 | shadowCascades: 2
128 | shadowDistance: 70
129 | shadowNearPlaneOffset: 3
130 | shadowCascade2Split: 0.33333334
131 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667}
132 | shadowmaskMode: 1
133 | blendWeights: 4
134 | textureQuality: 0
135 | anisotropicTextures: 2
136 | antiAliasing: 2
137 | softParticles: 1
138 | softVegetation: 1
139 | realtimeReflectionProbes: 1
140 | billboardsFaceCameraPosition: 1
141 | vSyncCount: 1
142 | lodBias: 1.5
143 | maximumLODLevel: 0
144 | particleRaycastBudget: 1024
145 | asyncUploadTimeSlice: 2
146 | asyncUploadBufferSize: 4
147 | resolutionScalingFixedDPIFactor: 1
148 | excludedTargetPlatforms: []
149 | - serializedVersion: 2
150 | name: Ultra
151 | pixelLightCount: 4
152 | shadows: 2
153 | shadowResolution: 2
154 | shadowProjection: 1
155 | shadowCascades: 4
156 | shadowDistance: 150
157 | shadowNearPlaneOffset: 3
158 | shadowCascade2Split: 0.33333334
159 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667}
160 | shadowmaskMode: 1
161 | blendWeights: 4
162 | textureQuality: 0
163 | anisotropicTextures: 2
164 | antiAliasing: 2
165 | softParticles: 1
166 | softVegetation: 1
167 | realtimeReflectionProbes: 1
168 | billboardsFaceCameraPosition: 1
169 | vSyncCount: 1
170 | lodBias: 2
171 | maximumLODLevel: 0
172 | particleRaycastBudget: 4096
173 | asyncUploadTimeSlice: 2
174 | asyncUploadBufferSize: 4
175 | resolutionScalingFixedDPIFactor: 1
176 | excludedTargetPlatforms: []
177 | m_PerPlatformDefaultQuality:
178 | Android: 2
179 | Nintendo 3DS: 5
180 | Nintendo Switch: 5
181 | PS4: 5
182 | PSM: 5
183 | PSP2: 2
184 | Samsung TV: 2
185 | Standalone: 5
186 | Tizen: 2
187 | Web: 5
188 | WebGL: 3
189 | WiiU: 5
190 | Windows Store Apps: 5
191 | XboxOne: 5
192 | iPhone: 2
193 | tvOS: 2
194 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Inject Asset Bundle Project
2 | /AssetBundle/.vs/
3 | /AssetBundle/Debug/
4 | /AssetBundle/Library/
5 | /AssetBundle/Temp/
6 | /AssetBundle/Obj/
7 | /AssetBundle/*.csproj
8 | /AssetBundle/*.userprefs
9 | /AssetBundle/*.sln
10 |
11 |
12 | ## Ignore Visual Studio temporary files, build results, and
13 | ## files generated by popular Visual Studio add-ons.
14 |
15 | # User-specific files
16 | *.suo
17 | *.user
18 | *.userosscache
19 | *.sln.docstates
20 |
21 | # User-specific files (MonoDevelop/Xamarin Studio)
22 | *.userprefs
23 |
24 | # Build results
25 | [Dd]ebug/
26 | [Dd]ebugPublic/
27 | [Rr]elease/
28 | [Rr]eleases/
29 | x64/
30 | x86/
31 | bld/
32 | [Bb]in/
33 | [Oo]bj/
34 | [Ll]og/
35 |
36 | # Visual Studio 2015 cache/options directory
37 | .vs/
38 | # Uncomment if you have tasks that create the project's static files in wwwroot
39 | #wwwroot/
40 |
41 | # MSTest test Results
42 | [Tt]est[Rr]esult*/
43 | [Bb]uild[Ll]og.*
44 |
45 | # NUNIT
46 | *.VisualState.xml
47 | TestResult.xml
48 |
49 | # Build Results of an ATL Project
50 | [Dd]ebugPS/
51 | [Rr]eleasePS/
52 | dlldata.c
53 |
54 | # DNX
55 | project.lock.json
56 | project.fragment.lock.json
57 | artifacts/
58 |
59 | *_i.c
60 | *_p.c
61 | *_i.h
62 | *.ilk
63 | *.meta
64 | *.obj
65 | *.pch
66 | *.pdb
67 | *.pgc
68 | *.pgd
69 | *.rsp
70 | *.sbr
71 | *.tlb
72 | *.tli
73 | *.tlh
74 | *.tmp
75 | *.tmp_proj
76 | *.log
77 | *.vspscc
78 | *.vssscc
79 | .builds
80 | *.pidb
81 | *.svclog
82 | *.scc
83 |
84 | # Chutzpah Test files
85 | _Chutzpah*
86 |
87 | # Visual C++ cache files
88 | ipch/
89 | *.aps
90 | *.ncb
91 | *.opendb
92 | *.opensdf
93 | *.sdf
94 | *.cachefile
95 | *.VC.db
96 | *.VC.VC.opendb
97 |
98 | # Visual Studio profiler
99 | *.psess
100 | *.vsp
101 | *.vspx
102 | *.sap
103 |
104 | # TFS 2012 Local Workspace
105 | $tf/
106 |
107 | # Guidance Automation Toolkit
108 | *.gpState
109 |
110 | # ReSharper is a .NET coding add-in
111 | _ReSharper*/
112 | *.[Rr]e[Ss]harper
113 | *.DotSettings.user
114 |
115 | # JustCode is a .NET coding add-in
116 | .JustCode
117 |
118 | # TeamCity is a build add-in
119 | _TeamCity*
120 |
121 | # DotCover is a Code Coverage Tool
122 | *.dotCover
123 |
124 | # NCrunch
125 | _NCrunch_*
126 | .*crunch*.local.xml
127 | nCrunchTemp_*
128 |
129 | # MightyMoose
130 | *.mm.*
131 | AutoTest.Net/
132 |
133 | # Web workbench (sass)
134 | .sass-cache/
135 |
136 | # Installshield output folder
137 | [Ee]xpress/
138 |
139 | # DocProject is a documentation generator add-in
140 | DocProject/buildhelp/
141 | DocProject/Help/*.HxT
142 | DocProject/Help/*.HxC
143 | DocProject/Help/*.hhc
144 | DocProject/Help/*.hhk
145 | DocProject/Help/*.hhp
146 | DocProject/Help/Html2
147 | DocProject/Help/html
148 |
149 | # Click-Once directory
150 | publish/
151 |
152 | # Publish Web Output
153 | *.[Pp]ublish.xml
154 | *.azurePubxml
155 | # TODO: Comment the next line if you want to checkin your web deploy settings
156 | # but database connection strings (with potential passwords) will be unencrypted
157 | #*.pubxml
158 | *.publishproj
159 |
160 | # Microsoft Azure Web App publish settings. Comment the next line if you want to
161 | # checkin your Azure Web App publish settings, but sensitive information contained
162 | # in these scripts will be unencrypted
163 | PublishScripts/
164 |
165 | # NuGet Packages
166 | *.nupkg
167 | # The packages folder can be ignored because of Package Restore
168 | **/packages/*
169 | # except build/, which is used as an MSBuild target.
170 | !**/packages/build/
171 | # Uncomment if necessary however generally it will be regenerated when needed
172 | #!**/packages/repositories.config
173 | # NuGet v3's project.json files produces more ignoreable files
174 | *.nuget.props
175 | *.nuget.targets
176 |
177 | # Microsoft Azure Build Output
178 | csx/
179 | *.build.csdef
180 |
181 | # Microsoft Azure Emulator
182 | ecf/
183 | rcf/
184 |
185 | # Windows Store app package directories and files
186 | AppPackages/
187 | BundleArtifacts/
188 | Package.StoreAssociation.xml
189 | _pkginfo.txt
190 |
191 | # Visual Studio cache files
192 | # files ending in .cache can be ignored
193 | *.[Cc]ache
194 | # but keep track of directories ending in .cache
195 | !*.[Cc]ache/
196 |
197 | # Others
198 | ClientBin/
199 | ~$*
200 | *~
201 | *.dbmdl
202 | *.dbproj.schemaview
203 | *.jfm
204 | *.pfx
205 | *.publishsettings
206 | node_modules/
207 | orleans.codegen.cs
208 |
209 | # Since there are multiple workflows, uncomment next line to ignore bower_components
210 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
211 | #bower_components/
212 |
213 | # RIA/Silverlight projects
214 | Generated_Code/
215 |
216 | # Backup & report files from converting an old project file
217 | # to a newer Visual Studio version. Backup files are not needed,
218 | # because we have git ;-)
219 | _UpgradeReport_Files/
220 | Backup*/
221 | UpgradeLog*.XML
222 | UpgradeLog*.htm
223 |
224 | # SQL Server files
225 | *.mdf
226 | *.ldf
227 |
228 | # Business Intelligence projects
229 | *.rdl.data
230 | *.bim.layout
231 | *.bim_*.settings
232 |
233 | # Microsoft Fakes
234 | FakesAssemblies/
235 |
236 | # GhostDoc plugin setting file
237 | *.GhostDoc.xml
238 |
239 | # Node.js Tools for Visual Studio
240 | .ntvs_analysis.dat
241 |
242 | # Visual Studio 6 build log
243 | *.plg
244 |
245 | # Visual Studio 6 workspace options file
246 | *.opt
247 |
248 | # Visual Studio LightSwitch build output
249 | **/*.HTMLClient/GeneratedArtifacts
250 | **/*.DesktopClient/GeneratedArtifacts
251 | **/*.DesktopClient/ModelManifest.xml
252 | **/*.Server/GeneratedArtifacts
253 | **/*.Server/ModelManifest.xml
254 | _Pvt_Extensions
255 |
256 | # Paket dependency manager
257 | .paket/paket.exe
258 | paket-files/
259 |
260 | # FAKE - F# Make
261 | .fake/
262 |
263 | # JetBrains Rider
264 | .idea/
265 | *.sln.iml
266 |
267 | # CodeRush
268 | .cr/
269 |
270 | # Python Tools for Visual Studio (PTVS)
271 | __pycache__/
272 | *.pyc
--------------------------------------------------------------------------------
/Payload/MonoScript/FreeCamera.cs:
--------------------------------------------------------------------------------
1 | using UnityEngine;
2 |
3 | namespace Payload.MonoScript
4 | {
5 | public class FreeCamera : MonoBehaviour
6 | {
7 | private Vector3 DefaultPosition;
8 | private Quaternion DefaultRotation;
9 | private Vector3 NewPosition;
10 | private Quaternion NewRotation;
11 | public float RotationSpeed = 1f;
12 | public float MoveSpeed = 10f;
13 |
14 |
15 | private void Awake()
16 | {
17 | Activate();
18 | }
19 | void Update()
20 | {
21 | if (!Input.GetKey(KeyCode.LeftAlt)) return;
22 |
23 | xDeg += Input.GetAxis("Mouse X") * RotationSpeed;
24 | yDeg -= Input.GetAxis("Mouse Y") * RotationSpeed;
25 | yDeg = Utils.ClampAngle(yDeg, -80, 80);
26 |
27 | spd = 0f;
28 | if (Input.GetMouseButton(0))
29 | spd = MoveSpeed;
30 | if (Input.GetMouseButton(1))
31 | spd = -MoveSpeed;
32 | if (Input.GetKey(KeyCode.LeftShift))
33 | spd *= 2f;
34 | }
35 |
36 | private float xDeg = 0.0f;
37 | private float yDeg = 0.0f;
38 | private float spd = 0f;
39 | private void LateUpdate()
40 | {
41 | transform.position = NewPosition;
42 | transform.rotation = NewRotation;
43 |
44 | transform.rotation = Quaternion.Lerp(transform.rotation, Quaternion.Euler(yDeg, xDeg, 0), Time.deltaTime * 5f);
45 | transform.position += transform.rotation * Vector3.forward * Time.deltaTime * spd;
46 |
47 | NewPosition = transform.position;
48 | NewRotation = transform.rotation;
49 | }
50 | private void OnGUI()
51 | {
52 | GUI.Label(new Rect(Input.mousePosition.x, Screen.height - Input.mousePosition.y, Screen.width, Screen.height), "" + AimingObjName + "");
53 | AllRect.FreeCamRect = GUILayout.Window(WindowID.FREE_CAM_VALUES, AllRect.FreeCamRect, (id) =>
54 | {
55 | if (GUILayout.Button("Update Collider Cache"))
56 | {
57 | drawCollider.UpdateCache(FindObjectsOfType(), GetComponent().transform.position, DrawDistance, "");
58 | }
59 |
60 | GUILayout.BeginHorizontal();
61 | GUILayout.Label("Mov Speed:", GUILayout.Width(110));
62 | MoveSpeed = GUILayout.HorizontalSlider(MoveSpeed, 0f, 200f);
63 | GUILayout.EndHorizontal();
64 |
65 | GUILayout.BeginHorizontal();
66 | GUILayout.Label("Rot Speed:", GUILayout.Width(110));
67 | RotationSpeed = GUILayout.HorizontalSlider(RotationSpeed, 0f, 1f);
68 | GUILayout.EndHorizontal();
69 |
70 | GUILayout.BeginHorizontal();
71 | GUILayout.Label("GizmosDist(0-500)", GUILayout.Width(110));
72 | DrawDistance = GUILayout.HorizontalSlider(DrawDistance, 0f, 500f);
73 | GUILayout.EndHorizontal();
74 |
75 | if (GUILayout.Button("Deactivate"))
76 | DeActivate();
77 |
78 | GUI.DragWindow(new Rect(0, 0, AllRect.FreeCamRect.width, 20));
79 | }, "Free Camera", AllGUIStyle.DEFAULT_WINDOW);
80 | }
81 |
82 | void Activate()
83 | {
84 | DefaultPosition = transform.position;
85 | DefaultRotation = transform.rotation;
86 |
87 | NewPosition = transform.position;
88 | NewRotation = transform.rotation;
89 |
90 | xDeg = Vector3.Angle(Vector3.right, transform.right);
91 | yDeg = Vector3.Angle(Vector3.up, transform.up);
92 | }
93 | void DeActivate()
94 | {
95 | transform.position = DefaultPosition;
96 | transform.rotation = DefaultRotation;
97 | Destroy(this);
98 | }
99 |
100 |
101 | //Collider Outline
102 | private new Camera camera;
103 | private Material LineMat;
104 | private float DrawDistance = 100f;
105 | private DrawCollider drawCollider;
106 |
107 | private void Start()
108 | {
109 | camera = GetComponent();
110 | drawCollider = new DrawCollider();
111 | //TODO:May not included in build
112 | LineMat = new Material(Shader.Find("Hidden/Internal-Colored"));
113 | LineMat.SetInt("_ZTest", (int)UnityEngine.Rendering.CompareFunction.Disabled);
114 | drawCollider.UpdateCache(FindObjectsOfType(), GetComponent().transform.position, DrawDistance, "");
115 | }
116 | private void OnPostRender()
117 | {
118 | drawCollider.OnPostRenderer(LineMat);
119 | }
120 |
121 |
122 | //Using Raycast to get aiming obj names.
123 | private string AimingObjName = string.Empty;
124 | private void FixedUpdate()
125 | {
126 | AimingObjName = MouseRayCastCollider();
127 | }
128 | private string MouseRayCastCollider()
129 | {
130 | string str = string.Empty;
131 | RaycastHit[] hits = Physics.RaycastAll(camera.ScreenPointToRay(Input.mousePosition), DrawDistance);
132 | foreach (RaycastHit hit in hits)
133 | {
134 | str += Utils.GetGameObjectPath(hit.transform.gameObject) + "\n";
135 | }
136 |
137 | RaycastHit2D[] hit2ds = new RaycastHit2D[0];
138 |
139 | if (camera.orthographic) hit2ds = Physics2D.RaycastAll(camera.ScreenToWorldPoint(Input.mousePosition), Vector2.zero);
140 | else hit2ds = Physics2D.RaycastAll(Utils.ScreenToWorldPointPerspective(Input.mousePosition, camera), Vector2.zero);
141 | foreach (RaycastHit2D hit2d in hit2ds)
142 | {
143 | if (hit2d)
144 | {
145 | str += Utils.GetGameObjectPath(hit2d.transform.gameObject) + "\n";
146 | }
147 | }
148 | return str;
149 | }
150 | }
151 | }
152 |
153 |
154 |
--------------------------------------------------------------------------------
/Payload/MonoScript/Inspector.cs:
--------------------------------------------------------------------------------
1 | using UnityEngine;
2 |
3 | namespace Payload.MonoScript
4 | {
5 | public class Inspector:MonoBehaviour
6 | {
7 | private bool Active = false;
8 |
9 | private float MvSpd = 10f;
10 |
11 | private Transform TargetTransform;
12 | private Reflector TargetComponentModifier;
13 | private Reflector.VarLocker varLocker = new Reflector.VarLocker();
14 |
15 | private Vector2 ScrollPosition = new Vector2();
16 | private Vector2 ScrollPositionProp = new Vector2();
17 |
18 | private static Inspector Instance = null;
19 | private void Awake()
20 | {
21 | Instance = this;
22 | }
23 |
24 | private void Update()
25 | {
26 | if (Active)
27 | {
28 | if (MvSpd < 0f) MvSpd = 0f;
29 |
30 | if (TargetTransform)
31 | MovingInput();
32 | else
33 | {
34 | this.InjectLogError("GameObject Has Been Destoried!");
35 | DeActivate();
36 | }
37 | }
38 | }
39 | private void LateUpdate()
40 | {
41 | varLocker.LockUpdate();
42 | }
43 |
44 | private void DeActivate()
45 | {
46 | Active = false;
47 | TargetTransform = null;
48 | TargetComponentModifier = null;
49 | }
50 | private void Activate()
51 | {
52 | GameObject go = GameObject.Find(TransformPath);
53 |
54 | if (go)
55 | {
56 | Active = true;
57 | TargetTransform = go.transform;
58 | TargetComponentModifier = null;
59 | }
60 | else
61 | {
62 | this.InjectLogError("GameObject Not Found!Are you sure you entered the right path?");
63 |
64 | Active = false;
65 | TargetTransform = null;
66 | TargetComponentModifier = null;
67 | }
68 | }
69 | private void MovingInput()
70 | {
71 | if (Input.GetKey(KeyCode.UpArrow))
72 | {
73 | TargetTransform.position += Vector3.up * MvSpd * Time.deltaTime;
74 | }
75 | if (Input.GetKey(KeyCode.DownArrow))
76 | {
77 | TargetTransform.position += Vector3.down * MvSpd * Time.deltaTime;
78 | }
79 | if (Input.GetKey(KeyCode.LeftArrow))
80 | {
81 | TargetTransform.position += Vector3.left * MvSpd * Time.deltaTime;
82 | }
83 | if (Input.GetKey(KeyCode.RightArrow))
84 | {
85 | TargetTransform.position += Vector3.right * MvSpd * Time.deltaTime;
86 | }
87 | if (Input.GetKey(KeyCode.RightShift))
88 | {
89 | TargetTransform.position += Vector3.forward * MvSpd * Time.deltaTime;
90 | }
91 | if (Input.GetKey(KeyCode.RightControl))
92 | {
93 | TargetTransform.position += Vector3.back * MvSpd * Time.deltaTime;
94 | }
95 | }
96 |
97 | private string TransformPath = string.Empty;
98 | private void OnGUI()
99 | {
100 | if (Active)
101 | {
102 | if (TargetTransform)
103 | {
104 | OnGUIComponentWindow();
105 | if (TargetComponentModifier != null)
106 | OnGUIPropertyWindow();
107 | }
108 | }
109 | }
110 |
111 | private void OnGUIComponentWindow()
112 | {
113 | AllRect.CompoRect = GUILayout.Window(WindowID.TRANSFORM_MODIFIER_COMPONENT_LIST, AllRect.CompoRect, (id) =>
114 | {
115 | GUILayout.BeginHorizontal();
116 | GUILayout.Label("MoveSpd(0-500)", GUILayout.Width(110));
117 | MvSpd = GUILayout.HorizontalSlider(MvSpd, 0f, 200f);
118 | GUILayout.EndHorizontal();
119 |
120 | TargetTransform.gameObject.SetActive(GUILayout.Toggle(TargetTransform.gameObject.activeInHierarchy, "Active"));
121 | GUILayout.Label("Position: " + Utils.Vec32Str(TargetTransform.position));
122 | GUILayout.Label("EulerAng: " + Utils.Vec32Str(TargetTransform.eulerAngles));
123 | GUILayout.Label("Scale: " + Utils.Vec32Str(TargetTransform.lossyScale));
124 |
125 | ScrollPosition = GUILayout.BeginScrollView(ScrollPosition);
126 | GUILayout.BeginVertical();
127 | //
128 | foreach (Component cp in TargetTransform.GetComponents())
129 | {
130 | GUILayout.BeginHorizontal();
131 | if (GUILayout.Button("□", GUILayout.Width(20)))
132 | {
133 | TargetComponentModifier = new Reflector(cp);
134 | }
135 | if (GUILayout.Button("RM", GUILayout.Width(40)))
136 | {
137 | Destroy(cp);
138 | TargetComponentModifier = null;
139 | }
140 | GUILayout.Label(cp.GetType().Name, AllGUIStyle.DEFAULT_LABEL);
141 | GUILayout.EndHorizontal();
142 | }
143 |
144 | GUILayout.EndVertical();
145 | GUILayout.EndScrollView();
146 |
147 | if (GUILayout.Button("Close")) DeActivate();
148 |
149 | GUI.DragWindow(new Rect(0, 0, AllRect.CompoRect.width, 20));
150 | }, "Inspector (" + TargetTransform.gameObject.name + ")", AllGUIStyle.DEFAULT_WINDOW);
151 | }
152 | private void OnGUIPropertyWindow()
153 | {
154 | AllRect.PropRect = GUILayout.Window(WindowID.TRANSFORM_MODIFIER_PROPERTIES_LIST, AllRect.PropRect, (id) =>
155 | {
156 | ScrollPositionProp = GUILayout.BeginScrollView(ScrollPositionProp);
157 |
158 | TargetComponentModifier.DrawVarList(varLocker);
159 |
160 | GUILayout.EndScrollView();
161 |
162 | if (GUILayout.Button("Close"))
163 | {
164 | TargetComponentModifier = null;
165 | }
166 |
167 | GUI.DragWindow(new Rect(0, 0, AllRect.PropRect.width, 20));
168 | }, TargetComponentModifier.component.GetType().Name, AllGUIStyle.DEFAULT_WINDOW);
169 | }
170 |
171 | public static void Activate(Transform transform)
172 | {
173 | if (!Instance)
174 | return;
175 | Instance.TransformPath = Utils.GetGameObjectPath(transform.gameObject);
176 | Instance.Active = true;
177 | Instance.TargetTransform = transform;
178 | Instance.TargetComponentModifier = null;
179 | }
180 | }
181 | }
182 |
--------------------------------------------------------------------------------
/AssetBundle/ProjectSettings/InputManager.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!13 &1
4 | InputManager:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 2
7 | m_Axes:
8 | - serializedVersion: 3
9 | m_Name: Horizontal
10 | descriptiveName:
11 | descriptiveNegativeName:
12 | negativeButton: left
13 | positiveButton: right
14 | altNegativeButton: a
15 | altPositiveButton: d
16 | gravity: 3
17 | dead: 0.001
18 | sensitivity: 3
19 | snap: 1
20 | invert: 0
21 | type: 0
22 | axis: 0
23 | joyNum: 0
24 | - serializedVersion: 3
25 | m_Name: Vertical
26 | descriptiveName:
27 | descriptiveNegativeName:
28 | negativeButton: down
29 | positiveButton: up
30 | altNegativeButton: s
31 | altPositiveButton: w
32 | gravity: 3
33 | dead: 0.001
34 | sensitivity: 3
35 | snap: 1
36 | invert: 0
37 | type: 0
38 | axis: 0
39 | joyNum: 0
40 | - serializedVersion: 3
41 | m_Name: Fire1
42 | descriptiveName:
43 | descriptiveNegativeName:
44 | negativeButton:
45 | positiveButton: left ctrl
46 | altNegativeButton:
47 | altPositiveButton: mouse 0
48 | gravity: 1000
49 | dead: 0.001
50 | sensitivity: 1000
51 | snap: 0
52 | invert: 0
53 | type: 0
54 | axis: 0
55 | joyNum: 0
56 | - serializedVersion: 3
57 | m_Name: Fire2
58 | descriptiveName:
59 | descriptiveNegativeName:
60 | negativeButton:
61 | positiveButton: left alt
62 | altNegativeButton:
63 | altPositiveButton: mouse 1
64 | gravity: 1000
65 | dead: 0.001
66 | sensitivity: 1000
67 | snap: 0
68 | invert: 0
69 | type: 0
70 | axis: 0
71 | joyNum: 0
72 | - serializedVersion: 3
73 | m_Name: Fire3
74 | descriptiveName:
75 | descriptiveNegativeName:
76 | negativeButton:
77 | positiveButton: left shift
78 | altNegativeButton:
79 | altPositiveButton: mouse 2
80 | gravity: 1000
81 | dead: 0.001
82 | sensitivity: 1000
83 | snap: 0
84 | invert: 0
85 | type: 0
86 | axis: 0
87 | joyNum: 0
88 | - serializedVersion: 3
89 | m_Name: Jump
90 | descriptiveName:
91 | descriptiveNegativeName:
92 | negativeButton:
93 | positiveButton: space
94 | altNegativeButton:
95 | altPositiveButton:
96 | gravity: 1000
97 | dead: 0.001
98 | sensitivity: 1000
99 | snap: 0
100 | invert: 0
101 | type: 0
102 | axis: 0
103 | joyNum: 0
104 | - serializedVersion: 3
105 | m_Name: Mouse X
106 | descriptiveName:
107 | descriptiveNegativeName:
108 | negativeButton:
109 | positiveButton:
110 | altNegativeButton:
111 | altPositiveButton:
112 | gravity: 0
113 | dead: 0
114 | sensitivity: 0.1
115 | snap: 0
116 | invert: 0
117 | type: 1
118 | axis: 0
119 | joyNum: 0
120 | - serializedVersion: 3
121 | m_Name: Mouse Y
122 | descriptiveName:
123 | descriptiveNegativeName:
124 | negativeButton:
125 | positiveButton:
126 | altNegativeButton:
127 | altPositiveButton:
128 | gravity: 0
129 | dead: 0
130 | sensitivity: 0.1
131 | snap: 0
132 | invert: 0
133 | type: 1
134 | axis: 1
135 | joyNum: 0
136 | - serializedVersion: 3
137 | m_Name: Mouse ScrollWheel
138 | descriptiveName:
139 | descriptiveNegativeName:
140 | negativeButton:
141 | positiveButton:
142 | altNegativeButton:
143 | altPositiveButton:
144 | gravity: 0
145 | dead: 0
146 | sensitivity: 0.1
147 | snap: 0
148 | invert: 0
149 | type: 1
150 | axis: 2
151 | joyNum: 0
152 | - serializedVersion: 3
153 | m_Name: Horizontal
154 | descriptiveName:
155 | descriptiveNegativeName:
156 | negativeButton:
157 | positiveButton:
158 | altNegativeButton:
159 | altPositiveButton:
160 | gravity: 0
161 | dead: 0.19
162 | sensitivity: 1
163 | snap: 0
164 | invert: 0
165 | type: 2
166 | axis: 0
167 | joyNum: 0
168 | - serializedVersion: 3
169 | m_Name: Vertical
170 | descriptiveName:
171 | descriptiveNegativeName:
172 | negativeButton:
173 | positiveButton:
174 | altNegativeButton:
175 | altPositiveButton:
176 | gravity: 0
177 | dead: 0.19
178 | sensitivity: 1
179 | snap: 0
180 | invert: 1
181 | type: 2
182 | axis: 1
183 | joyNum: 0
184 | - serializedVersion: 3
185 | m_Name: Fire1
186 | descriptiveName:
187 | descriptiveNegativeName:
188 | negativeButton:
189 | positiveButton: joystick button 0
190 | altNegativeButton:
191 | altPositiveButton:
192 | gravity: 1000
193 | dead: 0.001
194 | sensitivity: 1000
195 | snap: 0
196 | invert: 0
197 | type: 0
198 | axis: 0
199 | joyNum: 0
200 | - serializedVersion: 3
201 | m_Name: Fire2
202 | descriptiveName:
203 | descriptiveNegativeName:
204 | negativeButton:
205 | positiveButton: joystick button 1
206 | altNegativeButton:
207 | altPositiveButton:
208 | gravity: 1000
209 | dead: 0.001
210 | sensitivity: 1000
211 | snap: 0
212 | invert: 0
213 | type: 0
214 | axis: 0
215 | joyNum: 0
216 | - serializedVersion: 3
217 | m_Name: Fire3
218 | descriptiveName:
219 | descriptiveNegativeName:
220 | negativeButton:
221 | positiveButton: joystick button 2
222 | altNegativeButton:
223 | altPositiveButton:
224 | gravity: 1000
225 | dead: 0.001
226 | sensitivity: 1000
227 | snap: 0
228 | invert: 0
229 | type: 0
230 | axis: 0
231 | joyNum: 0
232 | - serializedVersion: 3
233 | m_Name: Jump
234 | descriptiveName:
235 | descriptiveNegativeName:
236 | negativeButton:
237 | positiveButton: joystick button 3
238 | altNegativeButton:
239 | altPositiveButton:
240 | gravity: 1000
241 | dead: 0.001
242 | sensitivity: 1000
243 | snap: 0
244 | invert: 0
245 | type: 0
246 | axis: 0
247 | joyNum: 0
248 | - serializedVersion: 3
249 | m_Name: Submit
250 | descriptiveName:
251 | descriptiveNegativeName:
252 | negativeButton:
253 | positiveButton: return
254 | altNegativeButton:
255 | altPositiveButton: joystick button 0
256 | gravity: 1000
257 | dead: 0.001
258 | sensitivity: 1000
259 | snap: 0
260 | invert: 0
261 | type: 0
262 | axis: 0
263 | joyNum: 0
264 | - serializedVersion: 3
265 | m_Name: Submit
266 | descriptiveName:
267 | descriptiveNegativeName:
268 | negativeButton:
269 | positiveButton: enter
270 | altNegativeButton:
271 | altPositiveButton: space
272 | gravity: 1000
273 | dead: 0.001
274 | sensitivity: 1000
275 | snap: 0
276 | invert: 0
277 | type: 0
278 | axis: 0
279 | joyNum: 0
280 | - serializedVersion: 3
281 | m_Name: Cancel
282 | descriptiveName:
283 | descriptiveNegativeName:
284 | negativeButton:
285 | positiveButton: escape
286 | altNegativeButton:
287 | altPositiveButton: joystick button 1
288 | gravity: 1000
289 | dead: 0.001
290 | sensitivity: 1000
291 | snap: 0
292 | invert: 0
293 | type: 0
294 | axis: 0
295 | joyNum: 0
296 |
--------------------------------------------------------------------------------
/MonoInjector/Injector.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace MonoInjector
7 | {
8 | public class Injector
9 | {
10 | public IntPtr ProcessHandle;
11 |
12 | private Memory _memory;
13 |
14 | private IntPtr _rootDomain;
15 |
16 | private bool _attach;
17 |
18 | private InjectionConfig _config;
19 |
20 | private readonly Dictionary Exports = new Dictionary
21 | {
22 | {"mono_get_root_domain", IntPtr.Zero},
23 | {"mono_thread_attach", IntPtr.Zero},
24 | {"mono_image_open_from_data", IntPtr.Zero},
25 | {"mono_assembly_load_from_full", IntPtr.Zero},
26 | {"mono_assembly_get_image", IntPtr.Zero},
27 | {"mono_class_from_name", IntPtr.Zero},
28 | {"mono_class_get_method_from_name", IntPtr.Zero},
29 | {"mono_runtime_invoke", IntPtr.Zero},
30 | {"mono_assembly_close", IntPtr.Zero}
31 | };
32 |
33 | public Injector(IntPtr processHandle)
34 | {
35 | ProcessHandle = processHandle;
36 | }
37 |
38 | private bool GetExports(IntPtr mod, bool x64)
39 | {
40 | IntPtr exports = mod + _memory.ReadInt(mod + _memory.ReadInt(mod + 0x3C) + (x64 ? 0x88 : 0x78));
41 |
42 | int count = _memory.ReadInt(exports + 0x18);
43 |
44 | IntPtr names = mod + _memory.ReadInt(exports + 0x20);
45 |
46 | IntPtr ordinals = mod + _memory.ReadInt(exports + 0x24);
47 |
48 | IntPtr relatives = mod + _memory.ReadInt(exports + 0x1C);
49 |
50 | for (int i = 0; i < count; i++)
51 | {
52 | string name =
53 | _memory.ReadString(mod + _memory.ReadInt(names + i * 4), 32, Encoding.ASCII);
54 |
55 | if (!Exports.ContainsKey(name))
56 | continue;
57 |
58 | short ordinal = _memory.ReadShort(ordinals + i * 2);
59 |
60 | IntPtr address = mod + _memory.ReadInt(relatives + ordinal * 4);
61 |
62 | Exports[name] = address;
63 | }
64 |
65 | return Exports.All(e => e.Value != IntPtr.Zero);
66 | }
67 |
68 | public void Inject(InjectionConfig cfg)
69 | {
70 | _config = cfg;
71 |
72 | using (_memory = new Memory(ProcessHandle))
73 | {
74 | if (!GetExports(cfg.Target.MonoModuleAddress, cfg.Target.Process.Is64Bit()))
75 | throw new ApplicationException("Unable to obtain the mono function addresses");
76 |
77 | _rootDomain = GetRootDomain();
78 |
79 | Utils.EnsureNotZero(_rootDomain, "GetRootDomain()");
80 |
81 | IntPtr rawImage = OpenImageFromData(cfg.Assembly);
82 |
83 | Utils.EnsureNotZero(rawImage, "OpenImageFromData()");
84 |
85 | _attach = true;
86 |
87 | IntPtr assembly = cfg.AssemblyPointer = OpenAssemblyFromImage(rawImage);
88 |
89 | Utils.EnsureNotZero(assembly, "OpenAssemblyFromImage()");
90 |
91 | IntPtr image = GetImageFromAssembly(assembly);
92 |
93 | Utils.EnsureNotZero(image, "GetImageFromAssembly()");
94 |
95 | IntPtr @class = GetClassFromName(image, cfg.Namespace, cfg.Class);
96 |
97 | Utils.EnsureNotZero(@class, "GetClassFromName()");
98 |
99 | IntPtr method = GetMethodFromName(@class, cfg.Method);
100 |
101 | Utils.EnsureNotZero(method, "GetMethodFromName()");
102 |
103 | bool result = RuntimeInvoke(method);
104 |
105 | _attach = false;
106 |
107 | if (!result)
108 | throw new ApplicationException($"The invocation of {cfg.Class}.{cfg.Method} failed");
109 | }
110 | }
111 |
112 | private IntPtr GetRootDomain()
113 | {
114 | return Execute(Exports["mono_get_root_domain"]);
115 | }
116 |
117 | private IntPtr OpenImageFromData(byte[] assembly)
118 | {
119 | return Execute(Exports["mono_image_open_from_data"],
120 | _memory.AllocateAndWrite(assembly),
121 | (IntPtr)assembly.Length,
122 | (IntPtr)1,
123 | IntPtr.Zero);
124 | }
125 |
126 | private IntPtr OpenAssemblyFromImage(IntPtr image)
127 | {
128 | return Execute(Exports["mono_assembly_load_from_full"],
129 | image, _memory.AllocateAndWrite(new byte[1]), IntPtr.Zero, IntPtr.Zero);
130 | }
131 |
132 | private IntPtr GetImageFromAssembly(IntPtr assembly)
133 | {
134 | return Execute(Exports["mono_assembly_get_image"], assembly);
135 | }
136 |
137 | private IntPtr GetClassFromName(IntPtr image, string @namespace, string @class)
138 | {
139 | return Execute(Exports["mono_class_from_name"], image,
140 | _memory.AllocateAndWrite(Encoding.UTF8.GetBytes(@namespace)),
141 | _memory.AllocateAndWrite(Encoding.UTF8.GetBytes(@class)));
142 | }
143 |
144 | private IntPtr GetMethodFromName(IntPtr @class, string method)
145 | {
146 | return Execute(Exports["mono_class_get_method_from_name"], @class,
147 | _memory.AllocateAndWrite(Encoding.UTF8.GetBytes(method)), IntPtr.Zero);
148 | }
149 |
150 | private bool RuntimeInvoke(IntPtr method)
151 | {
152 | return (int)Execute(Exports["mono_runtime_invoke"], method, IntPtr.Zero,
153 | IntPtr.Zero, IntPtr.Zero) == 0;
154 | }
155 |
156 | private void CloseAssembly(IntPtr assembly)
157 | {
158 | Execute(Exports["mono_assembly_close"], assembly);
159 | }
160 |
161 | public void UnloadAndCloseAssembly(InjectionConfig config, string methodName)
162 | {
163 | using (_memory = new Memory(ProcessHandle))
164 | {
165 | _attach = true;
166 |
167 | IntPtr image = GetImageFromAssembly(config.AssemblyPointer);
168 |
169 | Utils.EnsureNotZero(image, "GetImageFromAssembly()");
170 |
171 | IntPtr @class = GetClassFromName(image, config.Namespace, config.Class);
172 |
173 | Utils.EnsureNotZero(@class, "GetClassFromName()");
174 |
175 | IntPtr method = GetMethodFromName(@class, methodName);
176 |
177 | Utils.EnsureNotZero(method, "GetMethodFromName()");
178 |
179 | RuntimeInvoke(method);
180 |
181 | CloseAssembly(config.AssemblyPointer);
182 |
183 | _attach = false;
184 | }
185 | }
186 |
187 | private IntPtr Execute(IntPtr address, params IntPtr[] args)
188 | {
189 | byte[] code = Assemble(address, args);
190 | IntPtr alloc = _memory.AllocateAndWrite(code);
191 |
192 | return GetThreadReturnValue(
193 | Native.CreateRemoteThread(
194 | ProcessHandle, IntPtr.Zero, 0, alloc, IntPtr.Zero, 0, out _));
195 | }
196 |
197 | private byte[] Assemble(IntPtr address, IntPtr[] args)
198 | {
199 | Assembler asm = new Assembler();
200 |
201 | if (_config.Target.Process.Is64Bit())
202 | {
203 | asm.SubRsp(40);
204 |
205 | if (_attach)
206 | {
207 | asm.MovRax(Exports["mono_thread_attach"]);
208 | asm.MovRcx(_rootDomain);
209 | asm.CallRax();
210 | }
211 |
212 | asm.MovRax(address);
213 |
214 | for (int i = 0; i < args.Length; i++)
215 | {
216 | switch (i)
217 | {
218 | case 0:
219 | asm.MovRcx(args[i]);
220 | break;
221 | case 1:
222 | asm.MovRdx(args[i]);
223 | break;
224 | case 2:
225 | asm.MovR8(args[i]);
226 | break;
227 | case 3:
228 | asm.MovR9(args[i]);
229 | break;
230 | }
231 | }
232 |
233 | asm.CallRax();
234 | asm.AddRsp(40);
235 | }
236 | else
237 | {
238 | if (_attach)
239 | {
240 | asm.Push(_rootDomain);
241 | asm.MovEax(Exports["mono_thread_attach"]);
242 | asm.CallEax();
243 | asm.AddEsp(4);
244 | }
245 |
246 | for (int i = args.Length - 1; i >= 0; i--)
247 | asm.Push(args[i]);
248 |
249 | asm.MovEax(address);
250 | asm.CallEax();
251 | asm.AddEsp((byte)(args.Length * 4));
252 | }
253 |
254 | asm.Return();
255 |
256 | return asm.ToByteArray();
257 | }
258 |
259 | private IntPtr GetThreadReturnValue(IntPtr hThread)
260 | {
261 | Native.WaitForSingleObject(hThread, -1);
262 | Native.GetExitCodeThread(hThread, out IntPtr exitCode);
263 | return exitCode;
264 | }
265 | }
266 | }
267 |
--------------------------------------------------------------------------------
/AssetBundle/Assets/BuildTest.unity:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!29 &1
4 | OcclusionCullingSettings:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 2
7 | m_OcclusionBakeSettings:
8 | smallestOccluder: 5
9 | smallestHole: 0.25
10 | backfaceThreshold: 100
11 | m_SceneGUID: 00000000000000000000000000000000
12 | m_OcclusionCullingData: {fileID: 0}
13 | --- !u!104 &2
14 | RenderSettings:
15 | m_ObjectHideFlags: 0
16 | serializedVersion: 8
17 | m_Fog: 0
18 | m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1}
19 | m_FogMode: 3
20 | m_FogDensity: 0.01
21 | m_LinearFogStart: 0
22 | m_LinearFogEnd: 300
23 | m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1}
24 | m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1}
25 | m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1}
26 | m_AmbientIntensity: 1
27 | m_AmbientMode: 0
28 | m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1}
29 | m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0}
30 | m_HaloStrength: 0.5
31 | m_FlareStrength: 1
32 | m_FlareFadeSpeed: 3
33 | m_HaloTexture: {fileID: 0}
34 | m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0}
35 | m_DefaultReflectionMode: 0
36 | m_DefaultReflectionResolution: 128
37 | m_ReflectionBounces: 1
38 | m_ReflectionIntensity: 1
39 | m_CustomReflection: {fileID: 0}
40 | m_Sun: {fileID: 0}
41 | m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1}
42 | --- !u!157 &3
43 | LightmapSettings:
44 | m_ObjectHideFlags: 0
45 | serializedVersion: 11
46 | m_GIWorkflowMode: 1
47 | m_GISettings:
48 | serializedVersion: 2
49 | m_BounceScale: 1
50 | m_IndirectOutputScale: 1
51 | m_AlbedoBoost: 1
52 | m_TemporalCoherenceThreshold: 1
53 | m_EnvironmentLightingMode: 0
54 | m_EnableBakedLightmaps: 1
55 | m_EnableRealtimeLightmaps: 1
56 | m_LightmapEditorSettings:
57 | serializedVersion: 9
58 | m_Resolution: 2
59 | m_BakeResolution: 40
60 | m_TextureWidth: 1024
61 | m_TextureHeight: 1024
62 | m_AO: 0
63 | m_AOMaxDistance: 1
64 | m_CompAOExponent: 1
65 | m_CompAOExponentDirect: 0
66 | m_Padding: 2
67 | m_LightmapParameters: {fileID: 0}
68 | m_LightmapsBakeMode: 1
69 | m_TextureCompression: 1
70 | m_FinalGather: 0
71 | m_FinalGatherFiltering: 1
72 | m_FinalGatherRayCount: 256
73 | m_ReflectionCompression: 2
74 | m_MixedBakeMode: 2
75 | m_BakeBackend: 0
76 | m_PVRSampling: 1
77 | m_PVRDirectSampleCount: 32
78 | m_PVRSampleCount: 500
79 | m_PVRBounces: 2
80 | m_PVRFiltering: 0
81 | m_PVRFilteringMode: 1
82 | m_PVRCulling: 1
83 | m_PVRFilteringGaussRadiusDirect: 1
84 | m_PVRFilteringGaussRadiusIndirect: 5
85 | m_PVRFilteringGaussRadiusAO: 2
86 | m_PVRFilteringAtrousColorSigma: 1
87 | m_PVRFilteringAtrousNormalSigma: 1
88 | m_PVRFilteringAtrousPositionSigma: 1
89 | m_LightingDataAsset: {fileID: 0}
90 | m_UseShadowmask: 1
91 | --- !u!196 &4
92 | NavMeshSettings:
93 | serializedVersion: 2
94 | m_ObjectHideFlags: 0
95 | m_BuildSettings:
96 | serializedVersion: 2
97 | agentTypeID: 0
98 | agentRadius: 0.5
99 | agentHeight: 2
100 | agentSlope: 45
101 | agentClimb: 0.4
102 | ledgeDropHeight: 0
103 | maxJumpAcrossDistance: 0
104 | minRegionArea: 2
105 | manualCellSize: 0
106 | cellSize: 0.16666667
107 | manualTileSize: 0
108 | tileSize: 256
109 | accuratePlacement: 0
110 | m_NavMeshData: {fileID: 0}
111 | --- !u!1 &19717433
112 | GameObject:
113 | m_ObjectHideFlags: 0
114 | m_PrefabParentObject: {fileID: 0}
115 | m_PrefabInternal: {fileID: 0}
116 | serializedVersion: 5
117 | m_Component:
118 | - component: {fileID: 19717434}
119 | - component: {fileID: 19717437}
120 | - component: {fileID: 19717436}
121 | - component: {fileID: 19717435}
122 | - component: {fileID: 19717438}
123 | m_Layer: 0
124 | m_Name: Cube
125 | m_TagString: Untagged
126 | m_Icon: {fileID: 0}
127 | m_NavMeshLayer: 0
128 | m_StaticEditorFlags: 0
129 | m_IsActive: 1
130 | --- !u!4 &19717434
131 | Transform:
132 | m_ObjectHideFlags: 0
133 | m_PrefabParentObject: {fileID: 0}
134 | m_PrefabInternal: {fileID: 0}
135 | m_GameObject: {fileID: 19717433}
136 | m_LocalRotation: {x: 0.35355338, y: 0.35355338, z: -0.1464466, w: 0.8535535}
137 | m_LocalPosition: {x: 0, y: 1, z: -5}
138 | m_LocalScale: {x: 1, y: 1, z: 1}
139 | m_Children: []
140 | m_Father: {fileID: 0}
141 | m_RootOrder: 2
142 | m_LocalEulerAnglesHint: {x: 45, y: 45, z: 0}
143 | --- !u!23 &19717435
144 | MeshRenderer:
145 | m_ObjectHideFlags: 0
146 | m_PrefabParentObject: {fileID: 0}
147 | m_PrefabInternal: {fileID: 0}
148 | m_GameObject: {fileID: 19717433}
149 | m_Enabled: 1
150 | m_CastShadows: 1
151 | m_ReceiveShadows: 1
152 | m_MotionVectors: 1
153 | m_LightProbeUsage: 1
154 | m_ReflectionProbeUsage: 1
155 | m_Materials:
156 | - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0}
157 | m_StaticBatchInfo:
158 | firstSubMesh: 0
159 | subMeshCount: 0
160 | m_StaticBatchRoot: {fileID: 0}
161 | m_ProbeAnchor: {fileID: 0}
162 | m_LightProbeVolumeOverride: {fileID: 0}
163 | m_ScaleInLightmap: 1
164 | m_PreserveUVs: 1
165 | m_IgnoreNormalsForChartDetection: 0
166 | m_ImportantGI: 0
167 | m_SelectedEditorRenderState: 3
168 | m_MinimumChartSize: 4
169 | m_AutoUVMaxDistance: 0.5
170 | m_AutoUVMaxAngle: 89
171 | m_LightmapParameters: {fileID: 0}
172 | m_SortingLayerID: 0
173 | m_SortingLayer: 0
174 | m_SortingOrder: 0
175 | --- !u!65 &19717436
176 | BoxCollider:
177 | m_ObjectHideFlags: 0
178 | m_PrefabParentObject: {fileID: 0}
179 | m_PrefabInternal: {fileID: 0}
180 | m_GameObject: {fileID: 19717433}
181 | m_Material: {fileID: 0}
182 | m_IsTrigger: 0
183 | m_Enabled: 1
184 | serializedVersion: 2
185 | m_Size: {x: 1, y: 1, z: 1}
186 | m_Center: {x: 0, y: 0, z: 0}
187 | --- !u!33 &19717437
188 | MeshFilter:
189 | m_ObjectHideFlags: 0
190 | m_PrefabParentObject: {fileID: 0}
191 | m_PrefabInternal: {fileID: 0}
192 | m_GameObject: {fileID: 19717433}
193 | m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
194 | --- !u!114 &19717438
195 | MonoBehaviour:
196 | m_ObjectHideFlags: 0
197 | m_PrefabParentObject: {fileID: 0}
198 | m_PrefabInternal: {fileID: 0}
199 | m_GameObject: {fileID: 19717433}
200 | m_Enabled: 1
201 | m_EditorHideFlags: 0
202 | m_Script: {fileID: 11500000, guid: b57ec86252eab41498760eed677e8893, type: 3}
203 | m_Name:
204 | m_EditorClassIdentifier:
205 | light: {fileID: 31165551}
206 | TestField: 1
207 | --- !u!1 &31165550
208 | GameObject:
209 | m_ObjectHideFlags: 0
210 | m_PrefabParentObject: {fileID: 0}
211 | m_PrefabInternal: {fileID: 0}
212 | serializedVersion: 5
213 | m_Component:
214 | - component: {fileID: 31165552}
215 | - component: {fileID: 31165551}
216 | m_Layer: 0
217 | m_Name: Directional Light
218 | m_TagString: Untagged
219 | m_Icon: {fileID: 0}
220 | m_NavMeshLayer: 0
221 | m_StaticEditorFlags: 0
222 | m_IsActive: 1
223 | --- !u!108 &31165551
224 | Light:
225 | m_ObjectHideFlags: 0
226 | m_PrefabParentObject: {fileID: 0}
227 | m_PrefabInternal: {fileID: 0}
228 | m_GameObject: {fileID: 31165550}
229 | m_Enabled: 1
230 | serializedVersion: 8
231 | m_Type: 1
232 | m_Color: {r: 1, g: 1, b: 1, a: 1}
233 | m_Intensity: 1
234 | m_Range: 10
235 | m_SpotAngle: 30
236 | m_CookieSize: 10
237 | m_Shadows:
238 | m_Type: 2
239 | m_Resolution: -1
240 | m_CustomResolution: -1
241 | m_Strength: 1
242 | m_Bias: 0.05
243 | m_NormalBias: 0.4
244 | m_NearPlane: 0.2
245 | m_Cookie: {fileID: 0}
246 | m_DrawHalo: 0
247 | m_Flare: {fileID: 0}
248 | m_RenderMode: 0
249 | m_CullingMask:
250 | serializedVersion: 2
251 | m_Bits: 4294967295
252 | m_Lightmapping: 4
253 | m_AreaSize: {x: 1, y: 1}
254 | m_BounceIntensity: 1
255 | m_ColorTemperature: 6570
256 | m_UseColorTemperature: 0
257 | m_ShadowRadius: 0
258 | m_ShadowAngle: 0
259 | --- !u!4 &31165552
260 | Transform:
261 | m_ObjectHideFlags: 0
262 | m_PrefabParentObject: {fileID: 0}
263 | m_PrefabInternal: {fileID: 0}
264 | m_GameObject: {fileID: 31165550}
265 | m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261}
266 | m_LocalPosition: {x: 0, y: 3, z: 0}
267 | m_LocalScale: {x: 1, y: 1, z: 1}
268 | m_Children: []
269 | m_Father: {fileID: 0}
270 | m_RootOrder: 1
271 | m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0}
272 | --- !u!1 &1455341783
273 | GameObject:
274 | m_ObjectHideFlags: 0
275 | m_PrefabParentObject: {fileID: 0}
276 | m_PrefabInternal: {fileID: 0}
277 | serializedVersion: 5
278 | m_Component:
279 | - component: {fileID: 1455341788}
280 | - component: {fileID: 1455341787}
281 | - component: {fileID: 1455341786}
282 | - component: {fileID: 1455341785}
283 | - component: {fileID: 1455341784}
284 | m_Layer: 0
285 | m_Name: Main Camera
286 | m_TagString: MainCamera
287 | m_Icon: {fileID: 0}
288 | m_NavMeshLayer: 0
289 | m_StaticEditorFlags: 0
290 | m_IsActive: 1
291 | --- !u!81 &1455341784
292 | AudioListener:
293 | m_ObjectHideFlags: 0
294 | m_PrefabParentObject: {fileID: 0}
295 | m_PrefabInternal: {fileID: 0}
296 | m_GameObject: {fileID: 1455341783}
297 | m_Enabled: 1
298 | --- !u!124 &1455341785
299 | Behaviour:
300 | m_ObjectHideFlags: 0
301 | m_PrefabParentObject: {fileID: 0}
302 | m_PrefabInternal: {fileID: 0}
303 | m_GameObject: {fileID: 1455341783}
304 | m_Enabled: 1
305 | --- !u!92 &1455341786
306 | Behaviour:
307 | m_ObjectHideFlags: 0
308 | m_PrefabParentObject: {fileID: 0}
309 | m_PrefabInternal: {fileID: 0}
310 | m_GameObject: {fileID: 1455341783}
311 | m_Enabled: 1
312 | --- !u!20 &1455341787
313 | Camera:
314 | m_ObjectHideFlags: 0
315 | m_PrefabParentObject: {fileID: 0}
316 | m_PrefabInternal: {fileID: 0}
317 | m_GameObject: {fileID: 1455341783}
318 | m_Enabled: 1
319 | serializedVersion: 2
320 | m_ClearFlags: 1
321 | m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0}
322 | m_NormalizedViewPortRect:
323 | serializedVersion: 2
324 | x: 0
325 | y: 0
326 | width: 1
327 | height: 1
328 | near clip plane: 0.3
329 | far clip plane: 1000
330 | field of view: 60
331 | orthographic: 0
332 | orthographic size: 5
333 | m_Depth: -1
334 | m_CullingMask:
335 | serializedVersion: 2
336 | m_Bits: 4294967295
337 | m_RenderingPath: -1
338 | m_TargetTexture: {fileID: 0}
339 | m_TargetDisplay: 0
340 | m_TargetEye: 3
341 | m_HDR: 1
342 | m_AllowMSAA: 1
343 | m_ForceIntoRT: 0
344 | m_OcclusionCulling: 1
345 | m_StereoConvergence: 10
346 | m_StereoSeparation: 0.022
347 | m_StereoMirrorMode: 0
348 | --- !u!4 &1455341788
349 | Transform:
350 | m_ObjectHideFlags: 0
351 | m_PrefabParentObject: {fileID: 0}
352 | m_PrefabInternal: {fileID: 0}
353 | m_GameObject: {fileID: 1455341783}
354 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
355 | m_LocalPosition: {x: 0, y: 1, z: -10}
356 | m_LocalScale: {x: 1, y: 1, z: 1}
357 | m_Children: []
358 | m_Father: {fileID: 0}
359 | m_RootOrder: 0
360 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
361 |
--------------------------------------------------------------------------------
/Payload/MonoScript/Tetris.cs:
--------------------------------------------------------------------------------
1 | using UnityEngine;
2 |
3 | namespace Payload.MonoScript
4 | {
5 | public class Tetris : MonoBehaviour
6 | {
7 | public static class Shape
8 | {
9 | public static int[,] GetnerateShape(int type)
10 | {
11 | switch (type)
12 | {
13 | case -1:
14 | return new int[4, 4]
15 | {
16 | {0, 1, 1, 0 },
17 | {0, 1, 1, 0 },
18 | {0, 1, 1, 0 },
19 | {0, 1, 1, 0 },
20 | };
21 | case 0:
22 | return new int[4, 4]
23 | {
24 | { 0, 0, 0, 0 },
25 | { 0, 0, 1, 0 },
26 | { 0, 0, 1, 0 },
27 | { 0, 1, 1, 0 },
28 | };
29 |
30 | case 1:
31 | return new int[4, 4]
32 | {
33 | { 0, 0, 0, 0 },
34 | { 0, 1, 0, 0 },
35 | { 1, 1, 1, 0 },
36 | { 0, 0, 0, 0 },
37 | };
38 | case 2:
39 | return new int[4, 4]
40 | {
41 | { 0, 0, 0, 0 },
42 | { 0, 1, 1, 0 },
43 | { 0, 0, 1, 1 },
44 | { 0, 0, 0, 0 },
45 | };
46 | case 3:
47 | return new int[4, 4]
48 | {
49 | { 0, 0, 0, 0 },
50 | { 0, 1, 1, 0 },
51 | { 1, 1, 0, 0 },
52 | { 0, 0, 0, 0 },
53 | };
54 | case 4:
55 | return new int[4, 4]
56 | {
57 | { 0, 0, 0, 0 },
58 | { 0, 1, 0, 0 },
59 | { 0, 1, 0, 0 },
60 | { 0, 1, 1, 0 },
61 | };
62 | case 5:
63 | return new int[4, 4]
64 | {
65 | { 0, 1, 0, 0 },
66 | { 0, 1, 0, 0 },
67 | { 0, 1, 0, 0 },
68 | { 0, 1, 0, 0 },
69 | };
70 | case 6:
71 | return new int[4, 4]
72 | {
73 | { 0, 0, 0, 0 },
74 | { 0, 1, 1, 0 },
75 | { 0, 1, 1, 0 },
76 | { 0, 0, 0, 0 },
77 | };
78 | default: return null;
79 | }
80 | }
81 |
82 | }
83 | public class Graph
84 | {
85 |
86 | public int Score { get; private set; }
87 |
88 | public enum Command { Left, Right, Rotate }
89 | //标准俄罗斯方块棋盘大小:10x24
90 | private int[,] graph = new int[24, 10];
91 | public int Row { get; private set; }
92 | public int Column { get; private set; }
93 |
94 | private int mvobjrow = 0;
95 | private int mvobjcolumn = 0;
96 | private int[,] mvobj = null;
97 |
98 | public Graph(int row = 24, int column = 10)
99 | {
100 | Row = row; Column = column;
101 | graph = new int[row, column];
102 | }
103 | public int GetPoint(int x, int y)
104 | {
105 | if (x >= Row || y >= Column || x < 0 || y < 0)
106 | return -1;
107 |
108 | if ((x >= mvobjrow && x < mvobjrow + 4) && (y >= mvobjcolumn && y < mvobjcolumn + 4))
109 | {
110 | if (graph[x, y] > 0) return graph[x, y];
111 |
112 | if (mvobj != null)
113 | {
114 | int or = x - mvobjrow;
115 | int oc = y - mvobjcolumn;
116 |
117 | if (mvobj[or, oc] > 0)
118 | {
119 | return mvobj[or, oc];
120 | }
121 | }
122 | }
123 | return graph[x, y];
124 | }
125 |
126 | ///
127 | /// 逻辑帧
128 | ///
129 | public void UpdateLogic()
130 | {
131 | RowClearChk();
132 | if (RowDeathChk()) Clear();
133 | if (mvobj == null) ObjGen();
134 | MoveObjARow();
135 | }
136 | ///
137 | /// 命令帧
138 | ///
139 | public void CommandUpdateLogic(Command cmd)
140 | {
141 | if (cmd == Command.Rotate) ObjRotate();
142 | else MoveObjACol(cmd);
143 | }
144 |
145 |
146 | ///
147 | /// 清理盘面
148 | ///
149 | public void Clear()
150 | {
151 | for (int i = 0; i < Row; i++)
152 | for (int j = 0; j < Column; j++)
153 | graph[i, j] = 0;
154 |
155 | mvobjrow = 0;
156 | mvobjcolumn = 0;
157 | Score = 0;
158 | }
159 | ///
160 | /// 产生一个Obj
161 | ///
162 | private void ObjGen()
163 | {
164 | if (mvobj != null) return;
165 | mvobj = Shape.GetnerateShape(Random.Range(0, 6));
166 | mvobjrow = 0;
167 | mvobjcolumn = Column / 2;
168 | }
169 | ///
170 | /// 旋转obj90度
171 | ///
172 | private void ObjRotate()
173 | {
174 | int[,] newmvobj = new int[4, 4];
175 |
176 | for (int i = 0; i < 4; i++)
177 | {
178 | for (int j = 0; j < 4; j++)
179 | {
180 | newmvobj[i, j] = mvobj[j, 3 - i];
181 | }
182 | }
183 | if (!IsHit(newmvobj, mvobjrow, mvobjcolumn)) mvobj = newmvobj;
184 | }
185 | ///
186 | /// 左右移动obj一列
187 | ///
188 | private void MoveObjACol(Command cmd)
189 | {
190 | if (cmd == Command.Left)
191 | {
192 | if (!IsHit(mvobj, mvobjrow, mvobjcolumn - 1)) mvobjcolumn--;
193 | }
194 | if (cmd == Command.Right)
195 | {
196 | if (!IsHit(mvobj, mvobjrow, mvobjcolumn + 1)) mvobjcolumn++;
197 | }
198 | }
199 | ///
200 | /// 向下移动obj一行
201 | ///
202 | private void MoveObjARow()
203 | {
204 | if (mvobj == null) return;
205 | if (IsHit(mvobj, mvobjrow + 1, mvobjcolumn)) PutMvobjInGraph();
206 | else mvobjrow++;
207 | }
208 | ///
209 | /// 判断graph的任意一行是否是可消的,并消除之
210 | ///
211 | private void RowClearChk()
212 | {
213 |
214 | int cleared = 0;
215 |
216 | for (int i = Row - 1; i >= 0; i--)
217 | {
218 | bool clearthisrow = true;
219 |
220 | for (int j = 0; j < Column; j++)
221 | {
222 | if (graph[i, j] <= 0)
223 | {
224 | clearthisrow = false;
225 | break;
226 | }
227 | }
228 |
229 |
230 | if (clearthisrow)
231 | {
232 | if (i == 0)
233 | {
234 | for (int j = 0; j < Column; j++)
235 | {
236 | graph[0, j] = 0;
237 | }
238 | }
239 | else
240 | {
241 | for (int ii = i; ii > 0; ii--)
242 | {
243 | for (int j = 0; j < Column; j++)
244 | {
245 | graph[ii, j] = graph[ii - 1, j];
246 | }
247 | }
248 | }
249 |
250 | i--;
251 | cleared++;
252 |
253 |
254 | if (cleared > 0)
255 | switch (cleared)
256 | {
257 | case 1: Score += 100; break;
258 | case 2: Score += 300; break;
259 | case 3: Score += 600; break;
260 | case 4: Score += 1000; break;
261 | default: Score += cleared * 300; break;
262 | }
263 | }
264 | }
265 | }
266 | private bool RowDeathChk()
267 | {
268 | for (int j = 0; j < Column; j++)
269 | {
270 | if (graph[0, j] > 0) return true;
271 | }
272 | return false;
273 | }
274 | ///
275 | /// 检查碰撞
276 | ///
277 | ///
278 | ///
279 | ///
280 | private bool IsHit(int[,] newmvobj, int newobjrow, int newobjcolumn)
281 | {
282 | for (int i = 0; i < 4; i++)
283 | {
284 | for (int j = 0; j < 4; j++)
285 | {
286 | if (newmvobj != null && newmvobj[i, j] > 0)
287 | {
288 | if (i + newobjrow >= Row || i + newobjrow < 0) return true;
289 | if (j + newobjcolumn >= Column || j + newobjcolumn < 0) return true;
290 | if (graph[i + newobjrow, j + newobjcolumn] > 0) return true;
291 | }
292 | }
293 | }
294 | return false;
295 | }
296 | ///
297 | /// 把当前的mvobj放入Graph数组并清除mvobj
298 | ///
299 | ///
300 | private void PutMvobjInGraph()
301 | {
302 | for (int i = 0; i < 4; i++)
303 | {
304 | for (int j = 0; j < 4; j++)
305 | {
306 | if (mvobj[i, j] > 0)
307 | {
308 | graph[i + mvobjrow, j + mvobjcolumn] = mvobj[i, j];
309 | }
310 | }
311 | }
312 | mvobj = null;
313 | }
314 | }
315 |
316 |
317 | private Graph graph = new Graph();
318 | public float UpdateLogicDT = 0.8f;
319 | private float tcounter = 0f;
320 |
321 | private void Update()
322 | {
323 | tcounter += Time.deltaTime;
324 | if (tcounter > (Input.GetKey(KeyCode.S) ? UpdateLogicDT / 5f : UpdateLogicDT))
325 | {
326 | tcounter = 0f;
327 | graph.UpdateLogic();
328 | }
329 |
330 | if (Input.GetKeyDown(KeyCode.A)) graph.CommandUpdateLogic(Graph.Command.Left);
331 | if (Input.GetKeyDown(KeyCode.D)) graph.CommandUpdateLogic(Graph.Command.Right);
332 | if (Input.GetKeyDown(KeyCode.Space)) graph.CommandUpdateLogic(Graph.Command.Rotate);
333 | }
334 |
335 |
336 | private void OnGUI()
337 | {
338 | float squaresz = Screen.height / (graph.Row > graph.Column ? graph.Row : graph.Column);
339 | float X = squaresz * graph.Row / 2f;
340 |
341 | //棋盘边界
342 | GUI.Button(new Rect(X - squaresz, 0, squaresz, Screen.height), "");
343 | GUI.Button(new Rect(X + graph.Column * squaresz, 0, squaresz, Screen.height), "");
344 |
345 | //画格子
346 | for (int i = 0; i < graph.Row; i++)
347 | {
348 | for (int j = 0; j < graph.Column; j++)
349 | {
350 | if (graph.GetPoint(i, j) > 0) GUI.Button(new Rect(squaresz * j + X, squaresz * i, squaresz, squaresz), "");
351 | }
352 | }
353 |
354 | //分数
355 |
356 | GUIStyle style = new GUIStyle(GUI.skin.label) { fontSize = 40 };
357 | GUI.Label(new Rect(10, Screen.height / 2f, Screen.width / 2f, Screen.height / 2f), "SCORE:\n" + graph.Score + "", style);
358 |
359 |
360 | }
361 | }
362 | }
363 |
--------------------------------------------------------------------------------
/AssetBundle/ProjectSettings/ProjectSettings.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!129 &1
4 | PlayerSettings:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 12
7 | productGUID: 7271530b41b7f204eafb9c7a78be0391
8 | AndroidProfiler: 0
9 | defaultScreenOrientation: 4
10 | targetDevice: 2
11 | useOnDemandResources: 0
12 | accelerometerFrequency: 60
13 | companyName: DefaultCompany
14 | productName: AssetBundle
15 | defaultCursor: {fileID: 0}
16 | cursorHotspot: {x: 0, y: 0}
17 | m_SplashScreenBackgroundColor: {r: 0.13725491, g: 0.12156863, b: 0.1254902, a: 1}
18 | m_ShowUnitySplashScreen: 1
19 | m_ShowUnitySplashLogo: 1
20 | m_SplashScreenOverlayOpacity: 1
21 | m_SplashScreenAnimation: 1
22 | m_SplashScreenLogoStyle: 1
23 | m_SplashScreenDrawMode: 0
24 | m_SplashScreenBackgroundAnimationZoom: 1
25 | m_SplashScreenLogoAnimationZoom: 1
26 | m_SplashScreenBackgroundLandscapeAspect: 1
27 | m_SplashScreenBackgroundPortraitAspect: 1
28 | m_SplashScreenBackgroundLandscapeUvs:
29 | serializedVersion: 2
30 | x: 0
31 | y: 0
32 | width: 1
33 | height: 1
34 | m_SplashScreenBackgroundPortraitUvs:
35 | serializedVersion: 2
36 | x: 0
37 | y: 0
38 | width: 1
39 | height: 1
40 | m_SplashScreenLogos: []
41 | m_SplashScreenBackgroundLandscape: {fileID: 0}
42 | m_SplashScreenBackgroundPortrait: {fileID: 0}
43 | m_VirtualRealitySplashScreen: {fileID: 0}
44 | m_HolographicTrackingLossScreen: {fileID: 0}
45 | defaultScreenWidth: 1024
46 | defaultScreenHeight: 768
47 | defaultScreenWidthWeb: 960
48 | defaultScreenHeightWeb: 600
49 | m_StereoRenderingPath: 0
50 | m_ActiveColorSpace: 0
51 | m_MTRendering: 1
52 | m_MobileMTRendering: 0
53 | m_StackTraceTypes: 010000000100000001000000010000000100000001000000
54 | iosShowActivityIndicatorOnLoading: -1
55 | androidShowActivityIndicatorOnLoading: -1
56 | tizenShowActivityIndicatorOnLoading: -1
57 | iosAppInBackgroundBehavior: 0
58 | displayResolutionDialog: 1
59 | iosAllowHTTPDownload: 1
60 | allowedAutorotateToPortrait: 1
61 | allowedAutorotateToPortraitUpsideDown: 1
62 | allowedAutorotateToLandscapeRight: 1
63 | allowedAutorotateToLandscapeLeft: 1
64 | useOSAutorotation: 1
65 | use32BitDisplayBuffer: 1
66 | disableDepthAndStencilBuffers: 0
67 | defaultIsFullScreen: 1
68 | defaultIsNativeResolution: 1
69 | runInBackground: 0
70 | captureSingleScreen: 0
71 | muteOtherAudioSources: 0
72 | Prepare IOS For Recording: 0
73 | Force IOS Speakers When Recording: 0
74 | submitAnalytics: 1
75 | usePlayerLog: 1
76 | bakeCollisionMeshes: 0
77 | forceSingleInstance: 0
78 | resizableWindow: 0
79 | useMacAppStoreValidation: 0
80 | macAppStoreCategory: public.app-category.games
81 | gpuSkinning: 0
82 | graphicsJobs: 0
83 | xboxPIXTextureCapture: 0
84 | xboxEnableAvatar: 0
85 | xboxEnableKinect: 0
86 | xboxEnableKinectAutoTracking: 0
87 | xboxEnableFitness: 0
88 | visibleInBackground: 1
89 | allowFullscreenSwitch: 1
90 | graphicsJobMode: 0
91 | macFullscreenMode: 2
92 | d3d9FullscreenMode: 1
93 | d3d11FullscreenMode: 1
94 | xboxSpeechDB: 0
95 | xboxEnableHeadOrientation: 0
96 | xboxEnableGuest: 0
97 | xboxEnablePIXSampling: 0
98 | n3dsDisableStereoscopicView: 0
99 | n3dsEnableSharedListOpt: 1
100 | n3dsEnableVSync: 0
101 | ignoreAlphaClear: 0
102 | xboxOneResolution: 0
103 | xboxOneMonoLoggingLevel: 0
104 | xboxOneLoggingLevel: 1
105 | xboxOneDisableEsram: 0
106 | videoMemoryForVertexBuffers: 0
107 | psp2PowerMode: 0
108 | psp2AcquireBGM: 1
109 | wiiUTVResolution: 0
110 | wiiUGamePadMSAA: 1
111 | wiiUSupportsNunchuk: 0
112 | wiiUSupportsClassicController: 0
113 | wiiUSupportsBalanceBoard: 0
114 | wiiUSupportsMotionPlus: 0
115 | wiiUSupportsProController: 0
116 | wiiUAllowScreenCapture: 1
117 | wiiUControllerCount: 0
118 | m_SupportedAspectRatios:
119 | 4:3: 1
120 | 5:4: 1
121 | 16:10: 1
122 | 16:9: 1
123 | Others: 1
124 | bundleVersion: 1.0
125 | preloadedAssets: []
126 | metroInputSource: 0
127 | m_HolographicPauseOnTrackingLoss: 1
128 | xboxOneDisableKinectGpuReservation: 0
129 | xboxOneEnable7thCore: 0
130 | vrSettings:
131 | cardboard:
132 | depthFormat: 0
133 | enableTransitionView: 0
134 | daydream:
135 | depthFormat: 0
136 | useSustainedPerformanceMode: 0
137 | hololens:
138 | depthFormat: 1
139 | protectGraphicsMemory: 0
140 | useHDRDisplay: 0
141 | targetPixelDensity: 0
142 | resolutionScalingMode: 0
143 | applicationIdentifier: {}
144 | buildNumber: {}
145 | AndroidBundleVersionCode: 1
146 | AndroidMinSdkVersion: 16
147 | AndroidTargetSdkVersion: 0
148 | AndroidPreferredInstallLocation: 1
149 | aotOptions:
150 | stripEngineCode: 1
151 | iPhoneStrippingLevel: 0
152 | iPhoneScriptCallOptimization: 0
153 | ForceInternetPermission: 0
154 | ForceSDCardPermission: 0
155 | CreateWallpaper: 0
156 | APKExpansionFiles: 0
157 | keepLoadedShadersAlive: 0
158 | StripUnusedMeshComponents: 0
159 | VertexChannelCompressionMask:
160 | serializedVersion: 2
161 | m_Bits: 238
162 | iPhoneSdkVersion: 988
163 | iOSTargetOSVersionString:
164 | tvOSSdkVersion: 0
165 | tvOSRequireExtendedGameController: 0
166 | tvOSTargetOSVersionString:
167 | uIPrerenderedIcon: 0
168 | uIRequiresPersistentWiFi: 0
169 | uIRequiresFullScreen: 1
170 | uIStatusBarHidden: 1
171 | uIExitOnSuspend: 0
172 | uIStatusBarStyle: 0
173 | iPhoneSplashScreen: {fileID: 0}
174 | iPhoneHighResSplashScreen: {fileID: 0}
175 | iPhoneTallHighResSplashScreen: {fileID: 0}
176 | iPhone47inSplashScreen: {fileID: 0}
177 | iPhone55inPortraitSplashScreen: {fileID: 0}
178 | iPhone55inLandscapeSplashScreen: {fileID: 0}
179 | iPadPortraitSplashScreen: {fileID: 0}
180 | iPadHighResPortraitSplashScreen: {fileID: 0}
181 | iPadLandscapeSplashScreen: {fileID: 0}
182 | iPadHighResLandscapeSplashScreen: {fileID: 0}
183 | appleTVSplashScreen: {fileID: 0}
184 | tvOSSmallIconLayers: []
185 | tvOSLargeIconLayers: []
186 | tvOSTopShelfImageLayers: []
187 | tvOSTopShelfImageWideLayers: []
188 | iOSLaunchScreenType: 0
189 | iOSLaunchScreenPortrait: {fileID: 0}
190 | iOSLaunchScreenLandscape: {fileID: 0}
191 | iOSLaunchScreenBackgroundColor:
192 | serializedVersion: 2
193 | rgba: 0
194 | iOSLaunchScreenFillPct: 100
195 | iOSLaunchScreenSize: 100
196 | iOSLaunchScreenCustomXibPath:
197 | iOSLaunchScreeniPadType: 0
198 | iOSLaunchScreeniPadImage: {fileID: 0}
199 | iOSLaunchScreeniPadBackgroundColor:
200 | serializedVersion: 2
201 | rgba: 0
202 | iOSLaunchScreeniPadFillPct: 100
203 | iOSLaunchScreeniPadSize: 100
204 | iOSLaunchScreeniPadCustomXibPath:
205 | iOSDeviceRequirements: []
206 | iOSURLSchemes: []
207 | iOSBackgroundModes: 0
208 | iOSMetalForceHardShadows: 0
209 | metalEditorSupport: 1
210 | metalAPIValidation: 1
211 | iOSRenderExtraFrameOnPause: 0
212 | appleDeveloperTeamID:
213 | iOSManualSigningProvisioningProfileID:
214 | tvOSManualSigningProvisioningProfileID:
215 | appleEnableAutomaticSigning: 0
216 | AndroidTargetDevice: 0
217 | AndroidSplashScreenScale: 0
218 | androidSplashScreen: {fileID: 0}
219 | AndroidKeystoreName:
220 | AndroidKeyaliasName:
221 | AndroidTVCompatibility: 1
222 | AndroidIsGame: 1
223 | androidEnableBanner: 1
224 | m_AndroidBanners:
225 | - width: 320
226 | height: 180
227 | banner: {fileID: 0}
228 | androidGamepadSupportLevel: 0
229 | resolutionDialogBanner: {fileID: 0}
230 | m_BuildTargetIcons: []
231 | m_BuildTargetBatching: []
232 | m_BuildTargetGraphicsAPIs: []
233 | m_BuildTargetVRSettings: []
234 | openGLRequireES31: 0
235 | openGLRequireES31AEP: 0
236 | webPlayerTemplate: APPLICATION:Default
237 | m_TemplateCustomTags: {}
238 | wiiUTitleID: 0005000011000000
239 | wiiUGroupID: 00010000
240 | wiiUCommonSaveSize: 4096
241 | wiiUAccountSaveSize: 2048
242 | wiiUOlvAccessKey: 0
243 | wiiUTinCode: 0
244 | wiiUJoinGameId: 0
245 | wiiUJoinGameModeMask: 0000000000000000
246 | wiiUCommonBossSize: 0
247 | wiiUAccountBossSize: 0
248 | wiiUAddOnUniqueIDs: []
249 | wiiUMainThreadStackSize: 3072
250 | wiiULoaderThreadStackSize: 1024
251 | wiiUSystemHeapSize: 128
252 | wiiUTVStartupScreen: {fileID: 0}
253 | wiiUGamePadStartupScreen: {fileID: 0}
254 | wiiUDrcBufferDisabled: 0
255 | wiiUProfilerLibPath:
256 | playModeTestRunnerEnabled: 0
257 | actionOnDotNetUnhandledException: 1
258 | enableInternalProfiler: 0
259 | logObjCUncaughtExceptions: 1
260 | enableCrashReportAPI: 0
261 | cameraUsageDescription:
262 | locationUsageDescription:
263 | microphoneUsageDescription:
264 | switchNetLibKey:
265 | switchSocketMemoryPoolSize: 6144
266 | switchSocketAllocatorPoolSize: 128
267 | switchSocketConcurrencyLimit: 14
268 | switchScreenResolutionBehavior: 2
269 | switchUseCPUProfiler: 0
270 | switchApplicationID: 0x01004b9000490000
271 | switchNSODependencies:
272 | switchTitleNames_0:
273 | switchTitleNames_1:
274 | switchTitleNames_2:
275 | switchTitleNames_3:
276 | switchTitleNames_4:
277 | switchTitleNames_5:
278 | switchTitleNames_6:
279 | switchTitleNames_7:
280 | switchTitleNames_8:
281 | switchTitleNames_9:
282 | switchTitleNames_10:
283 | switchTitleNames_11:
284 | switchPublisherNames_0:
285 | switchPublisherNames_1:
286 | switchPublisherNames_2:
287 | switchPublisherNames_3:
288 | switchPublisherNames_4:
289 | switchPublisherNames_5:
290 | switchPublisherNames_6:
291 | switchPublisherNames_7:
292 | switchPublisherNames_8:
293 | switchPublisherNames_9:
294 | switchPublisherNames_10:
295 | switchPublisherNames_11:
296 | switchIcons_0: {fileID: 0}
297 | switchIcons_1: {fileID: 0}
298 | switchIcons_2: {fileID: 0}
299 | switchIcons_3: {fileID: 0}
300 | switchIcons_4: {fileID: 0}
301 | switchIcons_5: {fileID: 0}
302 | switchIcons_6: {fileID: 0}
303 | switchIcons_7: {fileID: 0}
304 | switchIcons_8: {fileID: 0}
305 | switchIcons_9: {fileID: 0}
306 | switchIcons_10: {fileID: 0}
307 | switchIcons_11: {fileID: 0}
308 | switchSmallIcons_0: {fileID: 0}
309 | switchSmallIcons_1: {fileID: 0}
310 | switchSmallIcons_2: {fileID: 0}
311 | switchSmallIcons_3: {fileID: 0}
312 | switchSmallIcons_4: {fileID: 0}
313 | switchSmallIcons_5: {fileID: 0}
314 | switchSmallIcons_6: {fileID: 0}
315 | switchSmallIcons_7: {fileID: 0}
316 | switchSmallIcons_8: {fileID: 0}
317 | switchSmallIcons_9: {fileID: 0}
318 | switchSmallIcons_10: {fileID: 0}
319 | switchSmallIcons_11: {fileID: 0}
320 | switchManualHTML:
321 | switchAccessibleURLs:
322 | switchLegalInformation:
323 | switchMainThreadStackSize: 1048576
324 | switchPresenceGroupId:
325 | switchLogoHandling: 0
326 | switchReleaseVersion: 0
327 | switchDisplayVersion: 1.0.0
328 | switchStartupUserAccount: 0
329 | switchTouchScreenUsage: 0
330 | switchSupportedLanguagesMask: 0
331 | switchLogoType: 0
332 | switchApplicationErrorCodeCategory:
333 | switchUserAccountSaveDataSize: 0
334 | switchUserAccountSaveDataJournalSize: 0
335 | switchApplicationAttribute: 0
336 | switchCardSpecSize: -1
337 | switchCardSpecClock: -1
338 | switchRatingsMask: 0
339 | switchRatingsInt_0: 0
340 | switchRatingsInt_1: 0
341 | switchRatingsInt_2: 0
342 | switchRatingsInt_3: 0
343 | switchRatingsInt_4: 0
344 | switchRatingsInt_5: 0
345 | switchRatingsInt_6: 0
346 | switchRatingsInt_7: 0
347 | switchRatingsInt_8: 0
348 | switchRatingsInt_9: 0
349 | switchRatingsInt_10: 0
350 | switchRatingsInt_11: 0
351 | switchLocalCommunicationIds_0:
352 | switchLocalCommunicationIds_1:
353 | switchLocalCommunicationIds_2:
354 | switchLocalCommunicationIds_3:
355 | switchLocalCommunicationIds_4:
356 | switchLocalCommunicationIds_5:
357 | switchLocalCommunicationIds_6:
358 | switchLocalCommunicationIds_7:
359 | switchParentalControl: 0
360 | switchAllowsScreenshot: 1
361 | switchDataLossConfirmation: 0
362 | switchSupportedNpadStyles: 3
363 | switchSocketConfigEnabled: 0
364 | switchTcpInitialSendBufferSize: 32
365 | switchTcpInitialReceiveBufferSize: 64
366 | switchTcpAutoSendBufferSizeMax: 256
367 | switchTcpAutoReceiveBufferSizeMax: 256
368 | switchUdpSendBufferSize: 9
369 | switchUdpReceiveBufferSize: 42
370 | switchSocketBufferEfficiency: 4
371 | switchSocketInitializeEnabled: 1
372 | switchNetworkInterfaceManagerInitializeEnabled: 1
373 | switchPlayerConnectionEnabled: 1
374 | ps4NPAgeRating: 12
375 | ps4NPTitleSecret:
376 | ps4NPTrophyPackPath:
377 | ps4ParentalLevel: 11
378 | ps4ContentID: ED1633-NPXX51362_00-0000000000000000
379 | ps4Category: 0
380 | ps4MasterVersion: 01.00
381 | ps4AppVersion: 01.00
382 | ps4AppType: 0
383 | ps4ParamSfxPath:
384 | ps4VideoOutPixelFormat: 0
385 | ps4VideoOutInitialWidth: 1920
386 | ps4VideoOutBaseModeInitialWidth: 1920
387 | ps4VideoOutReprojectionRate: 120
388 | ps4PronunciationXMLPath:
389 | ps4PronunciationSIGPath:
390 | ps4BackgroundImagePath:
391 | ps4StartupImagePath:
392 | ps4SaveDataImagePath:
393 | ps4SdkOverride:
394 | ps4BGMPath:
395 | ps4ShareFilePath:
396 | ps4ShareOverlayImagePath:
397 | ps4PrivacyGuardImagePath:
398 | ps4NPtitleDatPath:
399 | ps4RemotePlayKeyAssignment: -1
400 | ps4RemotePlayKeyMappingDir:
401 | ps4PlayTogetherPlayerCount: 0
402 | ps4EnterButtonAssignment: 1
403 | ps4ApplicationParam1: 0
404 | ps4ApplicationParam2: 0
405 | ps4ApplicationParam3: 0
406 | ps4ApplicationParam4: 0
407 | ps4DownloadDataSize: 0
408 | ps4GarlicHeapSize: 2048
409 | ps4ProGarlicHeapSize: 2560
410 | ps4Passcode: frAQBc8Wsa1xVPfvJcrgRYwTiizs2trQ
411 | ps4pnSessions: 1
412 | ps4pnPresence: 1
413 | ps4pnFriends: 1
414 | ps4pnGameCustomData: 1
415 | playerPrefsSupport: 0
416 | restrictedAudioUsageRights: 0
417 | ps4UseResolutionFallback: 0
418 | ps4ReprojectionSupport: 0
419 | ps4UseAudio3dBackend: 0
420 | ps4SocialScreenEnabled: 0
421 | ps4ScriptOptimizationLevel: 0
422 | ps4Audio3dVirtualSpeakerCount: 14
423 | ps4attribCpuUsage: 0
424 | ps4PatchPkgPath:
425 | ps4PatchLatestPkgPath:
426 | ps4PatchChangeinfoPath:
427 | ps4PatchDayOne: 0
428 | ps4attribUserManagement: 0
429 | ps4attribMoveSupport: 0
430 | ps4attrib3DSupport: 0
431 | ps4attribShareSupport: 0
432 | ps4attribExclusiveVR: 0
433 | ps4disableAutoHideSplash: 0
434 | ps4videoRecordingFeaturesUsed: 0
435 | ps4contentSearchFeaturesUsed: 0
436 | ps4attribEyeToEyeDistanceSettingVR: 0
437 | ps4IncludedModules: []
438 | monoEnv:
439 | psp2Splashimage: {fileID: 0}
440 | psp2NPTrophyPackPath:
441 | psp2NPSupportGBMorGJP: 0
442 | psp2NPAgeRating: 12
443 | psp2NPTitleDatPath:
444 | psp2NPCommsID:
445 | psp2NPCommunicationsID:
446 | psp2NPCommsPassphrase:
447 | psp2NPCommsSig:
448 | psp2ParamSfxPath:
449 | psp2ManualPath:
450 | psp2LiveAreaGatePath:
451 | psp2LiveAreaBackroundPath:
452 | psp2LiveAreaPath:
453 | psp2LiveAreaTrialPath:
454 | psp2PatchChangeInfoPath:
455 | psp2PatchOriginalPackage:
456 | psp2PackagePassword: F69AzBlax3CF3EDNhm3soLBPh71Yexui
457 | psp2KeystoneFile:
458 | psp2MemoryExpansionMode: 0
459 | psp2DRMType: 0
460 | psp2StorageType: 0
461 | psp2MediaCapacity: 0
462 | psp2DLCConfigPath:
463 | psp2ThumbnailPath:
464 | psp2BackgroundPath:
465 | psp2SoundPath:
466 | psp2TrophyCommId:
467 | psp2TrophyPackagePath:
468 | psp2PackagedResourcesPath:
469 | psp2SaveDataQuota: 10240
470 | psp2ParentalLevel: 1
471 | psp2ShortTitle: Not Set
472 | psp2ContentID: IV0000-ABCD12345_00-0123456789ABCDEF
473 | psp2Category: 0
474 | psp2MasterVersion: 01.00
475 | psp2AppVersion: 01.00
476 | psp2TVBootMode: 0
477 | psp2EnterButtonAssignment: 2
478 | psp2TVDisableEmu: 0
479 | psp2AllowTwitterDialog: 1
480 | psp2Upgradable: 0
481 | psp2HealthWarning: 0
482 | psp2UseLibLocation: 0
483 | psp2InfoBarOnStartup: 0
484 | psp2InfoBarColor: 0
485 | psp2ScriptOptimizationLevel: 0
486 | psmSplashimage: {fileID: 0}
487 | splashScreenBackgroundSourceLandscape: {fileID: 0}
488 | splashScreenBackgroundSourcePortrait: {fileID: 0}
489 | spritePackerPolicy:
490 | webGLMemorySize: 256
491 | webGLExceptionSupport: 1
492 | webGLNameFilesAsHashes: 0
493 | webGLDataCaching: 0
494 | webGLDebugSymbols: 0
495 | webGLEmscriptenArgs:
496 | webGLModulesDirectory:
497 | webGLTemplate: APPLICATION:Default
498 | webGLAnalyzeBuildSize: 0
499 | webGLUseEmbeddedResources: 0
500 | webGLUseWasm: 0
501 | webGLCompressionFormat: 1
502 | scriptingDefineSymbols: {}
503 | platformArchitecture: {}
504 | scriptingBackend: {}
505 | incrementalIl2cppBuild: {}
506 | additionalIl2CppArgs:
507 | scriptingRuntimeVersion: 0
508 | apiCompatibilityLevelPerPlatform: {}
509 | m_RenderingPath: 1
510 | m_MobileRenderingPath: 1
511 | metroPackageName: AssetBundle
512 | metroPackageVersion:
513 | metroCertificatePath:
514 | metroCertificatePassword:
515 | metroCertificateSubject:
516 | metroCertificateIssuer:
517 | metroCertificateNotAfter: 0000000000000000
518 | metroApplicationDescription: AssetBundle
519 | wsaImages: {}
520 | metroTileShortName:
521 | metroCommandLineArgsFile:
522 | metroTileShowName: 0
523 | metroMediumTileShowName: 0
524 | metroLargeTileShowName: 0
525 | metroWideTileShowName: 0
526 | metroDefaultTileSize: 1
527 | metroTileForegroundText: 2
528 | metroTileBackgroundColor: {r: 0.13333334, g: 0.17254902, b: 0.21568628, a: 0}
529 | metroSplashScreenBackgroundColor: {r: 0.12941177, g: 0.17254902, b: 0.21568628,
530 | a: 1}
531 | metroSplashScreenUseBackgroundColor: 0
532 | platformCapabilities: {}
533 | metroFTAName:
534 | metroFTAFileTypes: []
535 | metroProtocolName:
536 | metroCompilationOverrides: 1
537 | tizenProductDescription:
538 | tizenProductURL:
539 | tizenSigningProfileName:
540 | tizenGPSPermissions: 0
541 | tizenMicrophonePermissions: 0
542 | tizenDeploymentTarget:
543 | tizenDeploymentTargetType: -1
544 | tizenMinOSVersion: 1
545 | n3dsUseExtSaveData: 0
546 | n3dsCompressStaticMem: 1
547 | n3dsExtSaveDataNumber: 0x12345
548 | n3dsStackSize: 131072
549 | n3dsTargetPlatform: 2
550 | n3dsRegion: 7
551 | n3dsMediaSize: 0
552 | n3dsLogoStyle: 3
553 | n3dsTitle: GameName
554 | n3dsProductCode:
555 | n3dsApplicationId: 0xFF3FF
556 | stvDeviceAddress:
557 | stvProductDescription:
558 | stvProductAuthor:
559 | stvProductAuthorEmail:
560 | stvProductLink:
561 | stvProductCategory: 0
562 | XboxOneProductId:
563 | XboxOneUpdateKey:
564 | XboxOneSandboxId:
565 | XboxOneContentId:
566 | XboxOneTitleId:
567 | XboxOneSCId:
568 | XboxOneGameOsOverridePath:
569 | XboxOnePackagingOverridePath:
570 | XboxOneAppManifestOverridePath:
571 | XboxOnePackageEncryption: 0
572 | XboxOnePackageUpdateGranularity: 2
573 | XboxOneDescription:
574 | XboxOneLanguage:
575 | - enus
576 | XboxOneCapability: []
577 | XboxOneGameRating: {}
578 | XboxOneIsContentPackage: 0
579 | XboxOneEnableGPUVariability: 0
580 | XboxOneSockets: {}
581 | XboxOneSplashScreen: {fileID: 0}
582 | XboxOneAllowedProductIds: []
583 | XboxOnePersistentLocalStorageSize: 0
584 | xboxOneScriptCompiler: 0
585 | vrEditorSettings:
586 | daydream:
587 | daydreamIconForeground: {fileID: 0}
588 | daydreamIconBackground: {fileID: 0}
589 | cloudServicesEnabled: {}
590 | facebookSdkVersion: 7.9.4
591 | apiCompatibilityLevel: 2
592 | cloudProjectId:
593 | projectName:
594 | organizationId:
595 | cloudEnabled: 0
596 | enableNativePlatformBackendsForNewInputSystem: 0
597 | disableOldInputManagerSupport: 0
598 |
--------------------------------------------------------------------------------
/AssetBundle/Assets/InjectScene.unity:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!29 &1
4 | OcclusionCullingSettings:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 2
7 | m_OcclusionBakeSettings:
8 | smallestOccluder: 5
9 | smallestHole: 0.25
10 | backfaceThreshold: 100
11 | m_SceneGUID: 00000000000000000000000000000000
12 | m_OcclusionCullingData: {fileID: 0}
13 | --- !u!104 &2
14 | RenderSettings:
15 | m_ObjectHideFlags: 0
16 | serializedVersion: 8
17 | m_Fog: 0
18 | m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1}
19 | m_FogMode: 3
20 | m_FogDensity: 0.01
21 | m_LinearFogStart: 0
22 | m_LinearFogEnd: 300
23 | m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1}
24 | m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1}
25 | m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1}
26 | m_AmbientIntensity: 1
27 | m_AmbientMode: 0
28 | m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1}
29 | m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0}
30 | m_HaloStrength: 0.5
31 | m_FlareStrength: 1
32 | m_FlareFadeSpeed: 3
33 | m_HaloTexture: {fileID: 0}
34 | m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0}
35 | m_DefaultReflectionMode: 0
36 | m_DefaultReflectionResolution: 128
37 | m_ReflectionBounces: 1
38 | m_ReflectionIntensity: 1
39 | m_CustomReflection: {fileID: 0}
40 | m_Sun: {fileID: 0}
41 | m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1}
42 | --- !u!157 &3
43 | LightmapSettings:
44 | m_ObjectHideFlags: 0
45 | serializedVersion: 11
46 | m_GIWorkflowMode: 1
47 | m_GISettings:
48 | serializedVersion: 2
49 | m_BounceScale: 1
50 | m_IndirectOutputScale: 1
51 | m_AlbedoBoost: 1
52 | m_TemporalCoherenceThreshold: 1
53 | m_EnvironmentLightingMode: 0
54 | m_EnableBakedLightmaps: 1
55 | m_EnableRealtimeLightmaps: 1
56 | m_LightmapEditorSettings:
57 | serializedVersion: 9
58 | m_Resolution: 2
59 | m_BakeResolution: 40
60 | m_TextureWidth: 1024
61 | m_TextureHeight: 1024
62 | m_AO: 0
63 | m_AOMaxDistance: 1
64 | m_CompAOExponent: 1
65 | m_CompAOExponentDirect: 0
66 | m_Padding: 2
67 | m_LightmapParameters: {fileID: 0}
68 | m_LightmapsBakeMode: 1
69 | m_TextureCompression: 1
70 | m_FinalGather: 0
71 | m_FinalGatherFiltering: 1
72 | m_FinalGatherRayCount: 256
73 | m_ReflectionCompression: 2
74 | m_MixedBakeMode: 2
75 | m_BakeBackend: 0
76 | m_PVRSampling: 1
77 | m_PVRDirectSampleCount: 32
78 | m_PVRSampleCount: 500
79 | m_PVRBounces: 2
80 | m_PVRFiltering: 0
81 | m_PVRFilteringMode: 1
82 | m_PVRCulling: 1
83 | m_PVRFilteringGaussRadiusDirect: 1
84 | m_PVRFilteringGaussRadiusIndirect: 5
85 | m_PVRFilteringGaussRadiusAO: 2
86 | m_PVRFilteringAtrousColorSigma: 1
87 | m_PVRFilteringAtrousNormalSigma: 1
88 | m_PVRFilteringAtrousPositionSigma: 1
89 | m_LightingDataAsset: {fileID: 0}
90 | m_UseShadowmask: 1
91 | --- !u!196 &4
92 | NavMeshSettings:
93 | serializedVersion: 2
94 | m_ObjectHideFlags: 0
95 | m_BuildSettings:
96 | serializedVersion: 2
97 | agentTypeID: 0
98 | agentRadius: 0.5
99 | agentHeight: 2
100 | agentSlope: 45
101 | agentClimb: 0.4
102 | ledgeDropHeight: 0
103 | maxJumpAcrossDistance: 0
104 | minRegionArea: 2
105 | manualCellSize: 0
106 | cellSize: 0.16666667
107 | manualTileSize: 0
108 | tileSize: 256
109 | accuratePlacement: 0
110 | m_NavMeshData: {fileID: 0}
111 | --- !u!1 &286631413
112 | GameObject:
113 | m_ObjectHideFlags: 0
114 | m_PrefabParentObject: {fileID: 0}
115 | m_PrefabInternal: {fileID: 0}
116 | serializedVersion: 5
117 | m_Component:
118 | - component: {fileID: 286631417}
119 | - component: {fileID: 286631415}
120 | - component: {fileID: 286631414}
121 | m_Layer: 0
122 | m_Name: Cube
123 | m_TagString: Untagged
124 | m_Icon: {fileID: 0}
125 | m_NavMeshLayer: 0
126 | m_StaticEditorFlags: 0
127 | m_IsActive: 1
128 | --- !u!23 &286631414
129 | MeshRenderer:
130 | m_ObjectHideFlags: 0
131 | m_PrefabParentObject: {fileID: 0}
132 | m_PrefabInternal: {fileID: 0}
133 | m_GameObject: {fileID: 286631413}
134 | m_Enabled: 1
135 | m_CastShadows: 1
136 | m_ReceiveShadows: 1
137 | m_MotionVectors: 1
138 | m_LightProbeUsage: 1
139 | m_ReflectionProbeUsage: 1
140 | m_Materials:
141 | - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0}
142 | m_StaticBatchInfo:
143 | firstSubMesh: 0
144 | subMeshCount: 0
145 | m_StaticBatchRoot: {fileID: 0}
146 | m_ProbeAnchor: {fileID: 0}
147 | m_LightProbeVolumeOverride: {fileID: 0}
148 | m_ScaleInLightmap: 1
149 | m_PreserveUVs: 1
150 | m_IgnoreNormalsForChartDetection: 0
151 | m_ImportantGI: 0
152 | m_SelectedEditorRenderState: 3
153 | m_MinimumChartSize: 4
154 | m_AutoUVMaxDistance: 0.5
155 | m_AutoUVMaxAngle: 89
156 | m_LightmapParameters: {fileID: 0}
157 | m_SortingLayerID: 0
158 | m_SortingLayer: 0
159 | m_SortingOrder: 0
160 | --- !u!65 &286631415
161 | BoxCollider:
162 | m_ObjectHideFlags: 0
163 | m_PrefabParentObject: {fileID: 0}
164 | m_PrefabInternal: {fileID: 0}
165 | m_GameObject: {fileID: 286631413}
166 | m_Material: {fileID: 0}
167 | m_IsTrigger: 1
168 | m_Enabled: 1
169 | serializedVersion: 2
170 | m_Size: {x: 1, y: 1, z: 1}
171 | m_Center: {x: 0, y: 0, z: 0}
172 | --- !u!4 &286631417
173 | Transform:
174 | m_ObjectHideFlags: 0
175 | m_PrefabParentObject: {fileID: 0}
176 | m_PrefabInternal: {fileID: 0}
177 | m_GameObject: {fileID: 286631413}
178 | m_LocalRotation: {x: 0.35355338, y: 0.35355338, z: -0.1464466, w: 0.8535535}
179 | m_LocalPosition: {x: 0, y: 0, z: 0}
180 | m_LocalScale: {x: 1, y: 1, z: 1}
181 | m_Children: []
182 | m_Father: {fileID: 0}
183 | m_RootOrder: 2
184 | m_LocalEulerAnglesHint: {x: 45, y: 45, z: 0}
185 | --- !u!1 &420470720
186 | GameObject:
187 | m_ObjectHideFlags: 0
188 | m_PrefabParentObject: {fileID: 0}
189 | m_PrefabInternal: {fileID: 0}
190 | serializedVersion: 5
191 | m_Component:
192 | - component: {fileID: 420470724}
193 | - component: {fileID: 420470723}
194 | - component: {fileID: 420470722}
195 | - component: {fileID: 420470721}
196 | m_Layer: 5
197 | m_Name: Canvas
198 | m_TagString: Untagged
199 | m_Icon: {fileID: 0}
200 | m_NavMeshLayer: 0
201 | m_StaticEditorFlags: 0
202 | m_IsActive: 1
203 | --- !u!114 &420470721
204 | MonoBehaviour:
205 | m_ObjectHideFlags: 0
206 | m_PrefabParentObject: {fileID: 0}
207 | m_PrefabInternal: {fileID: 0}
208 | m_GameObject: {fileID: 420470720}
209 | m_Enabled: 1
210 | m_EditorHideFlags: 0
211 | m_Script: {fileID: 1301386320, guid: f70555f144d8491a825f0804e09c671c, type: 3}
212 | m_Name:
213 | m_EditorClassIdentifier:
214 | m_IgnoreReversedGraphics: 1
215 | m_BlockingObjects: 0
216 | m_BlockingMask:
217 | serializedVersion: 2
218 | m_Bits: 4294967295
219 | --- !u!114 &420470722
220 | MonoBehaviour:
221 | m_ObjectHideFlags: 0
222 | m_PrefabParentObject: {fileID: 0}
223 | m_PrefabInternal: {fileID: 0}
224 | m_GameObject: {fileID: 420470720}
225 | m_Enabled: 1
226 | m_EditorHideFlags: 0
227 | m_Script: {fileID: 1980459831, guid: f70555f144d8491a825f0804e09c671c, type: 3}
228 | m_Name:
229 | m_EditorClassIdentifier:
230 | m_UiScaleMode: 1
231 | m_ReferencePixelsPerUnit: 100
232 | m_ScaleFactor: 1
233 | m_ReferenceResolution: {x: 1920, y: 1080}
234 | m_ScreenMatchMode: 0
235 | m_MatchWidthOrHeight: 0
236 | m_PhysicalUnit: 3
237 | m_FallbackScreenDPI: 96
238 | m_DefaultSpriteDPI: 96
239 | m_DynamicPixelsPerUnit: 1
240 | --- !u!223 &420470723
241 | Canvas:
242 | m_ObjectHideFlags: 0
243 | m_PrefabParentObject: {fileID: 0}
244 | m_PrefabInternal: {fileID: 0}
245 | m_GameObject: {fileID: 420470720}
246 | m_Enabled: 1
247 | serializedVersion: 3
248 | m_RenderMode: 0
249 | m_Camera: {fileID: 0}
250 | m_PlaneDistance: 100
251 | m_PixelPerfect: 0
252 | m_ReceivesEvents: 1
253 | m_OverrideSorting: 0
254 | m_OverridePixelPerfect: 0
255 | m_SortingBucketNormalizedSize: 0
256 | m_AdditionalShaderChannelsFlag: 0
257 | m_SortingLayerID: 0
258 | m_SortingOrder: 0
259 | m_TargetDisplay: 0
260 | --- !u!224 &420470724
261 | RectTransform:
262 | m_ObjectHideFlags: 0
263 | m_PrefabParentObject: {fileID: 0}
264 | m_PrefabInternal: {fileID: 0}
265 | m_GameObject: {fileID: 420470720}
266 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
267 | m_LocalPosition: {x: 0, y: 0, z: 0}
268 | m_LocalScale: {x: 0, y: 0, z: 0}
269 | m_Children:
270 | - {fileID: 1554563599}
271 | m_Father: {fileID: 0}
272 | m_RootOrder: 3
273 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
274 | m_AnchorMin: {x: 0, y: 0}
275 | m_AnchorMax: {x: 0, y: 0}
276 | m_AnchoredPosition: {x: 0, y: 0}
277 | m_SizeDelta: {x: 0, y: 0}
278 | m_Pivot: {x: 0, y: 0}
279 | --- !u!1 &736166295
280 | GameObject:
281 | m_ObjectHideFlags: 0
282 | m_PrefabParentObject: {fileID: 0}
283 | m_PrefabInternal: {fileID: 0}
284 | serializedVersion: 5
285 | m_Component:
286 | - component: {fileID: 736166296}
287 | - component: {fileID: 736166298}
288 | - component: {fileID: 736166297}
289 | m_Layer: 0
290 | m_Name: New Sprite
291 | m_TagString: Untagged
292 | m_Icon: {fileID: 0}
293 | m_NavMeshLayer: 0
294 | m_StaticEditorFlags: 0
295 | m_IsActive: 1
296 | --- !u!4 &736166296
297 | Transform:
298 | m_ObjectHideFlags: 0
299 | m_PrefabParentObject: {fileID: 0}
300 | m_PrefabInternal: {fileID: 0}
301 | m_GameObject: {fileID: 736166295}
302 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
303 | m_LocalPosition: {x: 0, y: 0, z: 0}
304 | m_LocalScale: {x: 1, y: 1, z: 1}
305 | m_Children: []
306 | m_Father: {fileID: 0}
307 | m_RootOrder: 1
308 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
309 | --- !u!58 &736166297
310 | CircleCollider2D:
311 | m_ObjectHideFlags: 0
312 | m_PrefabParentObject: {fileID: 0}
313 | m_PrefabInternal: {fileID: 0}
314 | m_GameObject: {fileID: 736166295}
315 | m_Enabled: 1
316 | m_Density: 1
317 | m_Material: {fileID: 0}
318 | m_IsTrigger: 1
319 | m_UsedByEffector: 0
320 | m_UsedByComposite: 0
321 | m_Offset: {x: 0, y: 0}
322 | serializedVersion: 2
323 | m_Radius: 0.10000002
324 | --- !u!212 &736166298
325 | SpriteRenderer:
326 | m_ObjectHideFlags: 0
327 | m_PrefabParentObject: {fileID: 0}
328 | m_PrefabInternal: {fileID: 0}
329 | m_GameObject: {fileID: 736166295}
330 | m_Enabled: 1
331 | m_CastShadows: 0
332 | m_ReceiveShadows: 0
333 | m_MotionVectors: 1
334 | m_LightProbeUsage: 1
335 | m_ReflectionProbeUsage: 1
336 | m_Materials:
337 | - {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0}
338 | m_StaticBatchInfo:
339 | firstSubMesh: 0
340 | subMeshCount: 0
341 | m_StaticBatchRoot: {fileID: 0}
342 | m_ProbeAnchor: {fileID: 0}
343 | m_LightProbeVolumeOverride: {fileID: 0}
344 | m_ScaleInLightmap: 1
345 | m_PreserveUVs: 0
346 | m_IgnoreNormalsForChartDetection: 0
347 | m_ImportantGI: 0
348 | m_SelectedEditorRenderState: 0
349 | m_MinimumChartSize: 4
350 | m_AutoUVMaxDistance: 0.5
351 | m_AutoUVMaxAngle: 89
352 | m_LightmapParameters: {fileID: 0}
353 | m_SortingLayerID: 0
354 | m_SortingLayer: 0
355 | m_SortingOrder: 0
356 | m_Sprite: {fileID: 0}
357 | m_Color: {r: 1, g: 1, b: 1, a: 1}
358 | m_FlipX: 0
359 | m_FlipY: 0
360 | m_DrawMode: 0
361 | m_Size: {x: 0.2, y: 0.2}
362 | m_AdaptiveModeThreshold: 0.5
363 | m_SpriteTileMode: 0
364 | m_WasSpriteAssigned: 0
365 | m_MaskInteraction: 0
366 | --- !u!1 &758751186
367 | GameObject:
368 | m_ObjectHideFlags: 0
369 | m_PrefabParentObject: {fileID: 0}
370 | m_PrefabInternal: {fileID: 0}
371 | serializedVersion: 5
372 | m_Component:
373 | - component: {fileID: 758751187}
374 | - component: {fileID: 758751188}
375 | m_Layer: 0
376 | m_Name: Spotlight
377 | m_TagString: Untagged
378 | m_Icon: {fileID: 0}
379 | m_NavMeshLayer: 0
380 | m_StaticEditorFlags: 0
381 | m_IsActive: 1
382 | --- !u!4 &758751187
383 | Transform:
384 | m_ObjectHideFlags: 0
385 | m_PrefabParentObject: {fileID: 0}
386 | m_PrefabInternal: {fileID: 0}
387 | m_GameObject: {fileID: 758751186}
388 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
389 | m_LocalPosition: {x: 0, y: 0, z: 0}
390 | m_LocalScale: {x: 1, y: 1, z: 1}
391 | m_Children: []
392 | m_Father: {fileID: 759123727}
393 | m_RootOrder: 0
394 | m_LocalEulerAnglesHint: {x: 90, y: 0, z: 0}
395 | --- !u!108 &758751188
396 | Light:
397 | m_ObjectHideFlags: 0
398 | m_PrefabParentObject: {fileID: 0}
399 | m_PrefabInternal: {fileID: 0}
400 | m_GameObject: {fileID: 758751186}
401 | m_Enabled: 1
402 | serializedVersion: 8
403 | m_Type: 0
404 | m_Color: {r: 1, g: 1, b: 1, a: 1}
405 | m_Intensity: 1
406 | m_Range: 30
407 | m_SpotAngle: 45
408 | m_CookieSize: 10
409 | m_Shadows:
410 | m_Type: 0
411 | m_Resolution: -1
412 | m_CustomResolution: -1
413 | m_Strength: 1
414 | m_Bias: 0.05
415 | m_NormalBias: 0.4
416 | m_NearPlane: 0.2
417 | m_Cookie: {fileID: 0}
418 | m_DrawHalo: 0
419 | m_Flare: {fileID: 0}
420 | m_RenderMode: 0
421 | m_CullingMask:
422 | serializedVersion: 2
423 | m_Bits: 4294967295
424 | m_Lightmapping: 4
425 | m_AreaSize: {x: 1, y: 1}
426 | m_BounceIntensity: 1
427 | m_ColorTemperature: 6570
428 | m_UseColorTemperature: 0
429 | m_ShadowRadius: 0
430 | m_ShadowAngle: 0
431 | --- !u!1 &759123722
432 | GameObject:
433 | m_ObjectHideFlags: 0
434 | m_PrefabParentObject: {fileID: 0}
435 | m_PrefabInternal: {fileID: 0}
436 | serializedVersion: 5
437 | m_Component:
438 | - component: {fileID: 759123727}
439 | - component: {fileID: 759123726}
440 | - component: {fileID: 759123725}
441 | - component: {fileID: 759123724}
442 | - component: {fileID: 759123723}
443 | m_Layer: 0
444 | m_Name: Camera
445 | m_TagString: MainCamera
446 | m_Icon: {fileID: 0}
447 | m_NavMeshLayer: 0
448 | m_StaticEditorFlags: 0
449 | m_IsActive: 1
450 | --- !u!81 &759123723
451 | AudioListener:
452 | m_ObjectHideFlags: 0
453 | m_PrefabParentObject: {fileID: 0}
454 | m_PrefabInternal: {fileID: 0}
455 | m_GameObject: {fileID: 759123722}
456 | m_Enabled: 1
457 | --- !u!92 &759123724
458 | Behaviour:
459 | m_ObjectHideFlags: 0
460 | m_PrefabParentObject: {fileID: 0}
461 | m_PrefabInternal: {fileID: 0}
462 | m_GameObject: {fileID: 759123722}
463 | m_Enabled: 1
464 | --- !u!124 &759123725
465 | Behaviour:
466 | m_ObjectHideFlags: 0
467 | m_PrefabParentObject: {fileID: 0}
468 | m_PrefabInternal: {fileID: 0}
469 | m_GameObject: {fileID: 759123722}
470 | m_Enabled: 1
471 | --- !u!20 &759123726
472 | Camera:
473 | m_ObjectHideFlags: 0
474 | m_PrefabParentObject: {fileID: 0}
475 | m_PrefabInternal: {fileID: 0}
476 | m_GameObject: {fileID: 759123722}
477 | m_Enabled: 1
478 | serializedVersion: 2
479 | m_ClearFlags: 2
480 | m_BackGroundColor: {r: 0, g: 0, b: 0, a: 0}
481 | m_NormalizedViewPortRect:
482 | serializedVersion: 2
483 | x: 0
484 | y: 0
485 | width: 1
486 | height: 1
487 | near clip plane: 0.3
488 | far clip plane: 50
489 | field of view: 60
490 | orthographic: 0
491 | orthographic size: 5
492 | m_Depth: 0
493 | m_CullingMask:
494 | serializedVersion: 2
495 | m_Bits: 4294967295
496 | m_RenderingPath: -1
497 | m_TargetTexture: {fileID: 0}
498 | m_TargetDisplay: 0
499 | m_TargetEye: 3
500 | m_HDR: 1
501 | m_AllowMSAA: 1
502 | m_ForceIntoRT: 0
503 | m_OcclusionCulling: 1
504 | m_StereoConvergence: 10
505 | m_StereoSeparation: 0.022
506 | m_StereoMirrorMode: 0
507 | --- !u!4 &759123727
508 | Transform:
509 | m_ObjectHideFlags: 0
510 | m_PrefabParentObject: {fileID: 0}
511 | m_PrefabInternal: {fileID: 0}
512 | m_GameObject: {fileID: 759123722}
513 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
514 | m_LocalPosition: {x: 0, y: 0, z: -3}
515 | m_LocalScale: {x: 1, y: 1, z: 1}
516 | m_Children:
517 | - {fileID: 758751187}
518 | m_Father: {fileID: 0}
519 | m_RootOrder: 0
520 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
521 | --- !u!1 &1554563598
522 | GameObject:
523 | m_ObjectHideFlags: 0
524 | m_PrefabParentObject: {fileID: 0}
525 | m_PrefabInternal: {fileID: 0}
526 | serializedVersion: 5
527 | m_Component:
528 | - component: {fileID: 1554563599}
529 | - component: {fileID: 1554563601}
530 | - component: {fileID: 1554563600}
531 | m_Layer: 5
532 | m_Name: Text
533 | m_TagString: Untagged
534 | m_Icon: {fileID: 0}
535 | m_NavMeshLayer: 0
536 | m_StaticEditorFlags: 0
537 | m_IsActive: 1
538 | --- !u!224 &1554563599
539 | RectTransform:
540 | m_ObjectHideFlags: 0
541 | m_PrefabParentObject: {fileID: 0}
542 | m_PrefabInternal: {fileID: 0}
543 | m_GameObject: {fileID: 1554563598}
544 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
545 | m_LocalPosition: {x: 0, y: 0, z: 0}
546 | m_LocalScale: {x: 1, y: 1, z: 1}
547 | m_Children: []
548 | m_Father: {fileID: 420470724}
549 | m_RootOrder: 0
550 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
551 | m_AnchorMin: {x: 0, y: 0}
552 | m_AnchorMax: {x: 1, y: 1}
553 | m_AnchoredPosition: {x: 0, y: 0}
554 | m_SizeDelta: {x: 0, y: 0}
555 | m_Pivot: {x: 0.5, y: 0.5}
556 | --- !u!114 &1554563600
557 | MonoBehaviour:
558 | m_ObjectHideFlags: 0
559 | m_PrefabParentObject: {fileID: 0}
560 | m_PrefabInternal: {fileID: 0}
561 | m_GameObject: {fileID: 1554563598}
562 | m_Enabled: 1
563 | m_EditorHideFlags: 0
564 | m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3}
565 | m_Name:
566 | m_EditorClassIdentifier:
567 | m_Material: {fileID: 0}
568 | m_Color: {r: 1, g: 1, b: 1, a: 1}
569 | m_RaycastTarget: 1
570 | m_OnCullStateChanged:
571 | m_PersistentCalls:
572 | m_Calls: []
573 | m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
574 | Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
575 | m_FontData:
576 | m_Font: {fileID: 12800000, guid: ceee44ba7e6f3a74db4d1b5f36c628fc, type: 3}
577 | m_FontSize: 100
578 | m_FontStyle: 0
579 | m_BestFit: 0
580 | m_MinSize: 1
581 | m_MaxSize: 100
582 | m_Alignment: 4
583 | m_AlignByGeometry: 0
584 | m_RichText: 1
585 | m_HorizontalOverflow: 0
586 | m_VerticalOverflow: 0
587 | m_LineSpacing: 1
588 | m_Text: Asset Bundle Injection Succeed!
589 | --- !u!222 &1554563601
590 | CanvasRenderer:
591 | m_ObjectHideFlags: 0
592 | m_PrefabParentObject: {fileID: 0}
593 | m_PrefabInternal: {fileID: 0}
594 | m_GameObject: {fileID: 1554563598}
595 | --- !u!1 &1729198147
596 | GameObject:
597 | m_ObjectHideFlags: 0
598 | m_PrefabParentObject: {fileID: 0}
599 | m_PrefabInternal: {fileID: 0}
600 | serializedVersion: 5
601 | m_Component:
602 | - component: {fileID: 1729198150}
603 | - component: {fileID: 1729198149}
604 | - component: {fileID: 1729198148}
605 | m_Layer: 0
606 | m_Name: EventSystem
607 | m_TagString: Untagged
608 | m_Icon: {fileID: 0}
609 | m_NavMeshLayer: 0
610 | m_StaticEditorFlags: 0
611 | m_IsActive: 1
612 | --- !u!114 &1729198148
613 | MonoBehaviour:
614 | m_ObjectHideFlags: 0
615 | m_PrefabParentObject: {fileID: 0}
616 | m_PrefabInternal: {fileID: 0}
617 | m_GameObject: {fileID: 1729198147}
618 | m_Enabled: 1
619 | m_EditorHideFlags: 0
620 | m_Script: {fileID: 1077351063, guid: f70555f144d8491a825f0804e09c671c, type: 3}
621 | m_Name:
622 | m_EditorClassIdentifier:
623 | m_HorizontalAxis: Horizontal
624 | m_VerticalAxis: Vertical
625 | m_SubmitButton: Submit
626 | m_CancelButton: Cancel
627 | m_InputActionsPerSecond: 10
628 | m_RepeatDelay: 0.5
629 | m_ForceModuleActive: 0
630 | --- !u!114 &1729198149
631 | MonoBehaviour:
632 | m_ObjectHideFlags: 0
633 | m_PrefabParentObject: {fileID: 0}
634 | m_PrefabInternal: {fileID: 0}
635 | m_GameObject: {fileID: 1729198147}
636 | m_Enabled: 1
637 | m_EditorHideFlags: 0
638 | m_Script: {fileID: -619905303, guid: f70555f144d8491a825f0804e09c671c, type: 3}
639 | m_Name:
640 | m_EditorClassIdentifier:
641 | m_FirstSelected: {fileID: 0}
642 | m_sendNavigationEvents: 1
643 | m_DragThreshold: 5
644 | --- !u!4 &1729198150
645 | Transform:
646 | m_ObjectHideFlags: 0
647 | m_PrefabParentObject: {fileID: 0}
648 | m_PrefabInternal: {fileID: 0}
649 | m_GameObject: {fileID: 1729198147}
650 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
651 | m_LocalPosition: {x: 0, y: 0, z: 0}
652 | m_LocalScale: {x: 1, y: 1, z: 1}
653 | m_Children: []
654 | m_Father: {fileID: 0}
655 | m_RootOrder: 4
656 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
657 |
--------------------------------------------------------------------------------
/Payload/MonoScript/Utils.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Reflection;
5 | using System.Text;
6 | using UnityEngine;
7 |
8 | namespace Payload.MonoScript
9 | {
10 | public static class InjectDebug
11 | {
12 | public const string prefix = "__Injector--: ";
13 | public static void InjectLog(this MonoBehaviour mono, object msg)
14 | {
15 | Debug.Log(prefix + mono.GetType().Name + ":\r\n" + msg.ToString());
16 | }
17 | public static void InjectLogWarning(this MonoBehaviour mono, object msg)
18 | {
19 | Debug.LogWarning(prefix + mono.GetType().Name + ":\r\n" + msg.ToString());
20 | }
21 | public static void InjectLogError(this MonoBehaviour mono, object msg, Exception e = null)
22 | {
23 | string trace = string.Empty;
24 | if (e != null)
25 | {
26 | trace = "\r\n" + e.Message + "\r\n" + e.StackTrace;
27 | }
28 | Debug.LogError(prefix + mono.GetType().Name + ":\r\n" + msg.ToString() + trace);
29 | }
30 | }
31 |
32 | public static class AllGUIStyle
33 | {
34 | public static readonly GUIStyle DEFAULT_LABEL = new GUIStyle(GUI.skin.label) { fontSize = 13 };
35 | public static readonly GUIStyle DEFAULT_WINDOW = new GUIStyle(GUI.skin.window) { fontSize = 15 };
36 | }
37 |
38 | public static class WindowID
39 | {
40 | public const int CONSOLE = 0x00;
41 | public const int GAME_STATISTIC = 0x01;
42 | public const int TRANSFORM_WITH_TRIGGER_LIST = 0x02;
43 | public const int TRANSFORM_MODIFIER_COMPONENT_LIST = 0x03;
44 | public const int TRANSFORM_MODIFIER_PROPERTIES_LIST = 0x04;
45 | public const int FREE_CAM_VALUES = 0x05;
46 | }
47 |
48 | public static class AllRect
49 | {
50 | //Ln1
51 | public static Rect FreeCamRect = new Rect(Screen.width * 0.02f, Screen.height * 0.02f, Screen.width * 0.30f, Screen.height * 0.18f);
52 | public static Rect HierRect = new Rect(Screen.width * 0.02f, Screen.height * 0.22f, Screen.width * 0.30f, Screen.height * 0.76f);
53 | //Ln2
54 | public static Rect CompoRect = new Rect(Screen.width * 0.34f, Screen.height * 0.02f, Screen.width * 0.3f, Screen.height * 0.40f);
55 | public static Rect PropRect = new Rect(Screen.width * 0.34f, Screen.height * 0.44f, Screen.width * 0.3f, Screen.height * 0.54f);
56 | //Ln3
57 | public static Rect StatisticRect = new Rect(Screen.width * 0.66f, Screen.height * 0.02f, Screen.width * 0.32f, Screen.height * 0.46f);
58 | public static Rect ConsoleRect = new Rect(Screen.width * 0.66f, Screen.height * 0.50f, Screen.width * 0.32f, Screen.height * 0.48f);
59 | }
60 |
61 | public static class Utils
62 | {
63 |
64 | public static string Vec32Str(Vector3 v3)
65 | {
66 | return " X:" + Rnd(v3.x) + " Y:" + Rnd(v3.y) + " Z:" + Rnd(v3.z);
67 | }
68 | public static string Rnd(float f)
69 | {
70 | return f.ToString("F2");
71 | }
72 | public static float ClampAngle(float angle, float min, float max)
73 | {
74 | if (angle < -360)
75 | angle += 360;
76 | if (angle > 360)
77 | angle -= 360;
78 | return Mathf.Clamp(angle, min, max);
79 | }
80 | public static string GetGameObjectPath(GameObject obj)
81 | {
82 | string path = "/" + obj.name;
83 | while (obj.transform.parent != null)
84 | {
85 | obj = obj.transform.parent.gameObject;
86 | path = "/" + obj.name + path;
87 | }
88 | return path;
89 | }
90 | public static Matrix4x4 ScreenToWorldMatrix(Camera cam)
91 | {
92 | var rect = cam.pixelRect;
93 | var viewportMatrix = Matrix4x4.Ortho(rect.xMin, rect.xMax, rect.yMin, rect.yMax, -1, 1);
94 | var vpMatrix = cam.projectionMatrix * cam.worldToCameraMatrix;
95 | vpMatrix.SetColumn(2, new Vector4(0, 0, 1, 0));
96 | return vpMatrix.inverse * viewportMatrix;
97 | }
98 | public static Vector2 ScreenToWorldPointPerspective(Vector2 point,Camera camera)
99 | {
100 | return ScreenToWorldMatrix(camera).MultiplyPoint(point);
101 | }
102 |
103 | }
104 |
105 |
106 |
107 | public class Reflector
108 | {
109 | public enum VarCata
110 | {
111 | Field,
112 | Property
113 | }
114 |
115 |
116 |
117 | public Component component { get; private set; }
118 | private List props;
119 | private List fields;
120 | //List methods = new List(mono.GetType().GetMethods());
121 |
122 | private List