2022-01-07 10:40:32 -05:00
|
|
|
|
using TriInspector.Processors;
|
2022-01-05 07:24:23 -05:00
|
|
|
|
using TriInspector;
|
|
|
|
|
using UnityEngine;
|
|
|
|
|
|
|
|
|
|
[assembly: RegisterTriPropertyHideProcessor(typeof(HideInPlayModeProcessor))]
|
|
|
|
|
[assembly: RegisterTriPropertyHideProcessor(typeof(ShowInPlayModeProcessor))]
|
|
|
|
|
|
2022-01-07 10:40:32 -05:00
|
|
|
|
namespace TriInspector.Processors
|
2022-01-05 07:24:23 -05:00
|
|
|
|
{
|
|
|
|
|
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;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|