2022-01-07 10:40:32 -05:00
|
|
|
|
using TriInspector.Processors;
|
2022-01-05 07:24:23 -05:00
|
|
|
|
using TriInspector;
|
|
|
|
|
using UnityEngine;
|
|
|
|
|
|
|
|
|
|
[assembly: RegisterTriPropertyDisableProcessor(typeof(DisableInPlayModeProcessor))]
|
|
|
|
|
[assembly: RegisterTriPropertyDisableProcessor(typeof(EnableInPlayModeProcessor))]
|
|
|
|
|
|
2022-01-07 10:40:32 -05:00
|
|
|
|
namespace TriInspector.Processors
|
2022-01-05 07:24:23 -05:00
|
|
|
|
{
|
|
|
|
|
public class DisableInPlayModeProcessor : TriPropertyDisableProcessor<DisableInPlayModeAttribute>
|
|
|
|
|
{
|
|
|
|
|
public override bool IsDisabled(TriProperty property)
|
|
|
|
|
{
|
|
|
|
|
return Application.isPlaying;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public class EnableInPlayModeProcessor : TriPropertyDisableProcessor<EnableInPlayModeAttribute>
|
|
|
|
|
{
|
|
|
|
|
public override bool IsDisabled(TriProperty property)
|
|
|
|
|
{
|
|
|
|
|
return !Application.isPlaying;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|