mirror of
https://github.com/codewriter-packages/Tri-Inspector.git
synced 2025-01-22 16:28:23 -05:00
25 lines
724 B
C#
25 lines
724 B
C#
using TriInspector.Processors;
|
|
using TriInspector;
|
|
using UnityEngine;
|
|
|
|
[assembly: RegisterTriPropertyHideProcessor(typeof(HideInEditModeProcessor))]
|
|
[assembly: RegisterTriPropertyHideProcessor(typeof(ShowInEditModeProcessor))]
|
|
|
|
namespace TriInspector.Processors
|
|
{
|
|
public class HideInEditModeProcessor : TriPropertyHideProcessor<HideInEditModeAttribute>
|
|
{
|
|
public override bool IsHidden(TriProperty property)
|
|
{
|
|
return !Application.isPlaying;
|
|
}
|
|
}
|
|
|
|
public class ShowInEditModeProcessor : TriPropertyHideProcessor<ShowInEditModeAttribute>
|
|
{
|
|
public override bool IsHidden(TriProperty property)
|
|
{
|
|
return Application.isPlaying;
|
|
}
|
|
}
|
|
} |