Animation field in custom inspector.

So, im trying to make a custom editor for my weapon script. Now my problem is i don’t know how i can display an animation field in a custom inspector. I spent some time trying to find out how it works, but i didnt find a solution.

If I understood you right you already know how to create custom inspector and get/save values to your target script so I’ll just show the code with Animation field:

yourScriptReference.yourAnimationNameInScript = EditorGUILayout.ObjectField(yourScriptReference.yourAnimationNameInScript, typeof(Animation), false) as Animation;