Skip to content
This repository has been archived by the owner on Apr 10, 2024. It is now read-only.

Commit

Permalink
Update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
uurha committed Feb 24, 2024
1 parent 4587b95 commit 342226f
Show file tree
Hide file tree
Showing 14 changed files with 42 additions and 51 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"references": [
"GUID:443314a5a4e67c14a88ae223776b6554",
"GUID:28da8d3b12e3efa47928e0c9070f853d",
"GUID:a59e3daedde9ca94bba45364d4ead25f"
"GUID:a59e3daedde9ca94bba45364d4ead25f",
"GUID:01df13aca8d01e24a911bcc3e8277031"
],
"includePlatforms": [
"Editor"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
using System;
using System.Diagnostics;
using Better.Tools.Runtime;
using Better.Internal.Core.Runtime;

namespace Better.EditorTools.Attributes
{
[Conditional(BetterEditorDefines.Editor)]
[Conditional(Defines.Editor)]
[AttributeUsage(AttributeTargets.Class, AllowMultiple = true)]
public class MultiCustomPropertyDrawer : Attribute
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
using Better.EditorTools.Comparers;
using Better.EditorTools.Drawers.Base;
using Better.Extensions.Runtime;
using Better.Internal.Core.Runtime;
using Better.Tools.Runtime;
using Better.Tools.Runtime.Attributes;
using UnityEditor;
Expand Down Expand Up @@ -98,7 +99,7 @@ private void TryInitialize()
if (!_fieldDrawers.TryGetValue(propertyAttribute.GetType(), out var drawerType)) continue;

param[1] = propertyAttribute;
var drawer = (FieldDrawer)Activator.CreateInstance(drawerType, BetterEditorDefines.ConstructorFlags, null, param, null);
var drawer = (FieldDrawer)Activator.CreateInstance(drawerType, Defines.ConstructorFlags, null, param, null);
drawers.Add(drawer);
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using System.Reflection;
using Better.Tools.Runtime;
using Better.Internal.Core.Runtime;
using UnityEditor;
using UnityEngine;

Expand All @@ -13,7 +13,7 @@ public static bool PropertyFieldSafe(Rect position, SerializedProperty property,
if (_defaultPropertyField == null)
{
var type = typeof(EditorGUI);
_defaultPropertyField = type.GetMethod("DefaultPropertyField", BetterEditorDefines.MethodFlags);
_defaultPropertyField = type.GetMethod("DefaultPropertyField", Defines.MethodFlags);
}

return (bool)_defaultPropertyField.Invoke(null, new object[] { position, property, label });
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using Better.Tools.Runtime;
using Better.Internal.Core.Runtime;
using UnityEditor;
using UnityEditorInternal;

Expand All @@ -14,7 +14,7 @@ public static void RepaintAllInspectors(SerializedProperty property)
if (_repaintInspectors == null)
{
var inspWin = typeof(ReorderableList);
_repaintInspectors = inspWin.GetMethod("InvalidateParentCaches", BetterEditorDefines.MethodFlags);
_repaintInspectors = inspWin.GetMethod("InvalidateParentCaches", Defines.MethodFlags);
}

if (_repaintInspectors != null) _repaintInspectors.Invoke(null, new object[] { property.propertyPath });
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using Better.Internal.Core.Runtime;
using Better.Tools.Runtime;
using UnityEditor;
using UnityEngine;
Expand Down Expand Up @@ -83,7 +84,7 @@ public static bool IsDisposed(this SerializedObject serializedObject)
return true;
}

var objectPrtInfo = typeof(SerializedObject).GetField("m_NativeObjectPtr", BetterEditorDefines.FieldsFlags);
var objectPrtInfo = typeof(SerializedObject).GetField("m_NativeObjectPtr", Defines.FieldsFlags);
try
{
if (objectPrtInfo != null)
Expand All @@ -107,8 +108,8 @@ public static bool IsDisposed(this SerializedProperty property)
return true;
}

var propertyPrtInfo = typeof(SerializedProperty).GetField("m_NativePropertyPtr", BetterEditorDefines.FieldsFlags);
var objectPrtInfo = typeof(SerializedObject).GetField("m_NativeObjectPtr", BetterEditorDefines.FieldsFlags);
var propertyPrtInfo = typeof(SerializedProperty).GetField("m_NativePropertyPtr", Defines.FieldsFlags);
var objectPrtInfo = typeof(SerializedObject).GetField("m_NativeObjectPtr", Defines.FieldsFlags);
try
{
if (propertyPrtInfo != null && objectPrtInfo != null)
Expand All @@ -133,7 +134,7 @@ public static bool Verify(this SerializedProperty property)
return false;
}

var verifyMethod = typeof(SerializedProperty).GetMethod("Verify", BetterEditorDefines.FieldsFlags);
var verifyMethod = typeof(SerializedProperty).GetMethod("Verify", Defines.FieldsFlags);

try
{
Expand Down Expand Up @@ -380,13 +381,13 @@ private static List<MemberInfo> TraverseBaseClasses(Type currentType, string nam
{
var memberInfos = new List<MemberInfo>();

var currentTypeFields = currentType.GetMember(name, BetterEditorDefines.FieldsFlags);
var currentTypeFields = currentType.GetMember(name, Defines.FieldsFlags);
memberInfos.AddRange(currentTypeFields);

var baseType = currentType.BaseType;

if (baseType == null) return memberInfos;
var baseTypeFields = baseType.GetMember(name, BetterEditorDefines.FieldsFlags);
var baseTypeFields = baseType.GetMember(name, Defines.FieldsFlags);
memberInfos.AddRange(baseTypeFields);

memberInfos.AddRange(TraverseBaseClasses(baseType, name)); // Recursively traverse the base classes
Expand All @@ -397,7 +398,7 @@ private static List<MemberInfo> TraverseBaseClasses(Type currentType, string nam
private static void SetMemberValue(object container, string name, object value)
{
var type = container.GetType();
var members = type.GetMember(name, BetterEditorDefines.FieldsFlags);
var members = type.GetMember(name, Defines.FieldsFlags);
for (int i = 0; i < members.Length; ++i)
{
if (members[i] is FieldInfo field)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System.IO;
using Better.Internal.Core.Runtime;
using Better.Tools.Runtime;
using Better.Tools.Runtime.Settings;
using UnityEditor;
Expand All @@ -16,17 +17,17 @@ public ProjectSettingsTools(string namespacePrefix, string settingMenuItem)
{
NamespacePrefix = namespacePrefix;
_folderPaths = new string[]
{ BetterEditorDefines.BetterPrefix, NamespacePrefix, BetterEditorDefines.ResourcesPrefix };
var menuItemPrefix = $"{BetterEditorDefines.BetterPrefix}/{settingMenuItem}";
ProjectSettingKey = $"{BetterEditorDefines.ProjectPrefix}/{menuItemPrefix}";
{ PrefixConstants.BetterPrefix, NamespacePrefix, PrefixConstants.ResourcesPrefix };
var menuItemPrefix = $"{PrefixConstants.BetterPrefix}/{settingMenuItem}";
ProjectSettingKey = $"{PrefixConstants.ProjectPrefix}/{menuItemPrefix}";
}

public ProjectSettingsTools(string namespacePrefix, string settingMenuItem, string[] settingsFolderNames)
{
NamespacePrefix = namespacePrefix;
_folderPaths = settingsFolderNames;
var menuItemPrefix = $"{BetterEditorDefines.BetterPrefix}/{settingMenuItem}";
ProjectSettingKey = $"{BetterEditorDefines.ProjectPrefix}/{menuItemPrefix}";
var menuItemPrefix = $"{PrefixConstants.BetterPrefix}/{settingMenuItem}";
ProjectSettingKey = $"{PrefixConstants.ProjectPrefix}/{menuItemPrefix}";
}

private string GenerateResourcesRelativePath()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
using System;
using System.Diagnostics;
using Better.Internal.Core.Runtime;
using UnityEngine;

namespace Better.Tools.Runtime.Attributes
{
[Conditional(BetterEditorDefines.Editor)]
[Conditional(Defines.Editor)]
[AttributeUsage(AttributeTargets.Field)]
public abstract class MultiPropertyAttribute : PropertyAttribute
{
Expand Down
22 changes: 0 additions & 22 deletions Assets/BetterEditorTools/Runtime/BetterEditorDefines.cs

This file was deleted.

3 changes: 0 additions & 3 deletions Assets/BetterEditorTools/Runtime/BetterEditorDefines.cs.meta

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
{
"name": "BetterEditorTools.Runtime",
"rootNamespace": "Better.Tools",
"references": [],
"references": [
"GUID:01df13aca8d01e24a911bcc3e8277031"
],
"includePlatforms": [],
"excludePlatforms": [],
"allowUnsafeCode": false,
Expand Down
5 changes: 3 additions & 2 deletions Assets/BetterEditorTools/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@
"name": "com.uurha.bettereditortools",
"displayName": "Better Editor Tools",
"description": "Collection of useful tools for Unity Editor",
"version": "1.0.70",
"version": "1.0.71",
"unity": "2020.1",
"dependencies": {
"com.uurha.betterdatastructures": "0.1.2",
"com.uurha.betterextensions": "1.2.2"
"com.uurha.betterextensions": "1.2.3",
"com.tdw.better.internal.core": "0.0.2"
},
"author": {
"name": "Better Plugins",
Expand Down
3 changes: 2 additions & 1 deletion Packages/manifest.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"dependencies": {
"com.tdw.better.internal.core": "0.0.2",
"com.unity.collab-proxy": "1.17.7",
"com.unity.feature.development": "1.0.1",
"com.unity.ide.rider": "3.0.16",
Expand All @@ -11,7 +12,7 @@
"com.unity.ugui": "1.0.0",
"com.unity.visualscripting": "1.7.8",
"com.uurha.betterdatastructures": "0.1.2",
"com.uurha.betterextensions": "1.1.98",
"com.uurha.betterextensions": "1.2.3",
"com.unity.modules.ai": "1.0.0",
"com.unity.modules.androidjni": "1.0.0",
"com.unity.modules.animation": "1.0.0",
Expand Down
9 changes: 8 additions & 1 deletion Packages/packages-lock.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
{
"dependencies": {
"com.tdw.better.internal.core": {
"version": "0.0.2",
"depth": 0,
"source": "registry",
"dependencies": {},
"url": "https://package.openupm.com"
},
"com.unity.collab-proxy": {
"version": "1.17.7",
"depth": 0,
Expand Down Expand Up @@ -163,7 +170,7 @@
"url": "https://package.openupm.com"
},
"com.uurha.betterextensions": {
"version": "1.1.98",
"version": "1.2.3",
"depth": 0,
"source": "registry",
"dependencies": {},
Expand Down

0 comments on commit 342226f

Please sign in to comment.