diff --git a/Runtime/ABase/Event/EventPublisher.cs b/Runtime/ABase/Event/EventBus.cs similarity index 97% rename from Runtime/ABase/Event/EventPublisher.cs rename to Runtime/ABase/Event/EventBus.cs index 028dbab..89de236 100644 --- a/Runtime/ABase/Event/EventPublisher.cs +++ b/Runtime/ABase/Event/EventBus.cs @@ -4,7 +4,7 @@ using Unity.IL2CPP.CompilerServices; namespace AlicizaX { - public static class EventPublisher + public static class EventBus { [Il2CppSetOption(Option.NullChecks, false)] [Il2CppSetOption(Option.DivideByZeroChecks, false)] diff --git a/Runtime/ABase/Event/EventPublisher.cs.meta b/Runtime/ABase/Event/EventBus.cs.meta similarity index 100% rename from Runtime/ABase/Event/EventPublisher.cs.meta rename to Runtime/ABase/Event/EventBus.cs.meta diff --git a/Runtime/ABase/Helper.meta b/Runtime/ABase/Helper.meta deleted file mode 100644 index e9e0687..0000000 --- a/Runtime/ABase/Helper.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: 634e669ad63f4302acca846ec1a0240a -timeCreated: 1736324891 \ No newline at end of file diff --git a/Runtime/ABase/Property.meta b/Runtime/ABase/Property.meta deleted file mode 100644 index 6f0bca6..0000000 --- a/Runtime/ABase/Property.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: d73cc40a000b40e4949fa532373115b5 -timeCreated: 1736324891 \ No newline at end of file diff --git a/Runtime/ABase/Property/BindableProperty.cs b/Runtime/ABase/Structs/BindableProperty.cs similarity index 100% rename from Runtime/ABase/Property/BindableProperty.cs rename to Runtime/ABase/Structs/BindableProperty.cs diff --git a/Runtime/ABase/Property/BindableProperty.cs.meta b/Runtime/ABase/Structs/BindableProperty.cs.meta similarity index 100% rename from Runtime/ABase/Property/BindableProperty.cs.meta rename to Runtime/ABase/Structs/BindableProperty.cs.meta diff --git a/Runtime/ABase/Structs/GenericReflectionField.cs b/Runtime/ABase/Structs/GenericReflectionField.cs deleted file mode 100644 index 2a3f4cd..0000000 --- a/Runtime/ABase/Structs/GenericReflectionField.cs +++ /dev/null @@ -1,92 +0,0 @@ -using System; -using System.Reflection; -using UnityEngine; - -namespace AlicizaX -{ - /// - /// A generic reflection field allows you to get or set a generic (object) value for a property, field, or method. - /// - [Serializable] - public sealed class GenericReflectionField - { - public enum ReflectionType { Field, Property, Method }; - - public ReflectionType ReflectType; - public MonoBehaviour Instance; - public string ReflectName; - public bool ReflectDerived; - - public bool IsSet => Instance != null; - - private FieldInfo fieldInfo = null; - private FieldInfo FieldInfo - { - get - { - if (fieldInfo == null) - fieldInfo = Instance.GetType().GetField(ReflectName, BindingFlags.Public | BindingFlags.Instance); - - return fieldInfo; - } - } - - private PropertyInfo propertyInfo = null; - private PropertyInfo PropertyInfo - { - get - { - if (propertyInfo == null) - propertyInfo = Instance.GetType().GetProperty(ReflectName, BindingFlags.Public | BindingFlags.Instance); - - return propertyInfo; - } - } - - private MethodInfo methodInfo = null; - private MethodInfo MethodInfo - { - get - { - if (methodInfo == null) - methodInfo = Instance.GetType().GetMethod(ReflectName, BindingFlags.Public | BindingFlags.Instance); - - return methodInfo; - } - } - - public object Value - { - get => ReflectType switch - { - ReflectionType.Field => FieldInfo.GetValue(Instance), - ReflectionType.Property => PropertyInfo.GetValue(Instance), - ReflectionType.Method => MethodInfo.Invoke(Instance, new object[0]), - _ => throw new NullReferenceException() - }; - - set - { - try - { - if (ReflectType == ReflectionType.Field) - { - FieldInfo.SetValue(Instance, value); - } - else if (ReflectType == ReflectionType.Property) - { - PropertyInfo.SetValue(Instance, value); - } - else - { - MethodInfo.Invoke(Instance, new object[] { value }); - } - } - catch (Exception exception) - { - throw exception; - } - } - } - } -} diff --git a/Runtime/ABase/Structs/GenericReflectionField.cs.meta b/Runtime/ABase/Structs/GenericReflectionField.cs.meta deleted file mode 100644 index 5f28d68..0000000 --- a/Runtime/ABase/Structs/GenericReflectionField.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 1f04b88956af3864487d98e1d262f914 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Runtime/Localization/Event/LocalizationChangeEvent.cs b/Runtime/Localization/Event/LocalizationChangeEvent.cs index c25e2d5..8b0ae0c 100644 --- a/Runtime/Localization/Event/LocalizationChangeEvent.cs +++ b/Runtime/Localization/Event/LocalizationChangeEvent.cs @@ -13,7 +13,7 @@ namespace AlicizaX.Localization public static void Publisher(string language) { - EventPublisher.Publish(new LocalizationChangeEvent(language)); + EventBus.Publish(new LocalizationChangeEvent(language)); } } }