mirror of
https://github.com/codewriter-packages/Tri-Inspector.git
synced 2025-01-22 16:28:23 -05:00
25 lines
755 B
C#
25 lines
755 B
C#
using TriInspector.Processors;
|
|
using TriInspector;
|
|
using UnityEngine;
|
|
|
|
[assembly: RegisterTriPropertyDisableProcessor(typeof(DisableInPlayModeProcessor))]
|
|
[assembly: RegisterTriPropertyDisableProcessor(typeof(EnableInPlayModeProcessor))]
|
|
|
|
namespace TriInspector.Processors
|
|
{
|
|
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;
|
|
}
|
|
}
|
|
} |