misc stuff from other avatars
This commit is contained in:
parent
99420739e0
commit
e2b229edfc
13 changed files with 273 additions and 0 deletions
3
VRCFAllowRootFeatures/README.md
Normal file
3
VRCFAllowRootFeatures/README.md
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
# VRCFAllowRootFeatures
|
||||
|
||||
A Harmony patch to disable the `To avoid abuse by prefab creators, this component can only be placed on the root object containing the avatar descriptor, OR a child object containing ONLY vrcfury components.` message
|
||||
7
VRCFAllowRootFeatures/README.md.meta
Normal file
7
VRCFAllowRootFeatures/README.md.meta
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 45c06a4ce7dc45042a050e36ab0dbc2c
|
||||
TextScriptImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
18
VRCFAllowRootFeatures/VRCFAllowRootFeatures.asmdef
Normal file
18
VRCFAllowRootFeatures/VRCFAllowRootFeatures.asmdef
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
{
|
||||
"name": "VRCFAllowRootFeatures",
|
||||
"rootNamespace": "",
|
||||
"references": [
|
||||
"GUID:3a48074f337050d4c987242d92d466b6"
|
||||
],
|
||||
"includePlatforms": [
|
||||
"Editor"
|
||||
],
|
||||
"excludePlatforms": [],
|
||||
"allowUnsafeCode": false,
|
||||
"overrideReferences": false,
|
||||
"precompiledReferences": [],
|
||||
"autoReferenced": true,
|
||||
"defineConstraints": [],
|
||||
"versionDefines": [],
|
||||
"noEngineReferences": false
|
||||
}
|
||||
7
VRCFAllowRootFeatures/VRCFAllowRootFeatures.asmdef.meta
Normal file
7
VRCFAllowRootFeatures/VRCFAllowRootFeatures.asmdef.meta
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
fileFormatVersion: 2
|
||||
guid: c14d83102ee44b14bb9088ece79690e3
|
||||
AssemblyDefinitionImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
31
VRCFAllowRootFeatures/VRCFAllowRootFeatures.cs
Normal file
31
VRCFAllowRootFeatures/VRCFAllowRootFeatures.cs
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
using System.Reflection;
|
||||
using HarmonyLib;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
[InitializeOnLoad]
|
||||
public static class VRCFAllowRootFeatures {
|
||||
static VRCFAllowRootFeatures() {
|
||||
var harmony = new Harmony("gay.lilyy.VRCFAllowRootFeatures");
|
||||
var featureFinderType = AccessTools.TypeByName("VF.Feature.Base.FeatureFinder");
|
||||
|
||||
if (featureFinderType == null) {
|
||||
Debug.LogError("FeatureFinder type not found");
|
||||
return;
|
||||
}
|
||||
|
||||
var method = AccessTools.Method(featureFinderType, "AllowRootFeatures");
|
||||
if (method == null) {
|
||||
Debug.LogError("AllowRootFeatures method not found");
|
||||
return;
|
||||
}
|
||||
|
||||
var prefix = typeof(VRCFAllowRootFeatures).GetMethod(nameof(Prefix), BindingFlags.Static | BindingFlags.NonPublic);
|
||||
harmony.Patch(method, prefix: new HarmonyMethod(prefix));
|
||||
}
|
||||
|
||||
private static bool Prefix(object gameObject, object avatarObject, ref bool __result) {
|
||||
__result = true;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
11
VRCFAllowRootFeatures/VRCFAllowRootFeatures.cs.meta
Normal file
11
VRCFAllowRootFeatures/VRCFAllowRootFeatures.cs.meta
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 63d5a4749805a33428c808b6ae6c0dcf
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Loading…
Add table
Add a link
Reference in a new issue