// Use this for initialization void Start() { if (targetBook == null) { targetBook = GetComponent <AnimatedBookController>(); } if (targetBook != null) { targetBook._onBookOpen += onBookOpen; targetBook._onBookClose += onBookClose; } else { Debug.LogError("The reference to the AnimatedBookController has not been set"); } }
// Use this for initialization void Start() { animatedBookController = FindObjectOfType <AnimatedBookController> (); }