Replies: 3 comments 2 replies
-
I managed to hide |
Beta Was this translation helpful? Give feedback.
-
Using a RuntimeInspectorCustomEditor would probably be the fastest solution here. First, declare the following classes: public class ComponentsWrapper
{
public IList<Component> components;
}
[RuntimeInspectorCustomEditor( typeof( ComponentsWrapper ), false )]
public class ComponentsWrapperEditor : IRuntimeInspectorCustomEditor
{
public void GenerateElements( ObjectField parent )
{
// Get the components we are inspecting
IList<Component> components = ( (ComponentsWrapper) parent.Value ).components;
for( int i = 0; i < components.Count; i++ )
{
Component component = components[i];
if( component is Transform )
continue;
// Create drawer for component
ExpandableInspectorField componentField = (ExpandableInspectorField) parent.CreateDrawerForComponent( component );
// Don't show arrow for component
componentField.HeaderVisibility = RuntimeInspector.HeaderVisibility.AlwaysVisible;
}
}
public void Refresh() { }
public void Cleanup() { }
} Then, simply create an instance of ComponentsWrapper with the desired components and pass it to RuntimeInspector's Inspect function: |
Beta Was this translation helpful? Give feedback.
-
Quick note for anyone who will be further modding the looks of the UI, there is an auto layout code that seems to override the padding on any custom skins we make ( I made a copy of the button prefab and only changed its Thank you for making this FOSS |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm using the inspector as an runtime alternative for an quick UI alternative for my math demos , right now I'm inspecting a single MonoBehavior, and would like to have the ability to pass array as an argument , It seems like gameObjects also work but it will display unnecessary information and controls that the demo shouldn't have. Also would be awesome to have the component
Enabled
checkbox be optional as well as the component collapse options as optional in theRuntimeInspector
settings ( similar to how ShowTooltips works rn )Here is a preview of what I have right now, the top part is crossed out as its not needed
Beta Was this translation helpful? Give feedback.
All reactions