DarkRewar / BaseTool

A big library of basic tools that you might need in your Unity projects.
MIT License
45 stars 6 forks source link

Fields in inspector overlap with IfAttribute and unityEvent #119

Closed Paul-1379 closed 2 weeks ago

Paul-1379 commented 3 weeks ago

When using a simple script like: `using BaseTool; using UnityEngine; using UnityEngine.Events; using UnityEngine.Serialization;

public class SimpleBugScript : MonoBehaviour { [FormerlySerializedAs("_ifBool")] [SerializeField] private bool ifBool; [SerializeField, If(nameof(ifBool))] private UnityEvent unityEvent; [SerializeField, If(nameof(ifBool))] private bool boolValue; }` The fields in the inspector are not showed correctly:

https://github.com/user-attachments/assets/5e7b051e-1292-4aa1-b386-cf61042baae3

The bug is also present in unity 2022

DarkRewar commented 2 weeks ago

Duplicates #94