Beispiel #1
0
 // Update is called once per frame
 void Update()
 {
     if (this.transform.hasChanged)
     {
         this.transform.hasChanged = false;
         if (pointToCinemachinePath == null)
         {
             pointToCinemachinePath = this.GetComponentInParent <PointToCinemachinePath>();
         }
         if (pointToCinemachinePath != null)
         {
             pointToCinemachinePath.UpdatePath();
         }
     }
 }
Beispiel #2
0
    public override void OnInspectorGUI()
    {
        DrawDefaultInspector();

        PointToCinemachinePath _me = (PointToCinemachinePath)target;

        if (GUILayout.Button("Add Point"))
        {
            _me.AddProtPt();
        }

        GUI.enabled = !_me.IsUseAutoUpdate();
        if (GUILayout.Button("Update Path"))
        {
            _me.CreatePath();
        }
    }