Added namespaces and fixed reflection method name bug
This commit is contained in:
@@ -6,7 +6,7 @@ using System.Reflection;
|
|||||||
using System.Text.RegularExpressions;
|
using System.Text.RegularExpressions;
|
||||||
using UnityEditor;
|
using UnityEditor;
|
||||||
|
|
||||||
namespace Utilities.SerializableData.SerializableFunc.UnityEditorUtilities
|
namespace UnityUtilities.SerializableDataHelpers.UnityEditorUtilities
|
||||||
{
|
{
|
||||||
public static class SerializedPropertyExtensions
|
public static class SerializedPropertyExtensions
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -12,10 +12,10 @@ using UnityEngine;
|
|||||||
using UnityEngine.UIElements;
|
using UnityEngine.UIElements;
|
||||||
using Utilities.Extensions.SystemExtensions;
|
using Utilities.Extensions.SystemExtensions;
|
||||||
using Utilities.Extensions.UIToolkit;
|
using Utilities.Extensions.UIToolkit;
|
||||||
using Utilities.SerializableData.SerializableFunc.UnityEditorUtilities;
|
using UnityUtilities.SerializableDataHelpers
|
||||||
using Object = UnityEngine.Object;
|
using Object = UnityEngine.Object;
|
||||||
|
|
||||||
namespace Utilities.SerializableData.SerializableFunc.UnityEditorDrawers
|
namespace UnityUtilities.SerializableDataHelpers.UnityEditorUtilities
|
||||||
{
|
{
|
||||||
[CustomPropertyDrawer(typeof(SerializableFuncBase<>), true)]
|
[CustomPropertyDrawer(typeof(SerializableFuncBase<>), true)]
|
||||||
public class SerializableFuncBasePropertyDrawer : PropertyDrawer
|
public class SerializableFuncBasePropertyDrawer : PropertyDrawer
|
||||||
|
|||||||
@@ -4,6 +4,8 @@ using System.Reflection;
|
|||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using Object = UnityEngine.Object;
|
using Object = UnityEngine.Object;
|
||||||
|
|
||||||
|
namespace UnityUtilities.SerializableDataHelpers
|
||||||
|
{
|
||||||
[System.Serializable]
|
[System.Serializable]
|
||||||
public abstract class SerializableFuncBase<TFuncType>
|
public abstract class SerializableFuncBase<TFuncType>
|
||||||
where TFuncType : Delegate
|
where TFuncType : Delegate
|
||||||
@@ -51,7 +53,7 @@ public abstract class SerializableFuncBase<TFuncType>
|
|||||||
|
|
||||||
private bool IsTargetMethodInfo(MethodInfo methodInfo, Type funcType)
|
private bool IsTargetMethodInfo(MethodInfo methodInfo, Type funcType)
|
||||||
{
|
{
|
||||||
if (string.Equals(methodInfo.Name, methodName, StringComparison.InvariantCulture)) return false;
|
if (!string.Equals(methodInfo.Name, methodName, StringComparison.InvariantCulture)) return false;
|
||||||
|
|
||||||
Type[] typeArguments = funcType.GetGenericArguments();
|
Type[] typeArguments = funcType.GetGenericArguments();
|
||||||
|
|
||||||
@@ -81,3 +83,4 @@ public abstract class SerializableFuncBase<TFuncType>
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
@@ -1,3 +1,5 @@
|
|||||||
|
namespace UnityUtilities.SerializableDataHelpers
|
||||||
|
{
|
||||||
using System;
|
using System;
|
||||||
|
|
||||||
[System.Serializable]
|
[System.Serializable]
|
||||||
@@ -173,3 +175,4 @@ public class SerializableFunc<TArg0, TArg1, TArg2, TArg3, TArg4, TArg5, TArg6, T
|
|||||||
return func(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15);
|
return func(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
@@ -3,7 +3,7 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using TMPro;
|
using TMPro;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using Utilities.SerializableData.SerializableFunc;
|
using UnityUtilities.SerializableDataHelpers;
|
||||||
|
|
||||||
public class SerializableFuncDebugger : MonoBehaviour
|
public class SerializableFuncDebugger : MonoBehaviour
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "com.antonzhernosek.serializablefunc",
|
"name": "com.antonzhernosek.serializablefunc",
|
||||||
"displayName": "SerializableFunc",
|
"displayName": "SerializableFunc",
|
||||||
"version": "1.1.0",
|
"version": "1.1.1",
|
||||||
"unity": "2020.3",
|
"unity": "2020.3",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"unity",
|
"unity",
|
||||||
|
|||||||
Reference in New Issue
Block a user