DarkRewar / BaseTool

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

Add comparer for IfAttributes #74

Closed Paul-1379 closed 4 months ago

Paul-1379 commented 5 months ago

Add the ability to make comparisons directly in the ifAttribute like:

using BaseTool;
using UnityEngine;

public class MonoScript : MonoBehaviour 
{
    public int Number;
    [If("Number == 0")] public int OtherNumber;
}

or:

using BaseTool;
using UnityEngine;

public class MonoScript : MonoBehaviour 
{
    public enum MyEnum
    {
        A,
        B
    }
    public MyEnum Enum;
    [If("Enumr == MyEnum.A")] public int Number;
}
DarkRewar commented 5 months ago

I've searched many informations about this and... I think this would be a really long and hard task to do that. I now understand why tools like OdinInspector aren't free. I would try maybe someday something, but it is a huge task...