GameObjectComponent.cs 442 B

1234567891011121314151617181920212223
  1. using UnityEngine;
  2. namespace Base
  3. {
  4. [ObjectEvent]
  5. public class GameObjectComponentEvent : ObjectEvent<GameObjectComponent>, IAwake<GameObject>
  6. {
  7. public void Awake(GameObject gameObject)
  8. {
  9. this.GetValue().Awake(gameObject);
  10. }
  11. }
  12. public class GameObjectComponent : Component
  13. {
  14. public GameObject GameObject { get; private set; }
  15. public void Awake(GameObject gameObject)
  16. {
  17. this.GameObject = gameObject;
  18. }
  19. }
  20. }