delete early component. that. yknow. deletes... early...?
This commit is contained in:
parent
54c79328f6
commit
c361ad2945
11 changed files with 135 additions and 0 deletions
8
DeleteEarly.meta
Normal file
8
DeleteEarly.meta
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: a290a75a421721342a35382c42c6657b
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
8
DeleteEarly/Editor.meta
Normal file
8
DeleteEarly/Editor.meta
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 786831c11b386ac4c8a28efb7841e952
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
22
DeleteEarly/Editor/DeleteEarlyEditorAsmdef.asmdef
Normal file
22
DeleteEarly/Editor/DeleteEarlyEditorAsmdef.asmdef
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
{
|
||||
"name": "DeleteEarlyEditorAsmdef",
|
||||
"rootNamespace": "",
|
||||
"references": [
|
||||
"GUID:62ced99b048af7f4d8dfe4bed8373d76",
|
||||
"GUID:5718fb738711cd34ea54e9553040911d",
|
||||
"GUID:901e56b065a857d4483a77f8cae73588",
|
||||
"GUID:209cbd2a789c4f72963fdbf1f8a01909",
|
||||
"GUID:752d62de48ec60a4e8dd8e92e186f02a"
|
||||
],
|
||||
"includePlatforms": [
|
||||
"Editor"
|
||||
],
|
||||
"excludePlatforms": [],
|
||||
"allowUnsafeCode": false,
|
||||
"overrideReferences": false,
|
||||
"precompiledReferences": [],
|
||||
"autoReferenced": true,
|
||||
"defineConstraints": [],
|
||||
"versionDefines": [],
|
||||
"noEngineReferences": false
|
||||
}
|
||||
7
DeleteEarly/Editor/DeleteEarlyEditorAsmdef.asmdef.meta
Normal file
7
DeleteEarly/Editor/DeleteEarlyEditorAsmdef.asmdef.meta
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 0d3bcc760027e9d45b83c17d2a356844
|
||||
AssemblyDefinitionImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
38
DeleteEarly/Editor/DeleteEarlyPlugin.cs
Normal file
38
DeleteEarly/Editor/DeleteEarlyPlugin.cs
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
using gay.lilyy.DeleteEarly;
|
||||
using nadena.dev.ndmf;
|
||||
using UnityEngine;
|
||||
|
||||
[assembly: ExportsPlugin(typeof(DeleteEarlyPlugin))]
|
||||
|
||||
namespace gay.lilyy.DeleteEarly
|
||||
{
|
||||
public class DeleteEarlyPlugin : Plugin<DeleteEarlyPlugin>
|
||||
{
|
||||
public override string DisplayName => "Delete Early";
|
||||
public override string QualifiedName => "gay.lilyy.DeleteEarly";
|
||||
|
||||
protected override void Configure()
|
||||
{
|
||||
InPhase(BuildPhase.FirstChance).Run("DeleteEarly", ctx =>
|
||||
{
|
||||
var configs = ctx.AvatarRootObject.GetComponentsInChildren<DeleteEarlyConfig>(true);
|
||||
if (configs == null || configs.Length == 0)
|
||||
return;
|
||||
|
||||
foreach (var config in configs)
|
||||
{
|
||||
if (config == null)
|
||||
continue;
|
||||
|
||||
GameObject targetToDelete = config.targetObject != null ? config.targetObject : config.gameObject;
|
||||
|
||||
if (targetToDelete != null)
|
||||
{
|
||||
Object.DestroyImmediate(targetToDelete);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
11
DeleteEarly/Editor/DeleteEarlyPlugin.cs.meta
Normal file
11
DeleteEarly/Editor/DeleteEarlyPlugin.cs.meta
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 247a9fb377d57814d894f3ce90f4d78b
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
8
DeleteEarly/Runtime.meta
Normal file
8
DeleteEarly/Runtime.meta
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: d420e6b7d0039b6449bacbbe3ed423ad
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
11
DeleteEarly/Runtime/DeleteEarlyConfig.cs
Normal file
11
DeleteEarly/Runtime/DeleteEarlyConfig.cs
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
using UnityEngine;
|
||||
|
||||
namespace gay.lilyy.DeleteEarly
|
||||
{
|
||||
[AddComponentMenu("LillithRosePup/Delete Early")]
|
||||
public class DeleteEarlyConfig : MonoBehaviour, VRC.SDKBase.IEditorOnly
|
||||
{
|
||||
public GameObject targetObject;
|
||||
}
|
||||
}
|
||||
|
||||
11
DeleteEarly/Runtime/DeleteEarlyConfig.cs.meta
Normal file
11
DeleteEarly/Runtime/DeleteEarlyConfig.cs.meta
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 27f4b0369be38aa4eb93c04844611ebd
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
4
DeleteEarly/Runtime/DeleteEarlyRuntimeAsmdef.asmdef
Normal file
4
DeleteEarly/Runtime/DeleteEarlyRuntimeAsmdef.asmdef
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"name": "DeleteEarlyRuntimeAsmdef"
|
||||
}
|
||||
|
||||
7
DeleteEarly/Runtime/DeleteEarlyRuntimeAsmdef.asmdef.meta
Normal file
7
DeleteEarly/Runtime/DeleteEarlyRuntimeAsmdef.asmdef.meta
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 752d62de48ec60a4e8dd8e92e186f02a
|
||||
AssemblyDefinitionImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Loading…
Add table
Add a link
Reference in a new issue