Newer
Older
CGTrack / Assets / Editor / CartFollowerEditor.cs
@Pascal Syma Pascal Syma on 25 Jul 2021 518 bytes Initial Commit
using System.Collections;
using System.Collections.Generic;
using DefaultNamespace;
#if UNITY_EDITOR
using UnityEditor;
#endif
using UnityEngine;


[CustomEditor(typeof(CartFollower))]
public class CartFollowerEditor : Editor
{
    public override void OnInspectorGUI()
    {
        var cart = (CartFollower) target;

        cart.distance = EditorGUILayout.FloatField("Distance", cart.distance);
        cart._cart = (GameObject) EditorGUILayout.ObjectField("Cart", cart._cart, typeof(GameObject), true);
    }
}