// Use this for initialization void Start() { regulated = StaticDecisionsMade.chooseToRegulateUber; _regulated = regulated; source1 = advisor1.GetComponent <AudioSource>(); source2 = advisor2.GetComponent <AudioSource>(); advisor1Animator = advisor1.GetComponent <AdvisorAnimationController>(); advisor2Animator = advisor2.GetComponent <AdvisorAnimationController>(); initializeAudioClips(); fader = player.GetComponentInChildren <FadeScript>(); radioAudioSource = radio.GetComponent <AudioSource> (); }
public override void OnInspectorGUI() { base.OnInspectorGUI(); // Take out this if statement to set the value using setter when ever you change it in the inspector. // But then it gets called a couple of times when ever inspector updates // By having a button, you can control when the value goes through the setter and getter, your self. if (target.GetType() == typeof(AdvisorAnimationController)) { AdvisorAnimationController getterSetter = (AdvisorAnimationController)target; getterSetter.currentlyPlaying = getterSetter._currentlyPlaying; getterSetter.pauseAnimation = getterSetter._pauseAnimation; } }