コード例 #1
0
    public override void OnInspectorGUI()
    {
        Orbitable t = target as Orbitable;

        //Draw if has not been done yet
        if (t.trajectory == null)
        {
            t.UpdateTrajectory();
            t.MoveToStart();
        }

        EditorGUI.BeginChangeCheck();
        base.OnInspectorGUI();
        if (EditorGUI.EndChangeCheck())
        {
            t.UpdateTrajectory();
            t.MoveToStart();
        }
    }