Example #1
0
    public override void OnInspectorGUI()
    {
        ControllerManagerComponent script = (ControllerManagerComponent)target;

        script.Player1 = (ControllerAttribute)EditorGUILayout.EnumPopup("Player 1", script.Player1);
        script.Player2 = (ControllerAttribute)EditorGUILayout.EnumPopup("Player 2", script.Player2);
    }
Example #2
0
 // Start is called before the first frame update
 void Start()
 {
     ControllerManager = GameObject.Find("Controller Manager");
     if (ControllerManager != null)
     {
         Debug.Log("Controller Manager Found!");
         controllerManagerComponent = ControllerManager.GetComponent(typeof(ControllerManagerComponent)) as ControllerManagerComponent;
         car = GetComponent <CarComponent>();
     }
     else
     {
         Debug.Log("Controller Manager Not Found!");
     }
 }