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
public static void CopyUnityEvents(object sourceObj, string source_UnityEvent, object dest, bool debug = false) | |
{ | |
FieldInfo unityEvent = sourceObj.GetType().GetField(source_UnityEvent, E_Helpers.allBindings); | |
if (unityEvent.FieldType != dest.GetType()) | |
{ | |
if (debug == true) | |
{ | |
Debug.Log("Source Type: " + unityEvent.FieldType); | |
Debug.Log("Dest Type: " + dest.GetType()); | |
Debug.Log("CopyUnityEvents - Source & Dest types don't match, exiting."); |
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
#region Editor | |
public static class PCGSettingsCopier | |
{ | |
public static PCGSettings obj = null; | |
public static List<int> indexes = new(); | |
} | |
[CustomEditor(typeof(PCGSettings), true)] | |
public class PCGSettingsEditor : Editor | |
{ |