Unity editor, horizontal line in the inspector

Public static class EditorGUILayoutUtility
public static readonly Color DEFAULT_COLOR = new Color (0f, 0f, 0f, 0.3f);
public static read-only Vector2 DEFAULT_LINE_MARGIN = new Vector2 (2f, 2f);

public const float DEFAULT_LINE_HEIGHT = 1f;

public static vacuum HorizontalLine (color, float height, margin Vector2)
GUILayout.Space (margin.x);

EditorGUI.DrawRect (EditorGUILayout.GetControlRect (false, height), color);

GUILayout.Space (margin.y);
blank static public HorizontalLine (Color Color, Floating Height) => EditorGUILoutUtility.HorizontalLine (color, height, DEFAULT_LINE_MARGIN);
blank static public HorizontalLine (Color color, Vector2 margin) => EditorGUILoutUtility.HorizontalLine (color, DEFAULT_LINE_HEIGHT, margin);
public static static HorizontalLine (float height, Vector2 margin) => EditorGUILoutoutUtility.HorizontalLine (DEFAULT_COLOR, height, margin);

public static empty HorizontalLine (Color color) => EditorGUILoutoutUtility.HorizontalLine (color, DEFAULT_LINE_HEIGHT, DEFAULT_LINE_MARGIN);
public static static HorizontalLine (float height) => EditorGUILoutoutUtility.HorizontalLine (DEFAULT_COLOR, height, DEFAULT_LINE_MARGIN);
public static static HorizontalLine (Vector2 margin) => EditorGUILoutoutUtility.HorizontalLine (DEFAULT_COLOR, DEFAULT_LINE_HEIGHT, margin);

public static empty HorizontalLine () => EditorGUILayoutUtility.HorizontalLine (DEFAULT_COLOR, DEFAULT_LINE_HEIGHT, DEFAULT_LINE_MARGIN);

#end if


public override void OnInspectorGUI ()
base.OnInspectorGUI ();

EditorGUILayout.BeginVertical ();

EditorGUILayoutUtility.HorizontalLine (new Vector2 (20f, 20f));

EditorGUILayout.EndVertical ();

Will give this result.

Draw a line Result

unit – How to create a drop-down list of selectable methods on the inspector

Something like the inspector of the event animation:

example of drop-down menu

but only the specific static and static classes and methods will be displayed.

UnityEvent will show something like this:

example of unity event But I want to limit them so that the designer does not have to choose a specific class and the GameObject, MonoBehavior, Transform methods are not displayed.

c # – Inspector Unit | Display of min and max variables on one line

In a C # Unity script, how do I add fields to display in the Unity Inspector with the min and max values ​​on a single line? (as for the particle system, where you can choose Between two constants)

WHAT I AI | Separate lines for min and max:

enter the description of the image here

WHAT I WOULD LIKE: One line with min and max:

enter the description of the image here

[GET]ALI Inspector V1.0.3.0





Powerful 3-in-1 AliExpress product search software that generates niche keywords, bestseller analytics, and discovery of the best performing Dropship products for your e-commerce store in minutes!


Keyword generator:
Instantly generate thousands of highly targeted niche keywords in seconds with the help of built-in keyword generation tool.
Best selling tool:
Analyze all the best sellers on …

[GET]ALI Inspector V1.0.3.0

javascript – Firefox makes it too fast – but not with Element Inspector open

I'm developing a web-based data table, similar to Excel, that can handle very large tables. But I have trouble making it work properly in Firefox.
When I scroll the table, it flashes and takes a very short time to display again. It works perfectly in Chrome and Opera.

So this week, I was trying to check the code using the Firefox Element Inspector and, to my surprise, I noticed that as long as the Inspector is open, the array works exactly as expected!
My theory is that Firefox may be too fast compared to Chrome and Opera, and that when I activate the inspector, it slows down one way or another.

I would like to understand this behavior in order to be able to change the code of my table to adapt it to the timing of Firefox. Everyone of you knows how to explain what happens in the Inspect mode so that things happen at the right time for my table.
I use pure JS.


Do not serialize but show them in the inspector – Unity

I have a serializable class, like this:


Public class Weapon {

public int firerate;
public GameObject weapon;
public Color32 weaponColor;

} (This is just an example)

So, when I try to save them to a file using Binary Formatter, the error message that GameObject and Color can not be serialized continues to appear. I've tried using NonSerializable, but that makes them disappear from the inspector!

My question is: how can I ignore Unity to save them to a file? Or how not to serialize them but make them appear in the inspector

Thank you!