Tri-Inspector/Editor.Extras/Processors/HideInPlayModeProcessor.cs

25 lines
724 B
C#
Raw Normal View History

2022-01-07 10:40:32 -05:00
using TriInspector.Processors;
using TriInspector;
using UnityEngine;
[assembly: RegisterTriPropertyHideProcessor(typeof(HideInPlayModeProcessor))]
[assembly: RegisterTriPropertyHideProcessor(typeof(ShowInPlayModeProcessor))]
2022-01-07 10:40:32 -05:00
namespace TriInspector.Processors
{
public class HideInPlayModeProcessor : TriPropertyHideProcessor<HideInPlayModeAttribute>
{
public override bool IsHidden(TriProperty property)
{
return Application.isPlaying;
}
}
public class ShowInPlayModeProcessor : TriPropertyHideProcessor<ShowInPlayModeAttribute>
{
public override bool IsHidden(TriProperty property)
{
return !Application.isPlaying;
}
}
}