Reply To: [Feature Request] (Custom Tasks) Easy Drop-down selector for list/arrays

Forums 💬 NodeCanvas 🗨️ General Discussion [Feature Request] (Custom Tasks) Easy Drop-down selector for list/arrays Reply To: [Feature Request] (Custom Tasks) Easy Drop-down selector for list/arrays

#14462
async0x42
Participant

    Okay thanks! Those are good.

    I saw something like ShowIf from Advanced Inspector, but they were using a string to point to a method which would return true/false, so now I know there’s a coding reason behind that!

    I think their implementation required users to write a function for each comparison they wanted. So would it be possible to implement something similar to…

    [ShowIf("IsTrue(isAdvancedAI)") public float advancedAttackSpeed;

    In which, IsTrue is a built in method in NodeCanvas, but uses reflection to call it and pass in a boolean parameter to check the return value, to determine if it should be shown or not?

    It’s the best workaround that I can think of, what do you think?