-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
# This .gitignore file should be placed at the root of your Unity project directory | ||
# | ||
# Get latest from https://github.com/github/gitignore/blob/main/Unity.gitignore | ||
# | ||
/[Ll]ibrary/ | ||
/[Tt]emp/ | ||
/[Oo]bj/ | ||
/[Bb]uild/ | ||
/[Bb]uilds/ | ||
/[Ll]ogs/ | ||
/[Uu]ser[Ss]ettings/ | ||
|
||
# MemoryCaptures can get excessive in size. | ||
# They also could contain extremely sensitive data | ||
/[Mm]emoryCaptures/ | ||
|
||
# Recordings can get excessive in size | ||
/[Rr]ecordings/ | ||
|
||
# Uncomment this line if you wish to ignore the asset store tools plugin | ||
# /[Aa]ssets/AssetStoreTools* | ||
|
||
# Autogenerated Jetbrains Rider plugin | ||
/[Aa]ssets/Plugins/Editor/JetBrains* | ||
|
||
# Visual Studio cache directory | ||
.vs/ | ||
|
||
# Gradle cache directory | ||
.gradle/ | ||
|
||
# Autogenerated VS/MD/Consulo solution and project files | ||
ExportedObj/ | ||
.consulo/ | ||
*.csproj | ||
*.unityproj | ||
*.sln | ||
*.suo | ||
*.tmp | ||
*.user | ||
*.userprefs | ||
*.pidb | ||
*.booproj | ||
*.svd | ||
*.pdb | ||
*.mdb | ||
*.opendb | ||
*.VC.db | ||
|
||
# Unity3D generated meta files | ||
*.pidb.meta | ||
*.pdb.meta | ||
*.mdb.meta | ||
|
||
# Unity3D generated file on crash reports | ||
sysinfo.txt | ||
|
||
# Builds | ||
*.apk | ||
*.aab | ||
*.unitypackage | ||
*.app | ||
|
||
# Crashlytics generated file | ||
crashlytics-build.properties | ||
|
||
# Packed Addressables | ||
/[Aa]ssets/[Aa]ddressable[Aa]ssets[Dd]ata/*/*.bin* | ||
|
||
# Temporary auto-generated Android Assets | ||
/[Aa]ssets/[Ss]treamingAssets/aa.meta | ||
/[Aa]ssets/[Ss]treamingAssets/aa/* | ||
|
||
# Exports | ||
/BepInEx |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"version": "1.0", | ||
"components": [ | ||
"Microsoft.VisualStudio.Workload.ManagedGame" | ||
] | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<Project> | ||
<PropertyGroup> | ||
<OutputPath>..\..\..\BepInEx\plugins\$(SolutionName)</OutputPath> | ||
<BaseIntermediateOutputPath>..\..\..\obj</BaseIntermediateOutputPath> | ||
</PropertyGroup> | ||
</Project> |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Reflection; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
#if !UNITY_EDITOR && !UNITY_STANDALONE | ||
using HarmonyLib; | ||
using UnityEngine; | ||
|
||
namespace Xaymar.Example | ||
{ | ||
[HarmonyPatch(typeof(DroppedItem))] | ||
internal class DroppedItemInjector | ||
{ | ||
[HarmonyPatch("Update")] | ||
[HarmonyPostfix] | ||
static void Update_Postfix(DroppedItem __instance) | ||
{ | ||
__instance.GetType().GetMethod("OnMouseDown", BindingFlags.NonPublic | BindingFlags.Instance).Invoke(__instance, []); | ||
} | ||
} | ||
} | ||
#endif |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<configuration> | ||
<packageSources> | ||
<add key="BepInEx" value="https://nuget.bepinex.dev/v3/index.json" /> | ||
</packageSources> | ||
</configuration> |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
#if !UNITY_EDITOR && !UNITY_STANDALONE | ||
using System; | ||
using BepInEx; | ||
using UnityEngine; | ||
using HarmonyLib; | ||
|
||
namespace Xaymar.AutoPickup | ||
{ | ||
[BepInPlugin(PluginInfo.PLUGIN_GUID, PluginInfo.PLUGIN_NAME, PluginInfo.PLUGIN_VERSION)] | ||
public class Plugin : BaseUnityPlugin | ||
{ | ||
private void Awake() | ||
{ | ||
// Plugin startup logic | ||
|
||
// Start of: AssetBundle loader. | ||
string whoAmI = System.Reflection.Assembly.GetExecutingAssembly().Location; | ||
string whereAmI = System.IO.Path.GetDirectoryName(whoAmI); | ||
if (string.IsNullOrEmpty(whereAmI)) | ||
{ | ||
throw new System.IO.FileNotFoundException("Failed to find myself."); | ||
} | ||
|
||
// - Load all Asset Bundles in our directory. | ||
foreach (var file in System.IO.Directory.EnumerateFiles(whereAmI, "*.assetbundle")) | ||
{ | ||
// Can be optimized to load asynchronously, which speeds up loading with many asset bundles. | ||
Logger.LogInfo($"Loading bundle '{file}'..."); | ||
var bundle = AssetBundle.LoadFromFile(file); | ||
} | ||
// End of: AssetBundle loader. | ||
|
||
// Apply patches. | ||
try | ||
{ | ||
var harmony = new Harmony(PluginInfo.PLUGIN_GUID); | ||
Logger.LogInfo("Applying patch to DroppedItem..."); | ||
harmony.PatchAll(typeof(Xaymar.Example.DroppedItemInjector)); | ||
} | ||
catch (Exception e) | ||
{ | ||
Logger.LogFatal($"Failed to apply patch(es): {e}"); | ||
UnityEngine.Application.Quit(1); | ||
} | ||
|
||
Logger.LogInfo($"Plugin {PluginInfo.PLUGIN_GUID} is loaded!"); | ||
} | ||
} | ||
} | ||
|
||
#endif |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"name": "Xaymar.AutoPickup", | ||
"rootNamespace": "", | ||
"references": [ | ||
"" | ||
], | ||
"includePlatforms": [], | ||
"excludePlatforms": [], | ||
"allowUnsafeCode": false, | ||
"overrideReferences": false, | ||
"precompiledReferences": [], | ||
"autoReferenced": true, | ||
"defineConstraints": [], | ||
"versionDefines": [], | ||
"noEngineReferences": false | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
<PropertyGroup> | ||
<TargetFramework>net46</TargetFramework> | ||
<AssemblyName>Xaymar.AutoPickup</AssemblyName> | ||
<Description>Automatically pick up items, instead of playing Hide & Seek with them.</Description> | ||
<Version>1.0.0</Version> | ||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks> | ||
<LangVersion>latest</LangVersion> | ||
<OutputPath>..\..\..\BepInEx\plugins\$(SolutionName)</OutputPath> | ||
<BaseIntermediateOutputPath>..\..\..\obj</BaseIntermediateOutputPath> | ||
<TargetName>..\$(SolutionName)</TargetName> | ||
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<PackageReference Include="BepInEx.Analyzers" Version="1.*" PrivateAssets="all" /> | ||
<PackageReference Include="BepInEx.Core" Version="5.*" /> | ||
<PackageReference Include="BepInEx.PluginInfoProps" Version="1.*" /> | ||
<PackageReference Include="UnityEngine.Modules" Version="2021.2.14" IncludeAssets="compile" /> | ||
</ItemGroup> | ||
<ItemGroup Condition="'$(TargetFramework.TrimEnd(`0123456789`))' == 'net'"> | ||
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.2" PrivateAssets="all" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<Reference Include="Assembly-CSharp" IncludeAssets="compile"> | ||
<HintPath>D:\Games\Steam\steamapps\common\Crystal guardians\Crystal Guardians_Data\Managed\Assembly-CSharp.dll</HintPath> | ||
<Private>false</Private> | ||
</Reference> | ||
</ItemGroup> | ||
</Project> |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
{ | ||
"dependencies": { | ||
"com.unity.collab-proxy": "1.15.12", | ||
"com.unity.ide.rider": "3.0.12", | ||
"com.unity.ide.visualstudio": "2.0.14", | ||
"com.unity.ide.vscode": "1.2.5", | ||
"com.unity.test-framework": "1.1.29", | ||
"com.unity.textmeshpro": "3.0.6", | ||
"com.unity.timeline": "1.6.4", | ||
"com.unity.ugui": "1.0.0", | ||
"com.unity.visualscripting": "1.7.6", | ||
"com.xaymar.guardian": "https://github.com/Xaymar/UnityGuardian.git", | ||
"com.unity.modules.ai": "1.0.0", | ||
"com.unity.modules.androidjni": "1.0.0", | ||
"com.unity.modules.animation": "1.0.0", | ||
"com.unity.modules.assetbundle": "1.0.0", | ||
"com.unity.modules.audio": "1.0.0", | ||
"com.unity.modules.cloth": "1.0.0", | ||
"com.unity.modules.director": "1.0.0", | ||
"com.unity.modules.imageconversion": "1.0.0", | ||
"com.unity.modules.imgui": "1.0.0", | ||
"com.unity.modules.jsonserialize": "1.0.0", | ||
"com.unity.modules.particlesystem": "1.0.0", | ||
"com.unity.modules.physics": "1.0.0", | ||
"com.unity.modules.physics2d": "1.0.0", | ||
"com.unity.modules.screencapture": "1.0.0", | ||
"com.unity.modules.terrain": "1.0.0", | ||
"com.unity.modules.terrainphysics": "1.0.0", | ||
"com.unity.modules.tilemap": "1.0.0", | ||
"com.unity.modules.ui": "1.0.0", | ||
"com.unity.modules.uielements": "1.0.0", | ||
"com.unity.modules.umbra": "1.0.0", | ||
"com.unity.modules.unityanalytics": "1.0.0", | ||
"com.unity.modules.unitywebrequest": "1.0.0", | ||
"com.unity.modules.unitywebrequestassetbundle": "1.0.0", | ||
"com.unity.modules.unitywebrequestaudio": "1.0.0", | ||
"com.unity.modules.unitywebrequesttexture": "1.0.0", | ||
"com.unity.modules.unitywebrequestwww": "1.0.0", | ||
"com.unity.modules.vehicles": "1.0.0", | ||
"com.unity.modules.video": "1.0.0", | ||
"com.unity.modules.vr": "1.0.0", | ||
"com.unity.modules.wind": "1.0.0", | ||
"com.unity.modules.xr": "1.0.0" | ||
} | ||
} |