-
here is my class and show if not showing when condition met [Serializable]
public class MenuOpen
{
public MenuType menuToOpen = MenuType.Home;
public bool open = true;
[ShowIf(nameof(IsDialogMenu))] public DialogMenu.DialogInfo dialogInfo;
bool IsDialogMenu()
{
return menuToOpen == MenuType.DialogMenu;
}
} here is the object in other class public class MenuCreator : MonoBehaviour
{
[SerializeField] MenusCreator.MenuOpen menu;
[SerializeField] bool runOnStart = true;
[SerializeField] UnityEvent onCloseMenu;
} this also dosen't work [ShowIf(nameof(menuToOpen), MenuType.DialogMenu)] |
Beta Was this translation helpful? Give feedback.
Answered by
fawad0dev
Nov 6, 2024
Replies: 1 comment
-
Sorry i resolved my problem it was on my end i forgot to add |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
fawad0dev
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Sorry i resolved my problem it was on my end i forgot to add
[Serializable]
onDialogInfo
class