This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Reflection; | |
public class InjectRootAttribute : Attribute{} | |
public class InjectParentAttribute : Attribute{} | |
public static class TreeReferenceInjector { | |
public static T InjectRoot<T>(this T target, object root = null){ | |
foreach(var info in target.GetType().GetFields(BindingFlags.Public | BindingFlags.Instance)){ | |
if(info.FieldType.IsArray){ | |
var array = info.GetValue(target) as object[]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using UnityEngine.LowLevel; | |
using System.Linq; | |
static class PlayerLoopInjector | |
{ | |
static Dictionary<System.Type, System.Action> actions = new Dictionary<System.Type, System.Action>(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections.Generic; | |
using UnityEngine; | |
namespace FriendSea | |
{ | |
public static class GameObjectPool | |
{ | |
static Dictionary<GameObject, GameObject> instance2prefab = new Dictionary<GameObject, GameObject>(); | |
static Dictionary<GameObject, Stack<GameObject>> prefab2pool = new Dictionary<GameObject, Stack<GameObject>>(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using UnityEditor; | |
using System.IO; | |
using System.Diagnostics; | |
public class BenderImportMod | |
{ | |
static readonly string fileName = "Unity-BlenderToFBX.py"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using UnityEditor.AssetImporters; | |
using UnityEditor; | |
using Microsoft.CodeAnalysis.CSharp.Scripting; | |
using Microsoft.CodeAnalysis.Scripting; | |
[ScriptedImporter(0, ".meshgenerator")] | |
public class SurfaceMeshGenerator : ScriptedImporter |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using UnityEditor.AssetImporters; | |
using UnityEditor; | |
[ScriptedImporter(0, ".shaderbaker")] | |
public class ShaderBaker : ScriptedImporter | |
{ | |
[SerializeField] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections.Generic; | |
using UnityEngine; | |
using UnityEditor; | |
using UnityEditorInternal; | |
[CustomEditor(typeof(UnityEngine.Object), true)] | |
[CanEditMultipleObjects] | |
public class ReorderableEditor : Editor | |
{ | |
List<ReorderableList> reorderableLists = new List<ReorderableList>(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using UnityEditor; | |
public class CloneComponents : ScriptableWizard { | |
[SerializeField] | |
GameObject Original; | |
[SerializeField] | |
GameObject Target; | |
private void OnWizardCreate() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using UnityEditor; | |
using System.IO; | |
public class CubeMapRenderer : ScriptableWizard { | |
[SerializeField] | |
Shader TransformShader; | |
[SerializeField] | |
Camera RenderCamera; | |
[SerializeField] |