Esempio n. 1
0
 private void Update()
 {
     if (dataUser == null)
     {
         dataUser = GetComponentInChildren <IEventDataUser <EventData> >();
     }
     if (dataUser == null)
     {
         Debug.LogError("could not find DataUser in children of DataCatcher from gameObject " + gameObject.name);
     }
 }
Esempio n. 2
0
    private void Awake()
    {
        if (prefabWithDataUser != null)
        {
            instanceWithDataUser = Instantiate(prefabWithDataUser, transform);
            instanceWithDataUser.transform.localPosition = prefabWithDataUser.transform.position;
            dataUser = instanceWithDataUser.GetComponent <IEventDataUser <EventData> >();
            if (dataUser == null)
            {
                Debug.LogError("could not find DataUser in prefab of DataCatcher from gameObject " + gameObject.name);
            }
            instanceWithDataUser.SetActive(false);
        }

        InstantiateTransmitDataListeners();
        InstantiateDisableDataUserListeners();
        InstantiateSuspendDataCatcherListeners();
        InstantiateUnsuspendDataCatcherListeners();
    }