Show *only* during runtime #55
FirstGearGames
started this conversation in
Ideas
Replies: 3 comments 1 reply
-
To elaborate, I imagine this would only be used for debugging. |
Beta Was this translation helpful? Give feedback.
0 replies
-
You can create your own attribute and use it like this: [Debug] private float time; DebugGroupAttribute.csusing TriInspector;
using UnityEngine;
#if UNITY_EDITOR
[assembly: RegisterTriPropertyHideProcessor(typeof(DebugGroupAttributeHideProcessor))]
[assembly: RegisterTriPropertyDisableProcessor(typeof(DebugGroupAttributeDisableProcessor))]
public class DebugGroupAttributeHideProcessor : TriPropertyHideProcessor<DebugAttribute> {
public override bool IsHidden(TriProperty property) => !Application.isPlaying;
}
public class DebugGroupAttributeDisableProcessor : TriPropertyDisableProcessor<DebugAttribute> {
public override bool IsDisabled(TriProperty property) => true;
}
#endif
public class DebugAttribute : ShowInInspector { } |
Beta Was this translation helpful? Give feedback.
0 replies
-
isn't it what |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
It would be really handy to have an option to only show a field during runtime with optional read-only.
Being able to manipulate or see fields that could affect a script at runtime without them being editable out of play mode could be useful.
Beta Was this translation helpful? Give feedback.
All reactions