//SKRYPT A /************/ using System.Collections; using System.Collections.Generic; using UnityEngine; public class DronePowerControl : MonoBehaviour { public static GameObject Motor; private Engine motor = Motor.GetComponent<Engine> (); void Update () { motor.speed += 1f; } } /**************/ //SKRYPT B /**************/ using System.Collections; using System.Collections.Generic; using UnityEngine; public class Engine : MonoBehaviour { public float speed = 2000f; } /**************/
Jak ze skryptu A mogę zmienić zmienną "speed" w skrypcie B?